Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.769 emacs/lisp/files.el:1.770
*** emacs/lisp/files.el:1.769 Sat May 14 00:56:30 2005
--- emacs/lisp/files.el Sat May 14 16:39:49 2005
***************
*** 2152,2158 ****
(goto-char beg)
end))))
! (defun hack-local-variables-confirm ()
(or (eq enable-local-variables t)
(and enable-local-variables
(save-window-excursion
--- 2152,2158 ----
(goto-char beg)
end))))
! (defun hack-local-variables-confirm (string)
(or (eq enable-local-variables t)
(and enable-local-variables
(save-window-excursion
***************
*** 2169,2176 ****
(save-excursion
(beginning-of-line)
(set-window-start (selected-window) (point)))
! (y-or-n-p (format "Set local variables as specified in -*- line of
%s? "
! (file-name-nondirectory buffer-file-name)))))))
(defun hack-local-variables-prop-line (&optional mode-only)
"Set local variables specified in the -*- line.
--- 2169,2178 ----
(save-excursion
(beginning-of-line)
(set-window-start (selected-window) (point)))
! (y-or-n-p (format string
! (if buffer-file-name
! (file-name-nondirectory buffer-file-name)
! (concat "buffer " (buffer-name)))))))))
(defun hack-local-variables-prop-line (&optional mode-only)
"Set local variables specified in the -*- line.
***************
*** 2226,2232 ****
(if mode-only mode-specified
(if (and result
(or mode-only
! (hack-local-variables-confirm)))
(let ((enable-local-eval enable-local-eval))
(while result
(hack-one-local-variable (car (car result)) (cdr (car result)))
--- 2228,2235 ----
(if mode-only mode-specified
(if (and result
(or mode-only
! (hack-local-variables-confirm
! "Set local variables as specified in -*- line of %s? ")))
(let ((enable-local-eval enable-local-eval))
(while result
(hack-one-local-variable (car (car result)) (cdr (car result)))
***************
*** 2256,2262 ****
(when (let ((case-fold-search t))
(and (search-forward "Local Variables:" nil t)
(or mode-only
! (hack-local-variables-confirm))))
(skip-chars-forward " \t")
(let ((enable-local-eval enable-local-eval)
;; suffix is what comes after "local variables:" in its line.
--- 2259,2266 ----
(when (let ((case-fold-search t))
(and (search-forward "Local Variables:" nil t)
(or mode-only
! (hack-local-variables-confirm
! "Set local variables as specified at end of %s? "))))
(skip-chars-forward " \t")
(let ((enable-local-eval enable-local-eval)
;; suffix is what comes after "local variables:" in its line.
***************
*** 2477,2483 ****
(hack-one-local-variable-eval-safep val))
;; Permit eval if not root and user says ok.
(and (not (zerop (user-uid)))
! (hack-local-variables-confirm)))
(if (eq var 'eval)
(save-excursion (eval val))
(make-local-variable var)
--- 2481,2488 ----
(hack-one-local-variable-eval-safep val))
;; Permit eval if not root and user says ok.
(and (not (zerop (user-uid)))
! (hack-local-variables-confirm
! "Process `eval' or hook local variables in %s? ")))
(if (eq var 'eval)
(save-excursion (eval val))
(make-local-variable var)
_______________________________________________
Emacs-diffs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-diffs