emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 36311ec: Disambiguate variable help a bit better


From: Paul Eggert
Subject: [Emacs-diffs] emacs-25 36311ec: Disambiguate variable help a bit better
Date: Wed, 25 Nov 2015 07:17:25 +0000

branch: emacs-25
commit 36311ec8d12f88e5ad0a6a5ff845b0b307f4ea13
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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
---
 lisp/help-fns.el |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 41911b8..e750f51 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]