diff options
| author | Karoly Lorentey | 2004-09-16 13:09:53 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-09-16 13:09:53 +0000 |
| commit | 98a92e2d7b1f9993215dd4db3d5810586b3da7d3 (patch) | |
| tree | 36549b6c7ca6056a0e3b5fd72264160953b23f15 /src | |
| parent | aeeb70757cd8c57689a1b3238e9b25a2d422e38f (diff) | |
| parent | 113e270a241bcabe4aae4eb13f0ceb62744ec1f4 (diff) | |
| download | emacs-98a92e2d7b1f9993215dd4db3d5810586b3da7d3.tar.gz emacs-98a92e2d7b1f9993215dd4db3d5810586b3da7d3.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-547
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-548
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-549
Use symbol-matching for generic-mode keywords
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-550
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-551
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-246
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/alloc.c | 33 | ||||
| -rw-r--r-- | src/bytecode.c | 35 | ||||
| -rw-r--r-- | src/fileio.c | 8 | ||||
| -rw-r--r-- | src/puresize.h | 2 | ||||
| -rw-r--r-- | src/xfaces.c | 59 |
6 files changed, 96 insertions, 67 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5fee1e8d97d..955c8929f92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2004-09-14 Stefan <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * fileio.c (Finsert_file_contents): Fix case of replacement in a | ||
| 4 | narrowed buffer. | ||
| 5 | |||
| 6 | 2004-09-14 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * puresize.h (PURESIZE_RATIO): Define based on BITS_PER_EMACS_INT. | ||
| 9 | |||
| 10 | * xfaces.c (Qface_no_inherit): New var. | ||
| 11 | (syms_of_xfaces): Intern and staticpro it. | ||
| 12 | (Finternal_make_lisp_face, Finternal_set_lisp_face_attribute) | ||
| 13 | (Finternal_copy_lisp_face, update_face_from_frame_parameter): | ||
| 14 | Don't increment face_change_count when face has non-nil | ||
| 15 | face-no-inherit property. | ||
| 16 | |||
| 17 | 2004-09-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 18 | |||
| 19 | * bytecode.c (BYTE_CODE_QUIT): Add missing AFTER_POTENTIAL_GC. | ||
| 20 | (Fbyte_code): Remove dead code after `wrong_type_argument'. | ||
| 21 | |||
| 22 | * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl | ||
| 23 | before doing the mark_stack_check_gcpros since they are not on the stack. | ||
| 24 | |||
| 1 | 2004-09-12 Kim F. Storm <storm@cua.dk> | 25 | 2004-09-12 Kim F. Storm <storm@cua.dk> |
| 2 | 26 | ||
| 3 | * editfns.c (Fformat): Handle format strings with multiple text | 27 | * editfns.c (Fformat): Handle format strings with multiple text |
| @@ -12504,7 +12528,7 @@ | |||
| 12504 | 12528 | ||
| 12505 | 2002-02-15 Andreas Schwab <schwab@suse.de> | 12529 | 2002-02-15 Andreas Schwab <schwab@suse.de> |
| 12506 | 12530 | ||
| 12507 | * puresize.h (BASE_PURESIZE): Increase to 9/5. | 12531 | * puresize.h (PURESIZE_RATIO): Increase to 9/5. |
| 12508 | 12532 | ||
| 12509 | * alloc.c (NSTATICS): Increase to 1280. | 12533 | * alloc.c (NSTATICS): Increase to 1280. |
| 12510 | 12534 | ||
diff --git a/src/alloc.c b/src/alloc.c index e1fadc155f6..12e673495c3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004 | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4455,6 +4455,21 @@ returns nil, because real GC can't be done. */) | |||
| 4455 | for (i = 0; i < staticidx; i++) | 4455 | for (i = 0; i < staticidx; i++) |
| 4456 | mark_object (*staticvec[i]); | 4456 | mark_object (*staticvec[i]); |
| 4457 | 4457 | ||
| 4458 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4459 | { | ||
| 4460 | mark_object (bind->symbol); | ||
| 4461 | mark_object (bind->old_value); | ||
| 4462 | } | ||
| 4463 | mark_kboards (); | ||
| 4464 | mark_ttys (); | ||
| 4465 | |||
| 4466 | #ifdef USE_GTK | ||
| 4467 | { | ||
| 4468 | extern void xg_mark_data (); | ||
| 4469 | xg_mark_data (); | ||
| 4470 | } | ||
| 4471 | #endif | ||
| 4472 | |||
| 4458 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ | 4473 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ |
| 4459 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) | 4474 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) |
| 4460 | mark_stack (); | 4475 | mark_stack (); |
| @@ -4468,11 +4483,6 @@ returns nil, because real GC can't be done. */) | |||
| 4468 | #endif | 4483 | #endif |
| 4469 | 4484 | ||
| 4470 | mark_byte_stack (); | 4485 | mark_byte_stack (); |
| 4471 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4472 | { | ||
| 4473 | mark_object (bind->symbol); | ||
| 4474 | mark_object (bind->old_value); | ||
| 4475 | } | ||
| 4476 | for (catch = catchlist; catch; catch = catch->next) | 4486 | for (catch = catchlist; catch; catch = catch->next) |
| 4477 | { | 4487 | { |
| 4478 | mark_object (catch->tag); | 4488 | mark_object (catch->tag); |
| @@ -4484,20 +4494,11 @@ returns nil, because real GC can't be done. */) | |||
| 4484 | mark_object (handler->var); | 4494 | mark_object (handler->var); |
| 4485 | } | 4495 | } |
| 4486 | mark_backtrace (); | 4496 | mark_backtrace (); |
| 4487 | mark_kboards (); | ||
| 4488 | mark_ttys (); | ||
| 4489 | 4497 | ||
| 4490 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | 4498 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES |
| 4491 | mark_stack (); | 4499 | mark_stack (); |
| 4492 | #endif | 4500 | #endif |
| 4493 | 4501 | ||
| 4494 | #ifdef USE_GTK | ||
| 4495 | { | ||
| 4496 | extern void xg_mark_data (); | ||
| 4497 | xg_mark_data (); | ||
| 4498 | } | ||
| 4499 | #endif | ||
| 4500 | |||
| 4501 | /* Everything is now marked, except for the things that require special | 4502 | /* Everything is now marked, except for the things that require special |
| 4502 | finalization, i.e. the undo_list. | 4503 | finalization, i.e. the undo_list. |
| 4503 | Look thru every buffer's undo list | 4504 | Look thru every buffer's undo list |
diff --git a/src/bytecode.c b/src/bytecode.c index 0d3be49877c..e8d006e67d1 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Execution of byte code produced by bytecomp.el. | 1 | /* Execution of byte code produced by bytecomp.el. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -387,6 +387,7 @@ unmark_byte_stack () | |||
| 387 | Vquit_flag = Qnil; \ | 387 | Vquit_flag = Qnil; \ |
| 388 | BEFORE_POTENTIAL_GC (); \ | 388 | BEFORE_POTENTIAL_GC (); \ |
| 389 | Fsignal (Qquit, Qnil); \ | 389 | Fsignal (Qquit, Qnil); \ |
| 390 | AFTER_POTENTIAL_GC (); \ | ||
| 390 | } \ | 391 | } \ |
| 391 | } while (0) | 392 | } while (0) |
| 392 | 393 | ||
| @@ -539,9 +540,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 539 | TOP = Qnil; | 540 | TOP = Qnil; |
| 540 | else | 541 | else |
| 541 | { | 542 | { |
| 542 | BEFORE_POTENTIAL_GC (); | 543 | wrong_type_argument (Qlistp, v1); |
| 543 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 544 | AFTER_POTENTIAL_GC (); | ||
| 545 | } | 544 | } |
| 546 | break; | 545 | break; |
| 547 | } | 546 | } |
| @@ -574,9 +573,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 574 | TOP = Qnil; | 573 | TOP = Qnil; |
| 575 | else | 574 | else |
| 576 | { | 575 | { |
| 577 | BEFORE_POTENTIAL_GC (); | 576 | wrong_type_argument (Qlistp, v1); |
| 578 | Fcdr (wrong_type_argument (Qlistp, v1)); | ||
| 579 | AFTER_POTENTIAL_GC (); | ||
| 580 | } | 577 | } |
| 581 | break; | 578 | break; |
| 582 | } | 579 | } |
| @@ -907,11 +904,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 907 | else if (!NILP (v1)) | 904 | else if (!NILP (v1)) |
| 908 | { | 905 | { |
| 909 | immediate_quit = 0; | 906 | immediate_quit = 0; |
| 910 | BEFORE_POTENTIAL_GC (); | 907 | wrong_type_argument (Qlistp, v1); |
| 911 | v1 = wrong_type_argument (Qlistp, v1); | ||
| 912 | AFTER_POTENTIAL_GC (); | ||
| 913 | immediate_quit = 1; | ||
| 914 | op++; | ||
| 915 | } | 908 | } |
| 916 | } | 909 | } |
| 917 | immediate_quit = 0; | 910 | immediate_quit = 0; |
| @@ -920,11 +913,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 920 | else if (NILP (v1)) | 913 | else if (NILP (v1)) |
| 921 | TOP = Qnil; | 914 | TOP = Qnil; |
| 922 | else | 915 | else |
| 923 | { | 916 | wrong_type_argument (Qlistp, v1); |
| 924 | BEFORE_POTENTIAL_GC (); | ||
| 925 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 926 | AFTER_POTENTIAL_GC (); | ||
| 927 | } | ||
| 928 | break; | 917 | break; |
| 929 | } | 918 | } |
| 930 | 919 | ||
| @@ -1554,11 +1543,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1554 | else if (!NILP (v1)) | 1543 | else if (!NILP (v1)) |
| 1555 | { | 1544 | { |
| 1556 | immediate_quit = 0; | 1545 | immediate_quit = 0; |
| 1557 | BEFORE_POTENTIAL_GC (); | 1546 | wrong_type_argument (Qlistp, v1); |
| 1558 | v1 = wrong_type_argument (Qlistp, v1); | ||
| 1559 | AFTER_POTENTIAL_GC (); | ||
| 1560 | immediate_quit = 1; | ||
| 1561 | op++; | ||
| 1562 | } | 1547 | } |
| 1563 | } | 1548 | } |
| 1564 | immediate_quit = 0; | 1549 | immediate_quit = 0; |
| @@ -1567,11 +1552,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1567 | else if (NILP (v1)) | 1552 | else if (NILP (v1)) |
| 1568 | TOP = Qnil; | 1553 | TOP = Qnil; |
| 1569 | else | 1554 | else |
| 1570 | { | 1555 | wrong_type_argument (Qlistp, v1); |
| 1571 | BEFORE_POTENTIAL_GC (); | ||
| 1572 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 1573 | AFTER_POTENTIAL_GC (); | ||
| 1574 | } | ||
| 1575 | } | 1556 | } |
| 1576 | else | 1557 | else |
| 1577 | { | 1558 | { |
diff --git a/src/fileio.c b/src/fileio.c index e95205d7489..9e86b6a9189 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* File IO for GNU Emacs. | 1 | /* File IO for GNU Emacs. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,96,97,98,99,2000,01,03,2004 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4329,7 +4329,7 @@ actually used. */) | |||
| 4329 | /* Replace the chars that we need to replace, | 4329 | /* Replace the chars that we need to replace, |
| 4330 | and update INSERTED to equal the number of bytes | 4330 | and update INSERTED to equal the number of bytes |
| 4331 | we are taking from the file. */ | 4331 | we are taking from the file. */ |
| 4332 | inserted -= (Z_BYTE - same_at_end) + (same_at_start - BEG_BYTE); | 4332 | inserted -= (ZV_BYTE - same_at_end) + (same_at_start - BEGV_BYTE); |
| 4333 | 4333 | ||
| 4334 | if (same_at_end != same_at_start) | 4334 | if (same_at_end != same_at_start) |
| 4335 | { | 4335 | { |
| @@ -4343,7 +4343,7 @@ actually used. */) | |||
| 4343 | } | 4343 | } |
| 4344 | /* Insert from the file at the proper position. */ | 4344 | /* Insert from the file at the proper position. */ |
| 4345 | SET_PT_BOTH (temp, same_at_start); | 4345 | SET_PT_BOTH (temp, same_at_start); |
| 4346 | insert_1 (conversion_buffer + same_at_start - BEG_BYTE, inserted, | 4346 | insert_1 (conversion_buffer + same_at_start - BEGV_BYTE, inserted, |
| 4347 | 0, 0, 0); | 4347 | 0, 0, 0); |
| 4348 | if (coding.cmp_data && coding.cmp_data->used) | 4348 | if (coding.cmp_data && coding.cmp_data->used) |
| 4349 | coding_restore_composition (&coding, Fcurrent_buffer ()); | 4349 | coding_restore_composition (&coding, Fcurrent_buffer ()); |
diff --git a/src/puresize.h b/src/puresize.h index 8088a374765..054b2bc4c89 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 47 | 47 | ||
| 48 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ | 48 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ |
| 49 | #ifndef PURESIZE_RATIO | 49 | #ifndef PURESIZE_RATIO |
| 50 | #if VALBITS + GCTYPEBITS + 1 > 32 | 50 | #if BITS_PER_EMACS_INT > 32 |
| 51 | #define PURESIZE_RATIO 9/5 /* Don't surround with `()'. */ | 51 | #define PURESIZE_RATIO 9/5 /* Don't surround with `()'. */ |
| 52 | #else | 52 | #else |
| 53 | #define PURESIZE_RATIO 1 | 53 | #define PURESIZE_RATIO 1 |
diff --git a/src/xfaces.c b/src/xfaces.c index 10b7ef1148c..5137ab7e721 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -388,6 +388,10 @@ Lisp_Object Qforeground_color, Qbackground_color; | |||
| 388 | Lisp_Object Qface; | 388 | Lisp_Object Qface; |
| 389 | extern Lisp_Object Qmouse_face; | 389 | extern Lisp_Object Qmouse_face; |
| 390 | 390 | ||
| 391 | /* Property for basic faces which other faces cannot inherit. */ | ||
| 392 | |||
| 393 | Lisp_Object Qface_no_inherit; | ||
| 394 | |||
| 391 | /* Error symbol for wrong_type_argument in load_pixmap. */ | 395 | /* Error symbol for wrong_type_argument in load_pixmap. */ |
| 392 | 396 | ||
| 393 | Lisp_Object Qbitmap_spec_p; | 397 | Lisp_Object Qbitmap_spec_p; |
| @@ -3868,8 +3872,11 @@ Value is a vector of face attributes. */) | |||
| 3868 | depend on the face, make sure they are all removed. This is done | 3872 | depend on the face, make sure they are all removed. This is done |
| 3869 | by incrementing face_change_count. The next call to | 3873 | by incrementing face_change_count. The next call to |
| 3870 | init_iterator will then free realized faces. */ | 3874 | init_iterator will then free realized faces. */ |
| 3871 | ++face_change_count; | 3875 | if (NILP (Fget (face, Qface_no_inherit))) |
| 3872 | ++windows_or_buffers_changed; | 3876 | { |
| 3877 | ++face_change_count; | ||
| 3878 | ++windows_or_buffers_changed; | ||
| 3879 | } | ||
| 3873 | 3880 | ||
| 3874 | xassert (LFACEP (lface)); | 3881 | xassert (LFACEP (lface)); |
| 3875 | check_lface (lface); | 3882 | check_lface (lface); |
| @@ -3944,8 +3951,11 @@ The value is TO. */) | |||
| 3944 | depend on the face, make sure they are all removed. This is done | 3951 | depend on the face, make sure they are all removed. This is done |
| 3945 | by incrementing face_change_count. The next call to | 3952 | by incrementing face_change_count. The next call to |
| 3946 | init_iterator will then free realized faces. */ | 3953 | init_iterator will then free realized faces. */ |
| 3947 | ++face_change_count; | 3954 | if (NILP (Fget (to, Qface_no_inherit))) |
| 3948 | ++windows_or_buffers_changed; | 3955 | { |
| 3956 | ++face_change_count; | ||
| 3957 | ++windows_or_buffers_changed; | ||
| 3958 | } | ||
| 3949 | 3959 | ||
| 3950 | return to; | 3960 | return to; |
| 3951 | } | 3961 | } |
| @@ -4302,6 +4312,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4302 | by incrementing face_change_count. The next call to | 4312 | by incrementing face_change_count. The next call to |
| 4303 | init_iterator will then free realized faces. */ | 4313 | init_iterator will then free realized faces. */ |
| 4304 | if (!EQ (frame, Qt) | 4314 | if (!EQ (frame, Qt) |
| 4315 | && NILP (Fget (face, Qface_no_inherit)) | ||
| 4305 | && (EQ (attr, QCfont) | 4316 | && (EQ (attr, QCfont) |
| 4306 | || NILP (Fequal (old_value, value)))) | 4317 | || NILP (Fequal (old_value, value)))) |
| 4307 | { | 4318 | { |
| @@ -4454,6 +4465,7 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4454 | struct frame *f; | 4465 | struct frame *f; |
| 4455 | Lisp_Object param, new_value; | 4466 | Lisp_Object param, new_value; |
| 4456 | { | 4467 | { |
| 4468 | Lisp_Object face = Qnil; | ||
| 4457 | Lisp_Object lface; | 4469 | Lisp_Object lface; |
| 4458 | 4470 | ||
| 4459 | /* If there are no faces yet, give up. This is the case when called | 4471 | /* If there are no faces yet, give up. This is the case when called |
| @@ -4462,17 +4474,10 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4462 | if (NILP (f->face_alist)) | 4474 | if (NILP (f->face_alist)) |
| 4463 | return; | 4475 | return; |
| 4464 | 4476 | ||
| 4465 | /* Changing a named face means that all realized faces depending on | ||
| 4466 | that face are invalid. Since we cannot tell which realized faces | ||
| 4467 | depend on the face, make sure they are all removed. This is done | ||
| 4468 | by incrementing face_change_count. The next call to | ||
| 4469 | init_iterator will then free realized faces. */ | ||
| 4470 | ++face_change_count; | ||
| 4471 | ++windows_or_buffers_changed; | ||
| 4472 | |||
| 4473 | if (EQ (param, Qforeground_color)) | 4477 | if (EQ (param, Qforeground_color)) |
| 4474 | { | 4478 | { |
| 4475 | lface = lface_from_face_name (f, Qdefault, 1); | 4479 | face = Qdefault; |
| 4480 | lface = lface_from_face_name (f, face, 1); | ||
| 4476 | LFACE_FOREGROUND (lface) = (STRINGP (new_value) | 4481 | LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
| 4477 | ? new_value : Qunspecified); | 4482 | ? new_value : Qunspecified); |
| 4478 | realize_basic_faces (f); | 4483 | realize_basic_faces (f); |
| @@ -4487,29 +4492,45 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4487 | XSETFRAME (frame, f); | 4492 | XSETFRAME (frame, f); |
| 4488 | call1 (Qframe_update_face_colors, frame); | 4493 | call1 (Qframe_update_face_colors, frame); |
| 4489 | 4494 | ||
| 4490 | lface = lface_from_face_name (f, Qdefault, 1); | 4495 | face = Qdefault; |
| 4496 | lface = lface_from_face_name (f, face, 1); | ||
| 4491 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4497 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4492 | ? new_value : Qunspecified); | 4498 | ? new_value : Qunspecified); |
| 4493 | realize_basic_faces (f); | 4499 | realize_basic_faces (f); |
| 4494 | } | 4500 | } |
| 4495 | if (EQ (param, Qborder_color)) | 4501 | else if (EQ (param, Qborder_color)) |
| 4496 | { | 4502 | { |
| 4497 | lface = lface_from_face_name (f, Qborder, 1); | 4503 | face = Qborder; |
| 4504 | lface = lface_from_face_name (f, face, 1); | ||
| 4498 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4505 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4499 | ? new_value : Qunspecified); | 4506 | ? new_value : Qunspecified); |
| 4500 | } | 4507 | } |
| 4501 | else if (EQ (param, Qcursor_color)) | 4508 | else if (EQ (param, Qcursor_color)) |
| 4502 | { | 4509 | { |
| 4503 | lface = lface_from_face_name (f, Qcursor, 1); | 4510 | face = Qcursor; |
| 4511 | lface = lface_from_face_name (f, face, 1); | ||
| 4504 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4512 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4505 | ? new_value : Qunspecified); | 4513 | ? new_value : Qunspecified); |
| 4506 | } | 4514 | } |
| 4507 | else if (EQ (param, Qmouse_color)) | 4515 | else if (EQ (param, Qmouse_color)) |
| 4508 | { | 4516 | { |
| 4509 | lface = lface_from_face_name (f, Qmouse, 1); | 4517 | face = Qmouse; |
| 4518 | lface = lface_from_face_name (f, face, 1); | ||
| 4510 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4519 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4511 | ? new_value : Qunspecified); | 4520 | ? new_value : Qunspecified); |
| 4512 | } | 4521 | } |
| 4522 | |||
| 4523 | /* Changing a named face means that all realized faces depending on | ||
| 4524 | that face are invalid. Since we cannot tell which realized faces | ||
| 4525 | depend on the face, make sure they are all removed. This is done | ||
| 4526 | by incrementing face_change_count. The next call to | ||
| 4527 | init_iterator will then free realized faces. */ | ||
| 4528 | if (!NILP (face) | ||
| 4529 | && NILP (Fget (face, Qface_no_inherit))) | ||
| 4530 | { | ||
| 4531 | ++face_change_count; | ||
| 4532 | ++windows_or_buffers_changed; | ||
| 4533 | } | ||
| 4513 | } | 4534 | } |
| 4514 | 4535 | ||
| 4515 | 4536 | ||
| @@ -7767,6 +7788,8 @@ syms_of_xfaces () | |||
| 7767 | { | 7788 | { |
| 7768 | Qface = intern ("face"); | 7789 | Qface = intern ("face"); |
| 7769 | staticpro (&Qface); | 7790 | staticpro (&Qface); |
| 7791 | Qface_no_inherit = intern ("face-no-inherit"); | ||
| 7792 | staticpro (&Qface_no_inherit); | ||
| 7770 | Qbitmap_spec_p = intern ("bitmap-spec-p"); | 7793 | Qbitmap_spec_p = intern ("bitmap-spec-p"); |
| 7771 | staticpro (&Qbitmap_spec_p); | 7794 | staticpro (&Qbitmap_spec_p); |
| 7772 | Qframe_update_face_colors = intern ("frame-update-face-colors"); | 7795 | Qframe_update_face_colors = intern ("frame-update-face-colors"); |