]> git.eshelyaron.com Git - emacs.git/commitdiff
(hack-one-local-variable): Cope with non-file buffers.
authorRichard M. Stallman <rms@gnu.org>
Sun, 29 Nov 1998 15:41:38 +0000 (15:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 29 Nov 1998 15:41:38 +0000 (15:41 +0000)
lisp/files.el

index 92135d947145b55fc01f28cafa772d163a114bf8..25fb4a7443ea57ad2c8ae700c4194d93154cfd02 100644 (file)
@@ -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))))