aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-12-29 11:29:18 +0000
committerRichard M. Stallman2003-12-29 11:29:18 +0000
commit7abd90ea9841ef2a09c1226dd3163b15e617d6b3 (patch)
treed5eb343a29e87573d76707d04429542f545d7820 /src
parentdea7e2ba8497d12ccbaf648253a10573220516b6 (diff)
downloademacs-7abd90ea9841ef2a09c1226dd3163b15e617d6b3.tar.gz
emacs-7abd90ea9841ef2a09c1226dd3163b15e617d6b3.zip
(store_symval_forwarding): Handle setting default-fill-column, etc.,
by changing buffers that use the default.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog21
-rw-r--r--src/data.c32
2 files changed, 53 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 119a849ba8d..17135ca34c7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12003-12-29 Richard M. Stallman <rms@gnu.org>
2
3 * data.c (store_symval_forwarding): Handle setting
4 default-fill-column, etc., by changing the value in
5 buffers that use the default.
6
7 * minibuf.c (Fset_minibuffer_window): Doc fix.
8
9 * fileio.c (choose_write_coding_system): Ignore auto_saving
10 if using the visited file for auto saves.
11 (Fwrite_region): Don't update SAVE_MODIFF
12 if auto-saving in visited file.
13
12003-12-29 Kenichi Handa <handa@m17n.org> 142003-12-29 Kenichi Handa <handa@m17n.org>
2 15
3 * dispextern.h (face_font_available_p): Extern it. 16 * dispextern.h (face_font_available_p): Extern it.
@@ -16,6 +29,14 @@
16 29
17 * xfaces.c (face_font_available_p): New function. 30 * xfaces.c (face_font_available_p): New function.
18 31
322003-12-28 Richard M. Stallman <rms@gnu.org>
33
34 * buffer.c (Fother_buffer): Don't crash if BUF is nil
35 or if its name is nil.
36
37 * buffer.c (Fkill_buffer): Don't delete auto-save file
38 if it's the same as the visited file.
39
192003-12-28 Luc Teirlinck <teirllm@auburn.edu> 402003-12-28 Luc Teirlinck <teirllm@auburn.edu>
20 41
21 * coding.c (Fcheck_coding_system): Doc fix. 42 * coding.c (Fcheck_coding_system): Doc fix.
diff --git a/src/data.c b/src/data.c
index a246271c1f6..c4e3937f3fa 100644
--- a/src/data.c
+++ b/src/data.c
@@ -873,6 +873,8 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
873 register Lisp_Object valcontents, newval; 873 register Lisp_Object valcontents, newval;
874 struct buffer *buf; 874 struct buffer *buf;
875{ 875{
876 int offset;
877
876 switch (SWITCH_ENUM_CAST (XTYPE (valcontents))) 878 switch (SWITCH_ENUM_CAST (XTYPE (valcontents)))
877 { 879 {
878 case Lisp_Misc: 880 case Lisp_Misc:
@@ -892,6 +894,36 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
892 894
893 case Lisp_Misc_Objfwd: 895 case Lisp_Misc_Objfwd:
894 *XOBJFWD (valcontents)->objvar = newval; 896 *XOBJFWD (valcontents)->objvar = newval;
897
898 /* If this variable is a default for something stored
899 in the buffer itself, such as default-fill-column,
900 find the buffers that don't have local values for it
901 and update them. */
902 if (XOBJFWD (valcontents)->objvar > (Lisp_Object *) &buffer_defaults
903 && XOBJFWD (valcontents)->objvar < (Lisp_Object *) (&buffer_defaults + 1))
904 {
905 int offset = ((char *) XOBJFWD (valcontents)->objvar
906 - (char *) &buffer_defaults);
907 int idx = PER_BUFFER_IDX (offset);
908
909 Lisp_Object tail, buf;
910
911 if (idx <= 0)
912 break;
913
914 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
915 {
916 Lisp_Object buf;
917 struct buffer *b;
918
919 buf = Fcdr (XCAR (tail));
920 if (!BUFFERP (buf)) continue;
921 b = XBUFFER (buf);
922
923 if (! PER_BUFFER_VALUE_P (b, idx))
924 PER_BUFFER_VALUE (b, offset) = newval;
925 }
926 }
895 break; 927 break;
896 928
897 case Lisp_Misc_Buffer_Objfwd: 929 case Lisp_Misc_Buffer_Objfwd: