changeset 23779:68c3d9e82bb7

(hack-one-local-variable): Cope with non-file buffers.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 Nov 1998 15:41:38 +0000
parents 9cee50f0ec56
children 49a68c55c3ac
files lisp/files.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sun Nov 29 00:56:49 1998 +0000
+++ b/lisp/files.el	Sun Nov 29 15:41:38 1998 +0000
@@ -1748,13 +1748,15 @@
 				   (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))))