mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 19:10:37 -08:00
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
This commit is contained in:
commit
d235ca2ff8
391 changed files with 17127 additions and 9185 deletions
40
src/buffer.c
40
src/buffer.c
|
|
@ -153,6 +153,7 @@ Lisp_Object Qucs_set_table_for_input;
|
|||
int inhibit_modification_hooks;
|
||||
|
||||
Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
|
||||
Lisp_Object Qpermanent_local_hook;
|
||||
|
||||
Lisp_Object Qprotected_field;
|
||||
|
||||
|
|
@ -762,13 +763,38 @@ reset_buffer_local_variables (b, permanent_too)
|
|||
b->local_var_alist = Qnil;
|
||||
else
|
||||
{
|
||||
Lisp_Object tmp, last = Qnil;
|
||||
Lisp_Object tmp, prop, last = Qnil;
|
||||
for (tmp = b->local_var_alist; CONSP (tmp); tmp = XCDR (tmp))
|
||||
if (CONSP (XCAR (tmp))
|
||||
&& SYMBOLP (XCAR (XCAR (tmp)))
|
||||
&& !NILP (Fget (XCAR (XCAR (tmp)), Qpermanent_local)))
|
||||
/* If permanent-local, keep it. */
|
||||
last = tmp;
|
||||
&& !NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local)))
|
||||
{
|
||||
/* If permanent-local, keep it. */
|
||||
last = tmp;
|
||||
if (EQ (prop, Qpermanent_local_hook))
|
||||
{
|
||||
/* This is a partially permanent hook variable.
|
||||
Preserve only the elements that want to be preserved. */
|
||||
Lisp_Object list, newlist;
|
||||
list = XCDR (XCAR (tmp));
|
||||
if (!CONSP (list))
|
||||
newlist = list;
|
||||
else
|
||||
for (newlist = Qnil; CONSP (list); list = XCDR (list))
|
||||
{
|
||||
Lisp_Object elt = XCAR (list);
|
||||
/* Preserve element ELT if it's t,
|
||||
if it is a function with a `permanent-local-hook' property,
|
||||
or if it's not a symbol. */
|
||||
if (! SYMBOLP (elt)
|
||||
|| EQ (elt, Qt)
|
||||
|| !NILP (Fget (elt, Qpermanent_local_hook)))
|
||||
newlist = Fcons (elt, newlist);
|
||||
}
|
||||
XSETCDR (XCAR (tmp), Fnreverse (newlist));
|
||||
}
|
||||
}
|
||||
/* Delete this local variable. */
|
||||
else if (NILP (last))
|
||||
b->local_var_alist = XCDR (tmp);
|
||||
else
|
||||
|
|
@ -5308,6 +5334,8 @@ syms_of_buffer ()
|
|||
staticpro (&Vbuffer_alist);
|
||||
staticpro (&Qprotected_field);
|
||||
staticpro (&Qpermanent_local);
|
||||
Qpermanent_local_hook = intern ("permanent-local-hook");
|
||||
staticpro (&Qpermanent_local_hook);
|
||||
staticpro (&Qkill_buffer_hook);
|
||||
Qoverlayp = intern ("overlayp");
|
||||
staticpro (&Qoverlayp);
|
||||
|
|
@ -5335,6 +5363,7 @@ syms_of_buffer ()
|
|||
staticpro (&Qbefore_change_functions);
|
||||
Qafter_change_functions = intern ("after-change-functions");
|
||||
staticpro (&Qafter_change_functions);
|
||||
/* The next one is initialized in init_buffer_once. */
|
||||
staticpro (&Qucs_set_table_for_input);
|
||||
|
||||
Qkill_buffer_query_functions = intern ("kill-buffer-query-functions");
|
||||
|
|
@ -5575,7 +5604,8 @@ its hooks should not expect certain variables such as
|
|||
|
||||
DEFVAR_PER_BUFFER ("mode-name", ¤t_buffer->mode_name,
|
||||
Qnil,
|
||||
doc: /* Pretty name of current buffer's major mode (a string). */);
|
||||
doc: /* Pretty name of current buffer's major mode.
|
||||
Usually a string. See `mode-line-format' for other possible forms. */);
|
||||
|
||||
DEFVAR_PER_BUFFER ("local-abbrev-table", ¤t_buffer->abbrev_table, Qnil,
|
||||
doc: /* Local (mode-specific) abbrev table of current buffer. */);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue