GNU bug report logs - #1169
23.0.60; (substitute-command-keys "\\{...}") adds extra newline

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 14 Oct 2008 22:55:04 UTC

Severity: minor

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Johan Bockgård <bojohan <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: cyd <at> gnu.org, Drew Adams <drew.adams <at> oracle.com>, 1169 <at> debbugs.gnu.org
Subject: bug#1169: 23.0.60; (substitute-command-keys "\\{...}") adds extra newline
Date: Tue, 29 May 2012 19:44:58 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> "Drew Adams" <drew.adams <at> oracle.com> writes:
>
>> (substitute-command-keys "\\{minibuffer-local-map}") ; or another map
>>
>> The returned string ends in \n\n. It should end in just \n.
[...]

> I've now made the change,

This change breaks the highlighting code in `help-make-xrefs' which
assumes that a list of key bindings produced by substitute-command-keys
(in `documentation') ends with an extra blank line:

    (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
                              nil t)
      (let ((col (- (match-end 1) (match-beginning 1))))
        (while
            (and (not (eobp))
                 ;; Stop at a pair of blank lines.
                 (not (looking-at "\n\\s-*\n")))

Example:

   emacs -Q
   C-h m
   C-x o
   M->

Note the highlighted "or"s in the last two paragraphs.




This bug report was last modified 13 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.