aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-11-24 23:15:28 -0800
committerPaul Eggert2015-11-24 23:17:20 -0800
commit36311ec8d12f88e5ad0a6a5ff845b0b307f4ea13 (patch)
tree4260462b8c16500ec81248dc3612b2f0f62174e3
parenta59071372884552279edf9c62bfb1aa558ec6db2 (diff)
downloademacs-36311ec8d12f88e5ad0a6a5ff845b0b307f4ea13.tar.gz
emacs-36311ec8d12f88e5ad0a6a5ff845b0b307f4ea13.zip
Disambiguate variable help a bit better
* lisp/help-fns.el (describe-variable): Quote the variable’s value if it is a symbol other than t or nil. See: T.V Raman in: http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02147.html
-rw-r--r--lisp/help-fns.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 41911b8709c..e750f51e0c4 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -763,8 +763,12 @@ it is displayed along with the global value."
763 (let ((from (point)) 763 (let ((from (point))
764 (line-beg (line-beginning-position)) 764 (line-beg (line-beginning-position))
765 (print-rep 765 (print-rep
766 (let ((print-quoted t)) 766 (let ((rep
767 (prin1-to-string val)))) 767 (let ((print-quoted t))
768 (prin1-to-string val))))
769 (if (and (symbolp val) (not (booleanp val)))
770 (format-message "`%s'" rep)
771 rep))))
768 (if (< (+ (length print-rep) (point) (- line-beg)) 68) 772 (if (< (+ (length print-rep) (point) (- line-beg)) 68)
769 (insert print-rep) 773 (insert print-rep)
770 (terpri) 774 (terpri)