From 3c505d3124b1510f4b904e570c6198e88ce59dc5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 17 Dec 2010 19:38:22 +0800 Subject: [PATCH] * lisp/help-fns.el (describe-variable): Don't emit trailing whitespace (Bug#7511). --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 14 +++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d3b38bba11..6002c388e90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-17 Chong Yidong + + * help-fns.el (describe-variable): Don't emit trailing whitespace + (Bug#7511). + 2010-12-17 Leo * eshell/em-hist.el (eshell-previous-matching-input): Signal error diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 18db4f443f6..5743e1f6019 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -632,21 +632,17 @@ it is displayed along with the global value." (if valvoid (princ " is void as a variable.") (princ "'s ")))) - (if valvoid - nil + (unless valvoid (with-current-buffer standard-output (setq val-start-pos (point)) (princ "value is ") - (terpri) (let ((from (point))) + (terpri) (pp val) - ;; Hyperlinks in variable's value are quite frequently - ;; inappropriate e.g C-h v features - ;; (help-xref-on-pp from (point)) - (if (< (point) (+ from 20)) - (delete-region (1- from) from))))) + (if (< (point) (- 68 (line-beginning-position -1))) + (delete-region from (1+ from)) + (delete-region (1- from) from))))) (terpri) - (when locus (if (bufferp locus) (princ (format "%socal in buffer %s; " -- 2.39.2