]> code.delx.au - gnu-emacs/commitdiff
Disambiguate variable help a bit better
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Nov 2015 07:15:28 +0000 (23:15 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Nov 2015 07:17:20 +0000 (23:17 -0800)
* 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

index 41911b8709c4f6ae61b9d809985ba6ed5bc77396..e750f51e0c4b84f300dc5e8771419616a1498616 100644 (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)