]> git.eshelyaron.com Git - emacs.git/commitdiff
Use cl-print for all values printed by `describe-variable'
authorNoam Postavsky <npostavs@gmail.com>
Wed, 30 Aug 2017 01:59:42 +0000 (21:59 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 30 Aug 2017 02:58:51 +0000 (22:58 -0400)
* lisp/help-fns.el (describe-variable): Use cl-prin1 for original and
global values too.

lisp/help-fns.el

index cb0b2d71d3375bdde3ec0c25a39d03c08cd9ad43..15b2c07ba2f434fe6290bbe3d83c3673d0cdeffd 100644 (file)
@@ -883,7 +883,10 @@ it is displayed along with the global value."
                                (not (equal origval :help-eval-error)))
                      (princ "\nOriginal value was \n")
                      (setq from (point))
-                     (pp origval)
+                      (cl-prin1 origval)
+                      (save-restriction
+                        (narrow-to-region from (point))
+                        (save-excursion (pp-buffer)))
                      (if (< (point) (+ from 20))
                          (delete-region (1- from) from)))))))
            (terpri)
@@ -909,7 +912,10 @@ it is displayed along with the global value."
                      ;; probably print it raw once and check it's a
                      ;; sensible size before prettyprinting.  -- fx
                      (let ((from (point)))
-                       (pp global-val)
+                        (cl-prin1 global-val)
+                        (save-restriction
+                          (narrow-to-region from (point))
+                          (save-excursion (pp-buffer)))
                        ;; See previous comment for this function.
                        ;; (help-xref-on-pp from (point))
                        (if (< (point) (+ from 20))