From: Eli Zaretskii Date: Fri, 27 Jan 2017 10:27:50 +0000 (+0200) Subject: Fix 'describe-variable' for longish variable values X-Git-Tag: emacs-26.0.90~870^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90c76346740c097063b4a273ceb3af01327ff2a4;p=emacs.git Fix 'describe-variable' for longish variable values * lisp/help-fns.el (describe-variable): Don't accidentally remove the last character of a variable's value. (Bug#25545) --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index edbcd9099d3..742c66919af 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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