unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer.
@ 2023-02-19 15:39 Alan Mackenzie
  2023-02-19 16:17 ` Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2023-02-19 15:39 UTC (permalink / raw)
  To: 61629

Hello, Emacs.

On the master branch, the recipe below leads to an error being thrown
from imenu.

Awareness of this bug resulted from the thread Subject: Error in C++
Mode with Emacs 27.0.90, Date: Tue 24 Mar 2020, From: Angelo Graziosi.
This thread reported a bug in imenu, which never made it to debbugs, but
which was partially fixed.

Thanks to Dmitry Gutov, who made me aware of the bit that didn't get
fixed then.

To reproduce the error in the master branch:
(i) emacs -Q in a GUI environment.
(ii) Evaluate the following:

;; C/C++ modes
(defun my-c-mode ()
  "My customization for `c-mode' and `c++-mode'."
  ;; Add index of func. to menu bar
  (imenu-add-to-menubar "Functions"))

;; c++-mode
(add-hook 'c-mode-common-hook 'my-c-mode)

(setq imenu-auto-rescan t)
(setq imenu-use-popup-menu t)

(iii) Type the following into an empty C++ buffer called graziosi.cc:

int main ()
{
    return 0;
}

(iv) M-x imenu<RET>.

This throws the error "Wrong type argument: seqencep, #<marker at 1 in
graziosi.cc>".  This is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer.
  2023-02-19 15:39 bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer Alan Mackenzie
@ 2023-02-19 16:17 ` Alan Mackenzie
  2023-02-19 17:50   ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2023-02-19 16:17 UTC (permalink / raw)
  To: 61629-done

Bug fixed in master.

On Sun, Feb 19, 2023 at 15:39:13 +0000, Alan Mackenzie wrote:
> On the master branch, the recipe below leads to an error being thrown
> from imenu.

> Awareness of this bug resulted from the thread Subject: Error in C++
> Mode with Emacs 27.0.90, Date: Tue 24 Mar 2020, From: Angelo Graziosi.
> This thread reported a bug in imenu, which never made it to debbugs, but
> which was partially fixed.

> Thanks to Dmitry Gutov, who made me aware of the bit that didn't get
> fixed then.

> To reproduce the error in the master branch:
> (i) emacs -Q in a GUI environment.
> (ii) Evaluate the following:

> ;; C/C++ modes
> (defun my-c-mode ()
>   "My customization for `c-mode' and `c++-mode'."
>   ;; Add index of func. to menu bar
>   (imenu-add-to-menubar "Functions"))

> ;; c++-mode
> (add-hook 'c-mode-common-hook 'my-c-mode)

> (setq imenu-auto-rescan t)
> (setq imenu-use-popup-menu t)

> (iii) Type the following into an empty C++ buffer called graziosi.cc:

> int main ()
> {
>     return 0;
> }

> (iv) M-x imenu<RET>.

> This throws the error "Wrong type argument: seqencep, #<marker at 1 in
> graziosi.cc>".  This is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer.
  2023-02-19 16:17 ` Alan Mackenzie
@ 2023-02-19 17:50   ` Dmitry Gutov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2023-02-19 17:50 UTC (permalink / raw)
  To: 61629, acm

On 19/02/2023 18:17, Alan Mackenzie wrote:
> Bug fixed in master.

Thanks, Alan!





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-19 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-19 15:39 bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer Alan Mackenzie
2023-02-19 16:17 ` Alan Mackenzie
2023-02-19 17:50   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).