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
This commit is contained in:
Paul Eggert 2015-11-24 23:15:28 -08:00
parent a590713728
commit 36311ec8d1

View file

@ -763,8 +763,12 @@ it is displayed along with the global value."
(let ((from (point))
(line-beg (line-beginning-position))
(print-rep
(let ((print-quoted t))
(prin1-to-string val))))
(let ((rep
(let ((print-quoted t))
(prin1-to-string val))))
(if (and (symbolp val) (not (booleanp val)))
(format-message "`%s'" rep)
rep))))
(if (< (+ (length print-rep) (point) (- line-beg)) 68)
(insert print-rep)
(terpri)