aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorMichael Albinus2024-11-14 16:51:20 +0100
committerMichael Albinus2024-11-14 16:51:20 +0100
commit3e86231b54ffed7f242c334f96923cff376a197f (patch)
tree405194c854563194cd6d502ced8b249e7d8deb9d /src/buffer.c
parent32f070fa3dfccd29abad6e7566ed9121e3f1da39 (diff)
parentf69f54c454eb3c0f8ff8c55cfd2b7832ea1709cf (diff)
downloademacs-3e86231b54ffed7f242c334f96923cff376a197f.tar.gz
emacs-3e86231b54ffed7f242c334f96923cff376a197f.zip
Merge from origin/emacs-30
f69f54c454e Improve font-locking and indentation in 'php-ts-mode' 27aacbd172f Fix some 'lua-ts-mode' options (Bug#74235) a0613372a7b ; Update the xwidgets-on-NS text due to fixing bug#60703 d5928325045 Improve comment indenting in 'lua-ts-mode' 6bc44ccf287 Update 'xref-num-matches-found' when reverting *xref* buffer 8afcfed825a * lisp/files.el (require-with-check): Fix last fix (bug#7... 3496234c8ed lisp/files.el (require-with-check): Fix bug#74091. 90c97d3fac9 Fix handling of permanent-local variables in 'kill-all-lo... c96e5760907 Precise password cache in Tramp 3954e8d9bbe Fix picture-mode with full-width characters 7dabfe9465c Fix movement to the left in picture-mode # Conflicts: # lisp/net/tramp.el
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 90c5efdfbf7..2955ee6399b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -111,7 +111,7 @@ static int last_per_buffer_idx;
111static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, 111static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
112 bool after, Lisp_Object arg1, 112 bool after, Lisp_Object arg1,
113 Lisp_Object arg2, Lisp_Object arg3); 113 Lisp_Object arg2, Lisp_Object arg3);
114static void reset_buffer_local_variables (struct buffer *, bool); 114static void reset_buffer_local_variables (struct buffer *, int);
115 115
116/* Alist of all buffer names vs the buffers. This used to be 116/* Alist of all buffer names vs the buffers. This used to be
117 a Lisp-visible variable, but is no longer, to prevent lossage 117 a Lisp-visible variable, but is no longer, to prevent lossage
@@ -1110,10 +1110,11 @@ reset_buffer (register struct buffer *b)
1110 Instead, use Fkill_all_local_variables. 1110 Instead, use Fkill_all_local_variables.
1111 1111
1112 If PERMANENT_TOO, reset permanent buffer-local variables. 1112 If PERMANENT_TOO, reset permanent buffer-local variables.
1113 If not, preserve those. */ 1113 If not, preserve those. PERMANENT_TOO = 2 means ignore
1114 the permanent-local property of non-builtin variables. */
1114 1115
1115static void 1116static void
1116reset_buffer_local_variables (struct buffer *b, bool permanent_too) 1117reset_buffer_local_variables (struct buffer *b, int permanent_too)
1117{ 1118{
1118 int offset, i; 1119 int offset, i;
1119 1120
@@ -1139,7 +1140,7 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too)
1139 bset_invisibility_spec (b, Qt); 1140 bset_invisibility_spec (b, Qt);
1140 1141
1141 /* Reset all (or most) per-buffer variables to their defaults. */ 1142 /* Reset all (or most) per-buffer variables to their defaults. */
1142 if (permanent_too) 1143 if (permanent_too == 1)
1143 bset_local_var_alist (b, Qnil); 1144 bset_local_var_alist (b, Qnil);
1144 else 1145 else
1145 { 1146 {
@@ -1168,7 +1169,7 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too)
1168 swap_in_global_binding (XSYMBOL (sym)); 1169 swap_in_global_binding (XSYMBOL (sym));
1169 } 1170 }
1170 1171
1171 if (!NILP (prop)) 1172 if (!NILP (prop) && !permanent_too)
1172 { 1173 {
1173 /* If permanent-local, keep it. */ 1174 /* If permanent-local, keep it. */
1174 last = tmp; 1175 last = tmp;
@@ -3006,7 +3007,7 @@ the normal hook `change-major-mode-hook'. */)
3006 3007
3007 /* Actually eliminate all local bindings of this buffer. */ 3008 /* Actually eliminate all local bindings of this buffer. */
3008 3009
3009 reset_buffer_local_variables (current_buffer, !NILP (kill_permanent)); 3010 reset_buffer_local_variables (current_buffer, !NILP (kill_permanent) ? 2 : 0);
3010 3011
3011 /* Force mode-line redisplay. Useful here because all major mode 3012 /* Force mode-line redisplay. Useful here because all major mode
3012 commands call this function. */ 3013 commands call this function. */