[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7511: 24.0.50; describe-variable trailing whitespace minor bug
From: |
Leo |
Subject: |
bug#7511: 24.0.50; describe-variable trailing whitespace minor bug |
Date: |
Sun, 19 Dec 2010 07:15:00 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (Mac OS X 10.6.5) |
On 2010-12-17 11:38 +0000, Chong Yidong wrote:
> jidanni@jidanni.org writes:
>
>> (setq show-trailing-whitespace t)
>> (setq bla "1234567890")
>> (describe-variable 'bla) ; output looks good
>> (setq bla "12345678901234567890")
>> (describe-variable 'bla) ; ouptut now on second line (odd, though plenty of
>> room left on first line, but never mind that), with trailing
>> whitespace on first line.
>
> Fixed, thanks.
(line-beginning-position -1) actually moves backwards two lines, which
is really unintuitive (BTW it should be brought in line with
forward-line). So with Yidong's fix all standard variables are printed
on a newline. See C-h v fill-column.
The following patch fixes typo in the fix.
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index a6cf2b4..250c4b9 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -643,7 +643,7 @@ it is displayed along with the global value."
(let ((from (point)))
(terpri)
(pp val)
- (if (< (point) (- 68 (line-beginning-position -1)))
+ (if (< (point) (+ 68 (line-beginning-position 0)))
(delete-region from (1+ from))
(delete-region (1- from) from)))))
(terpri)
--
Oracle is the new evil