]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'describe-variable' for longish variable values
authorEli Zaretskii <eliz@gnu.org>
Fri, 27 Jan 2017 10:27:50 +0000 (12:27 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 27 Jan 2017 10:27:50 +0000 (12:27 +0200)
* lisp/help-fns.el (describe-variable): Don't accidentally remove
the last character of a variable's value.  (Bug#25545)

lisp/help-fns.el

index edbcd9099d38db4d84d1d1ce2f37fdbf863091cc..742c66919af80a822f16f1885322dac63ca67d66 100644 (file)
@@ -852,7 +852,7 @@ it is displayed along with the global value."
                    (terpri)
                    (pp val)
                     ;; Remove trailing newline.
-                    (delete-char -1))
+                    (and (= (char-before) ?\n) (delete-char -1)))
                  (let* ((sv (get variable 'standard-value))
                         (origval (and (consp sv)
                                       (condition-case nil