diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-11-29 15:41:38 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-11-29 15:41:38 +0000 |
commit | abf16d5ee927e3efb2d777f8246cc61121a85121 (patch) | |
tree | 4ddeea38d04989ec398cf06a049a1f38e74021a8 | |
parent | 40b3bdc12b8b5364a0699450b9619cb0fd2344c5 (diff) | |
download | emacs-abf16d5ee927e3efb2d777f8246cc61121a85121.tar.gz |
(hack-one-local-variable): Cope with non-file buffers.
-rw-r--r-- | lisp/files.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index 92135d94714..25fb4a7443e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1748,13 +1748,15 @@ is specified, returning t if it is specified." (beginning-of-line) (set-window-start (selected-window) (point))) (setq enable-local-eval - (y-or-n-p (format "Process `eval' or hook local variables in file %s? " - (file-name-nondirectory buffer-file-name))))))))) + (y-or-n-p (format "Process `eval' or hook local variables in %s? " + (if buffer-file-name + (concat "file " (file-name-nondirectory buffer-file-name)) + (concat "buffer " (buffer-name))))))))))) (if (eq var 'eval) (save-excursion (eval val)) (make-local-variable var) (set var val)) - (message "Ignoring `eval:' in file's local variables"))) + (message "Ignoring `eval:' in the local variables list"))) ;; Ordinary variable, really set it. (t (make-local-variable var) (set var val)))) |