mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-22 12:33:53 -08:00
Make variables 'left-margin-columns' and 'right-margin-columns' buffer-local
* src/xdisp.c (handle_single_display_spec): Use FIXNATP for margin column. Also use 'Vleft_margin_columns' instead of 'Fsymbol_value' (bug#80025). (left-margin-columns, right-margin-columns): Use Fmake_variable_buffer_local.
This commit is contained in:
parent
996b2304e5
commit
3ff8f30f83
1 changed files with 7 additions and 6 deletions
13
src/xdisp.c
13
src/xdisp.c
|
|
@ -6410,13 +6410,12 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
|||
&& (tem = XCDR (tem), CONSP (tem))
|
||||
&& (tem = XCAR (tem), !NILP (tem)))
|
||||
{
|
||||
if (FIXNUMP (tem) && XFIXNUM (tem) >= 0)
|
||||
if (FIXNATP (tem))
|
||||
margin_column = (int) XFIXNUM (tem);
|
||||
else if (SYMBOLP (tem))
|
||||
{
|
||||
Lisp_Object columns_list = Fsymbol_value
|
||||
(EQ (location, Qleft_margin)
|
||||
? Qleft_margin_columns : Qright_margin_columns);
|
||||
Lisp_Object columns_list = EQ (location, Qleft_margin)
|
||||
? Vleft_margin_columns : Vright_margin_columns;
|
||||
int pos = 0;
|
||||
for (Lisp_Object tail = columns_list; CONSP (tail);
|
||||
tail = XCDR (tail), pos++)
|
||||
|
|
@ -39015,7 +39014,6 @@ The recommended non-zero value is between 100000 and 1000000,
|
|||
depending on your patience and the speed of your system. */);
|
||||
max_redisplay_ticks = 0;
|
||||
|
||||
DEFSYM (Qleft_margin_columns, "left-margin-columns");
|
||||
DEFVAR_LISP ("left-margin-columns", Vleft_margin_columns,
|
||||
doc: /* List of symbols for left margin columns.
|
||||
Each symbol represents a mode that displays indicators in the left margin.
|
||||
|
|
@ -39027,8 +39025,9 @@ flymake indicators appear in column 0, outline in column 1, and hideshow
|
|||
in column 2. Modes can use their symbol in a display spec like
|
||||
((margin left-margin flymake) \">\") instead of a numeric column. */);
|
||||
Vleft_margin_columns = Qnil;
|
||||
DEFSYM (Qleft_margin_columns, "left-margin-columns");
|
||||
Fmake_variable_buffer_local (Qleft_margin_columns);
|
||||
|
||||
DEFSYM (Qright_margin_columns, "right-margin-columns");
|
||||
DEFVAR_LISP ("right-margin-columns", Vright_margin_columns,
|
||||
doc: /* List of symbols for right margin columns.
|
||||
Each symbol represents a mode that displays indicators in the right margin.
|
||||
|
|
@ -39037,6 +39036,8 @@ where that mode's margin indicators appear.
|
|||
|
||||
See `left-margin-columns' for more details. */);
|
||||
Vright_margin_columns = Qnil;
|
||||
DEFSYM (Qright_margin_columns, "right-margin-columns");
|
||||
Fmake_variable_buffer_local (Qright_margin_columns);
|
||||
|
||||
/* Called by decode_mode_spec. */
|
||||
DEFSYM (Qfile_remote_p, "file-remote-p");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue