diff options
| author | Richard M. Stallman | 1998-11-29 15:41:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-11-29 15:41:38 +0000 |
| commit | abf16d5ee927e3efb2d777f8246cc61121a85121 (patch) | |
| tree | 4ddeea38d04989ec398cf06a049a1f38e74021a8 | |
| parent | 40b3bdc12b8b5364a0699450b9619cb0fd2344c5 (diff) | |
| download | emacs-abf16d5ee927e3efb2d777f8246cc61121a85121.tar.gz emacs-abf16d5ee927e3efb2d777f8246cc61121a85121.zip | |
(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." | |||
| 1748 | (beginning-of-line) | 1748 | (beginning-of-line) |
| 1749 | (set-window-start (selected-window) (point))) | 1749 | (set-window-start (selected-window) (point))) |
| 1750 | (setq enable-local-eval | 1750 | (setq enable-local-eval |
| 1751 | (y-or-n-p (format "Process `eval' or hook local variables in file %s? " | 1751 | (y-or-n-p (format "Process `eval' or hook local variables in %s? " |
| 1752 | (file-name-nondirectory buffer-file-name))))))))) | 1752 | (if buffer-file-name |
| 1753 | (concat "file " (file-name-nondirectory buffer-file-name)) | ||
| 1754 | (concat "buffer " (buffer-name))))))))))) | ||
| 1753 | (if (eq var 'eval) | 1755 | (if (eq var 'eval) |
| 1754 | (save-excursion (eval val)) | 1756 | (save-excursion (eval val)) |
| 1755 | (make-local-variable var) | 1757 | (make-local-variable var) |
| 1756 | (set var val)) | 1758 | (set var val)) |
| 1757 | (message "Ignoring `eval:' in file's local variables"))) | 1759 | (message "Ignoring `eval:' in the local variables list"))) |
| 1758 | ;; Ordinary variable, really set it. | 1760 | ;; Ordinary variable, really set it. |
| 1759 | (t (make-local-variable var) | 1761 | (t (make-local-variable var) |
| 1760 | (set var val)))) | 1762 | (set var val)))) |