From 36311ec8d12f88e5ad0a6a5ff845b0b307f4ea13 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 24 Nov 2015 23:15:28 -0800 Subject: [PATCH] Disambiguate variable help a bit better MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 --- lisp/help-fns.el | 8 ++++++-- 1 file 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." (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) -- 2.39.5