1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

*** empty log message ***

This commit is contained in:
Richard M. Stallman 1992-06-23 21:48:27 +00:00
parent fd7b67ea6e
commit d207b766c8
2 changed files with 29 additions and 20 deletions

View File

@ -171,11 +171,14 @@ nil means they are ignored; anything else means query.
The command \\[normal-mode] always obeys local-variables lists The command \\[normal-mode] always obeys local-variables lists
and ignores this variable.") and ignores this variable.")
(defconst ignore-local-eval nil (defconst enable-local-eval nil
"*Non-nil means ignore the \"variable\" `eval' in a file's local variables. "*Control processing of the \"variable\" `eval' in a file's local variables.
This applies when the local-variables list is scanned automatically The value can be t, nil or something else.
after you find a file. If you explicitly request such a scan with A value of t means obey `eval' variables;
\\[normal-mode], there is no query, regardless of this variable.") nil means ignore them; anything else means query.
The command \\[normal-mode] always obeys local-variables lists
and ignores this variable.")
;; Avoid losing in versions where CLASH_DETECTION is disabled. ;; Avoid losing in versions where CLASH_DETECTION is disabled.
(or (fboundp 'lock-buffer) (or (fboundp 'lock-buffer)
@ -644,10 +647,18 @@ for current buffer."
(funcall (intern (concat (downcase (symbol-name val)) (funcall (intern (concat (downcase (symbol-name val))
"-mode")))) "-mode"))))
((eq var 'eval) ((eq var 'eval)
(if (or ignore-local-eval (if (and (not (string= (user-login-name) "root"))
(string= (user-login-name) "root")) (or (eq enable-local-eval t)
(message "Ignoring `eval:' in file's local variables") (and enable-local-eval
(save-excursion (eval val)))) (save-window-excursion
(switch-to-buffer (current-buffer))
(save-excursion
(beginning-of-line)
(set-window-start (selected-window) (point)))
(y-or-n-p (format "Process `eval' local variable in file %s? "
(file-name-nondirectory buffer-file-name)))))))
(save-excursion (eval val))
(message "Ignoring `eval:' in file's local variables")))
(t (make-local-variable var) (t (make-local-variable var)
(set var val)))))))))) (set var val))))))))))

View File

@ -540,12 +540,13 @@ See also `set-window-buffer-dedicated'.")
return decode_window (window)->dedicated; return decode_window (window)->dedicated;
} }
DEFUN ("set-window-buffer-dedicated", Fset_window_buffer_dedicated, DEFUN ("set-window-dedicated-p", Fset_window_dedicated_p,
Sset_window_buffer_dedicated, 2, 2, 0, Sset_window_dedicated_p, 2, 2, 0,
"Make WINDOW display BUFFER and be dedicated to that buffer.\n\ "Control whether WINDOW is dedicated to the buffer it displays.\n\
Then Emacs will not automatically change which buffer appears in WINDOW.\n\ If it is dedicated, Emacs will not automatically change\n\
If BUFFER is nil, make WINDOW not be dedicated (but don't change which\n\ which buffer appears in it.\n\
buffer appears in it currently).") The second argument is the new value for the dedication flag;\n\
non-nil means yes.")
(window, arg) (window, arg)
Lisp_Object window, arg; Lisp_Object window, arg;
{ {
@ -554,10 +555,7 @@ buffer appears in it currently).")
if (NILP (arg)) if (NILP (arg))
w->dedicated = Qnil; w->dedicated = Qnil;
else else
{ w->dedicated = Qt;
Fset_window_buffer (window, Fget_buffer_create (arg));
w->dedicated = Qt;
}
return w->dedicated; return w->dedicated;
} }
@ -2752,7 +2750,7 @@ If there is only one window, it is split regardless of this value.");
defsubr (&Sset_window_point); defsubr (&Sset_window_point);
defsubr (&Sset_window_start); defsubr (&Sset_window_start);
defsubr (&Swindow_dedicated_p); defsubr (&Swindow_dedicated_p);
defsubr (&Sset_window_buffer_dedicated); defsubr (&Sset_window_dedicated_p);
defsubr (&Swindow_display_table); defsubr (&Swindow_display_table);
defsubr (&Sset_window_display_table); defsubr (&Sset_window_display_table);
defsubr (&Snext_window); defsubr (&Snext_window);