* bug#1103: 23.0.60; which-func misses functions
@ 2008-10-06 22:01 Lennart Borgman (gmail)
2008-10-07 10:48 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-06 22:01 UTC (permalink / raw)
To: emacs-pretest-bug
Instead of displaying the last function in an elisp file it may display
the name of a variable that is above the function. I do not know if the
patch below is the right way to fix it.
Index: which-func.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/which-func.el,v
retrieving revision 1.25
diff -u -r1.25 which-func.el
--- which-func.el 30 Sep 2008 03:42:47 -0000 1.25
+++ which-func.el 6 Oct 2008 21:56:46 -0000
@@ -313,7 +313,8 @@
(reverse (cons (car pair)
namestack)))))
;; Entries in order, so can skip all those
after point.
(setq alist nil
- imstack nil)))))
+ ;;imstack nil
+ )))))
(setq alist (car imstack)
namestack (cdr namestack)
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-10-03
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-06 22:01 Lennart Borgman (gmail)
@ 2008-10-07 10:48 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-07 10:48 UTC (permalink / raw)
To: 1103
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
Lennart Borgman (gmail) wrote:
> Instead of displaying the last function in an elisp file it may display
> the name of a variable that is above the function. I do not know if the
> patch below is the right way to fix it.
Here is a new patch which I think is correct.
[-- Attachment #2: which-func.diff --]
[-- Type: text/plain, Size: 2439 bytes --]
Index: which-func.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/which-func.el,v
retrieving revision 1.25
diff -u -r1.25 which-func.el
--- which-func.el 30 Sep 2008 03:42:47 -0000 1.25
+++ which-func.el 7 Oct 2008 10:45:56 -0000
@@ -287,11 +287,12 @@
(boundp 'imenu--index-alist) imenu--index-alist)
(let ((alist imenu--index-alist)
(minoffset (point-max))
- offset pair mark imstack namestack)
+ offset pair mark imstack namestack
+ skip-sub)
;; Elements of alist are either ("name" . marker), or
;; ("submenu" ("name" . marker) ... ). The list can be
;; arbitrarily nested.
- (while (or alist imstack)
+ (while (or alist imstack skip-sub)
(if alist
(progn
(setq pair (car-safe alist)
@@ -302,9 +303,12 @@
((imenu--subalist-p pair)
(setq imstack (cons alist imstack)
namestack (cons (car pair) namestack)
- alist (cdr pair)))
+ alist (cdr pair)
+ skip-sub nil
+ ))
((number-or-marker-p (setq mark (cdr pair)))
+ (unless skip-sub
(if (>= (setq offset (- (point) mark)) 0)
(if (< offset minoffset) ; find the closest item
(setq minoffset offset
@@ -312,12 +316,15 @@
which-func-imenu-joiner-function
(reverse (cons (car pair) namestack)))))
;; Entries in order, so can skip all those after point.
- (setq alist nil
- imstack nil)))))
+ ;;(setq alist nil imstack nil)
+ (setq skip-sub t)
+ )
+ ))))
(setq alist (car imstack)
namestack (cdr namestack)
- imstack (cdr imstack))))))
+ imstack (cdr imstack)
+ skip-sub nil)))))
;; Try using add-log support.
(when (and (null name) (boundp 'add-log-current-defun-function)
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
@ 2008-10-08 16:19 Chong Yidong
2008-10-08 23:22 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2008-10-08 16:19 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: 1103
> Instead of displaying the last function in an elisp file it may
> display the name of a variable that is above the function.
Could you send (i) a recipe to reproduce this problem, and (ii) a
ChangeLog entry for your patch?
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-08 16:19 bug#1103: 23.0.60; which-func misses functions Chong Yidong
@ 2008-10-08 23:22 ` Lennart Borgman (gmail)
2008-10-09 0:45 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-08 23:22 UTC (permalink / raw)
To: Chong Yidong; +Cc: 1103
Chong Yidong wrote:
>> Instead of displaying the last function in an elisp file it may
>> display the name of a variable that is above the function.
>
> Could you send (i) a recipe to reproduce this problem, and
Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
library I loaded, I did not think of that. I have to investigate this
further.
> (ii) a
> ChangeLog entry for your patch?
>
> Thanks.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-08 23:22 ` Lennart Borgman (gmail)
@ 2008-10-09 0:45 ` Lennart Borgman (gmail)
2008-10-09 18:18 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-09 0:45 UTC (permalink / raw)
To: 1103; +Cc: Chong Yidong
Lennart Borgman (gmail) wrote:
> Chong Yidong wrote:
>>> Instead of displaying the last function in an elisp file it may
>>> display the name of a variable that is above the function.
>> Could you send (i) a recipe to reproduce this problem, and
>
> Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
> library I loaded, I did not think of that. I have to investigate this
> further.
I am a bit puzzled. I see a bit different things. I just tested with a
checkout from 2008-10-03:
emacs -Q
M-x find-function RET which-function-mode
M-x which-function-mode
This gives me wrong function names in the mode line. But there is
something strange there, I will check with a new checkout later ...
>> (ii) a
>> ChangeLog entry for your patch?
>>
>> Thanks.
>>
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-09 0:45 ` Lennart Borgman (gmail)
@ 2008-10-09 18:18 ` Lennart Borgman (gmail)
2008-10-09 20:00 ` Chong Yidong
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-09 18:18 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: 1103, Chong Yidong
Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Chong Yidong wrote:
>>>> Instead of displaying the last function in an elisp file it may
>>>> display the name of a variable that is above the function.
>>> Could you send (i) a recipe to reproduce this problem, and
>> Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
>> library I loaded, I did not think of that. I have to investigate this
>> further.
>
> I am a bit puzzled. I see a bit different things. I just tested with a
> checkout from 2008-10-03:
>
> emacs -Q
> M-x find-function RET which-function-mode
> M-x which-function-mode
>
> This gives me wrong function names in the mode line. But there is
> something strange there, I will check with a new checkout later ...
With a fresh update from today I can still reproduce this problem as above.
Can you please reopen this bug so we do not forget it?
>>> (ii) a
>>> ChangeLog entry for your patch?
>>>
>>> Thanks.
>>>
>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-09 18:18 ` Lennart Borgman (gmail)
@ 2008-10-09 20:00 ` Chong Yidong
2008-10-09 20:40 ` Lennart Borgman (gmail)
2011-07-15 21:08 ` Glenn Morris
0 siblings, 2 replies; 9+ messages in thread
From: Chong Yidong @ 2008-10-09 20:00 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: 1103
>> emacs -Q
>> M-x find-function RET which-function-mode
>> M-x which-function-mode
>>
>> This gives me wrong function names in the mode line. But there is
>> something strange there, I will check with a new checkout later ...
>
> With a fresh update from today I can still reproduce this problem as
> above.
Could you send a ChangeLog for your patch (assuming you still think it's
correct)?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-09 20:00 ` Chong Yidong
@ 2008-10-09 20:40 ` Lennart Borgman (gmail)
2011-07-15 21:08 ` Glenn Morris
1 sibling, 0 replies; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-09 20:40 UTC (permalink / raw)
To: Chong Yidong; +Cc: 1103, Daniel Colascione
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
Chong Yidong wrote:
>>> emacs -Q
>>> M-x find-function RET which-function-mode
>>> M-x which-function-mode
>>>
>>> This gives me wrong function names in the mode line. But there is
>>> something strange there, I will check with a new checkout later ...
>> With a fresh update from today I can still reproduce this problem as
>> above.
>
> Could you send a ChangeLog for your patch (assuming you still think it's
> correct)?
I have attached a changlog.
Daniel, I think you might have been changing which-function before me.
Do you have any comments on my change?
[-- Attachment #2: changelog-which-func --]
[-- Type: text/plain, Size: 171 bytes --]
2008-10-09 Lennart Borgman <lennart.borgman@gmail.com>
* which-func.el (which-function): Skip just current sublist when a
possible match is found in an imenu index.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#1103: 23.0.60; which-func misses functions
2008-10-09 20:00 ` Chong Yidong
2008-10-09 20:40 ` Lennart Borgman (gmail)
@ 2011-07-15 21:08 ` Glenn Morris
1 sibling, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2011-07-15 21:08 UTC (permalink / raw)
To: 1103-done
I think this should be closed until a description of how to reproduce
the problem is provided.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-07-15 21:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 16:19 bug#1103: 23.0.60; which-func misses functions Chong Yidong
2008-10-08 23:22 ` Lennart Borgman (gmail)
2008-10-09 0:45 ` Lennart Borgman (gmail)
2008-10-09 18:18 ` Lennart Borgman (gmail)
2008-10-09 20:00 ` Chong Yidong
2008-10-09 20:40 ` Lennart Borgman (gmail)
2011-07-15 21:08 ` Glenn Morris
-- strict thread matches above, loose matches on Subject: below --
2008-10-06 22:01 Lennart Borgman (gmail)
2008-10-07 10:48 ` Lennart Borgman (gmail)
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.