GNU bug report logs -
#41888
27.0.91; fix ACTION argument of display-buffer
Previous Next
Reported by: emacs18 <at> gmail.com
Date: Tue, 16 Jun 2020 06:31:01 UTC
Severity: normal
Found in version 27.0.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Let me explain my understanding of the problem and my rationale for the
patch I emailed to emacs list.
Emacs 27 has the following code in `gud.el' starting around line 2622:
,----
| (display-buffer
| (get-buffer-create (concat "*gud" filepart "*"))
| '(display-buffer-reuse-window
| display-buffer-in-previous-window
| display-buffer-same-window display-buffer-pop-up-window))
`----
The patch I emailed to emacs list is to add extra pair of parenthesis
like this:
,----
| (display-buffer
| (get-buffer-create (concat "*gud" filepart "*"))
| '((display-buffer-reuse-window
| display-buffer-in-previous-window
| display-buffer-same-window display-buffer-pop-up-window)))
`----
The change affects the second argument passed to `display-buffer'
function, i.e., the `ACTION' argument. The doc-string for this argument
is quoted here:
Optional argument ACTION, if non-nil, should specify a
buffer display action of the form (FUNCTIONS . ALIST).
FUNCTIONS is either an "action function" or a possibly empty
list of action functions. ALIST is a possibly empty "action
alist".
The question is the syntax of `FUNCTIONS' portion of `ACTION' argument.
The doc-string clearly says that `FUNCITONS' is either a function or a
list of functions. If `FUNCTIONS' is a list such as `(f1 f2 f3)', then
`ACTION' should be something like `((f1 f2 f3))' assuming that `ALIST'
is `nil'. Well the list of functions is surrounded by two pairs of
parenthesis rather than one pair.
This observation along with the fact that adding the extra pair of
parenthesis allows me to launch `gdb' is the reason why I sent the patch
to emacs list.
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.