Commit 7abd90ea authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(store_symval_forwarding): Handle setting default-fill-column, etc.,

by changing buffers that use the default.
parent dea7e2ba
2003-12-29 Richard M. Stallman <rms@gnu.org>
* data.c (store_symval_forwarding): Handle setting
default-fill-column, etc., by changing the value in
buffers that use the default.
* minibuf.c (Fset_minibuffer_window): Doc fix.
* fileio.c (choose_write_coding_system): Ignore auto_saving
if using the visited file for auto saves.
(Fwrite_region): Don't update SAVE_MODIFF
if auto-saving in visited file.
2003-12-29 Kenichi Handa <handa@m17n.org>
* dispextern.h (face_font_available_p): Extern it.
......@@ -16,6 +29,14 @@
* xfaces.c (face_font_available_p): New function.
2003-12-28 Richard M. Stallman <rms@gnu.org>
* buffer.c (Fother_buffer): Don't crash if BUF is nil
or if its name is nil.
* buffer.c (Fkill_buffer): Don't delete auto-save file
if it's the same as the visited file.
2003-12-28 Luc Teirlinck <teirllm@auburn.edu>
* coding.c (Fcheck_coding_system): Doc fix.
......
......@@ -873,6 +873,8 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
register Lisp_Object valcontents, newval;
struct buffer *buf;
{
int offset;
switch (SWITCH_ENUM_CAST (XTYPE (valcontents)))
{
case Lisp_Misc:
......@@ -892,6 +894,36 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
case Lisp_Misc_Objfwd:
*XOBJFWD (valcontents)->objvar = newval;
/* If this variable is a default for something stored
in the buffer itself, such as default-fill-column,
find the buffers that don't have local values for it
and update them. */
if (XOBJFWD (valcontents)->objvar > (Lisp_Object *) &buffer_defaults
&& XOBJFWD (valcontents)->objvar < (Lisp_Object *) (&buffer_defaults + 1))
{
int offset = ((char *) XOBJFWD (valcontents)->objvar
- (char *) &buffer_defaults);
int idx = PER_BUFFER_IDX (offset);
Lisp_Object tail, buf;
if (idx <= 0)
break;
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object buf;
struct buffer *b;
buf = Fcdr (XCAR (tail));
if (!BUFFERP (buf)) continue;
b = XBUFFER (buf);
if (! PER_BUFFER_VALUE_P (b, idx))
PER_BUFFER_VALUE (b, offset) = newval;
}
}
break;
case Lisp_Misc_Buffer_Objfwd:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment