Mercurial > emacs
comparison lisp/files-x.el @ 105555:627cf97fdea2
(read-file-local-variable-value):
Provide default value only for bound variables.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 11 Oct 2009 23:50:38 +0000 |
parents | 1bfde4a3bd05 |
children | 2586fdd484bd |
comparison
equal
deleted
inserted
replaced
105554:59dc4314dfa4 | 105555:627cf97fdea2 |
---|---|
90 (t | 90 (t |
91 (read (read-string (format "Add %s with value: " variable) | 91 (read (read-string (format "Add %s with value: " variable) |
92 nil 'set-variable-value-history | 92 nil 'set-variable-value-history |
93 (format "%S" | 93 (format "%S" |
94 (cond ((eq variable 'unibyte) t) | 94 (cond ((eq variable 'unibyte) t) |
95 (t (symbol-value variable)))))))))) | 95 ((boundp variable) |
96 (symbol-value variable)))))))))) | |
96 | 97 |
97 (defun read-file-local-variable-mode () | 98 (defun read-file-local-variable-mode () |
98 "Read per-directory file-local variable's mode using completion. | 99 "Read per-directory file-local variable's mode using completion. |
99 Intended to be used in the `interactive' spec of | 100 Intended to be used in the `interactive' spec of |
100 `add-dir-local-variable', `delete-dir-local-variable'." | 101 `add-dir-local-variable', `delete-dir-local-variable'." |