]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval.
authorJuri Linkov <juri@linkov.net>
Sun, 3 Nov 2019 21:52:23 +0000 (23:52 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 3 Nov 2019 21:52:23 +0000 (23:52 +0200)
lisp/help-fns.el

index 235aa9a6e19dfceaafd80c8ef51852391b1f4dd9..14dea7de9b704e316c53420f26297331fc1ec1cc 100644 (file)
@@ -1018,7 +1018,11 @@ it is displayed along with the global value."
                                (not (equal origval :help-eval-error)))
                      (princ "\nOriginal value was \n")
                      (setq from (point))
-                      (cl-prin1 origval)
+                     (if (and (symbolp origval) (not (booleanp origval)))
+                         (let* ((rep (cl-prin1-to-string origval))
+                                (print-rep (format-message "`%s'" rep)))
+                           (insert print-rep))
+                       (cl-prin1 origval))
                       (save-restriction
                         (narrow-to-region from (point))
                         (save-excursion (pp-buffer)))