GNU bug report logs -
#7511
24.0.50; describe-variable trailing whitespace minor bug
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Sun, 28 Nov 2010 23:06:02 UTC
Severity: minor
Found in version 24.0.50
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2010-12-17 11:38 +0000, Chong Yidong wrote:
> jidanni <at> 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
This bug report was last modified 14 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.