emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

which-function-mode doesn't work when imenu--sort-by-name is used .


From: Richard . G . Bielawski
Subject: which-function-mode doesn't work when imenu--sort-by-name is used .
Date: Mon, 10 Jan 2005 16:50:56 -0600

which-function-mode doesn't work when imenu--sort-by-name is used.
I reported this problem quite some time ago but apparently didn't
give enough information to recreate the problem.

I can consistently recreate the problem like this:  

runemacs.exe -q
C-x b bad <ret>
        Now paste the following 5 lines of text into the new buffer.
(defcustom any )
(defcustom text )
(defcustom line )
(defcustom Here )
(defcustom There )

        Issue these commands:
M-x emacs-lisp-mode 
M-x which-function-mode 
        Notice which-function operates correctly.
        Now issue these commands
M-: (setq  imenu-sort-function 'imenu--sort-by-name) <ret>
M-: (imenu-add-menubar-index) <ret>
        which-function no longer displays the correct function.
        Specifically, `'text', `Here' and `There' are not reported.

This problem seems only to occur when named imenu expressions are used.
That is, changing defcustom to defun in the example above will result 
in the problem appearing not to exist.  The difference is that defun 
is covered by an unnamed imenu regexp while defcustom is covered by the
regexp named "Variables".

Hope that helps!

Richard Bielawski
612-667-5039

"This message may contain confidential and/or privileged information.  If
you are not the addressee or authorized to receive this for the addressee,
you must not use, copy, disclose, or take any action based on this message
or any information herein.  If you have received this message in error,
please advise the sender immediately by reply e-mail and delete this
message.  Thank you for your cooperation."






reply via email to

[Prev in Thread] Current Thread [Next in Thread]