[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Which-function-mode is turning itself off
From: |
Richard.G.Bielawski |
Subject: |
Which-function-mode is turning itself off |
Date: |
Mon, 16 May 2005 12:19:39 -0500 |
Some months ago I reported a problem where which-function-mode
kept turning itself off. I used debug-on-entry to trap a call
that resulted in it turning off and reported it. Your response
appears to imply that this change should make it easier to
debug the problem. Since installing this change the problem
has not re-occurred. I took the change out and it occurs
constantly.
When which-function-mode turns itself off the error which
the code below implies will be reported is nowhere to be
found in my *messages* buffer. I.E.
"Error in which-func-update: ..."
How shall we proceed?
-----Original Message-----
From: Richard Stallman [mailto:address@hidden
Sent: Thursday, February 17, 2005 5:10 PM
To: address@hidden
Subject: Re: which-function-mode keeps turning itself off
It seems that an error is occurring inside the let construct
in this function.
(defun which-func-update-1 (window)
"Update the Which Function mode display for window WINDOW."
(with-selected-window window
(when which-func-mode
(condition-case info
(let ((current (which-function)))
(unless (equal current (gethash window which-func-table))
(puthash window current which-func-table)
(force-mode-line-update)))
(error
(which-func-mode -1)
(error "Error in which-func-update: %s" info))))))
If you redefine the function as follows
(defun which-func-update-1 (window)
"Update the Which Function mode display for window WINDOW."
(with-selected-window window
(when which-func-mode
(let ((current (which-function)))
(unless (equal current (gethash window which-func-table))
(puthash window current which-func-table)
(force-mode-line-update)))))))
then it will really get an error and you can debug it.
-------------------------------------------------
This is the trace I got today, without the above patch installed.
NOTE that pressing `C' did NOT result in the
"Error in which-func-update" message being reported!
* which-func-mode(-1)
byte-code("???\"?" [info which-func-mode -1 error "Error in
which-func-update: %s"] 3)
which-func-update-1(#<window 16 on *Occur-N50S*>)
which-func-update()
apply(which-func-update nil)
(condition-case nil (apply (aref timer 5) (aref timer 6)) (error nil))
(let (retrigger) (cancel-timer timer) (if (aref timer 4) (if ... ... ... ...
... ...)) (condition-case nil (apply ... ...) (error nil)) (if retrigger (aset
timer 0 nil)))
(if (timerp timer) (let (retrigger) (cancel-timer timer) (if ... ...)
(condition-case nil ... ...) (if retrigger ...)) (error "Bogus timer event"))
(let ((inhibit-quit t)) (if (timerp timer) (let ... ... ... ... ...) (error
"Bogus timer event")))
timer-event-handler([t 0 0 500000 t which-func-update nil t])
input-pending-p()
byte-code(""
jit-lock-stealth-fontify()
apply(jit-lock-stealth-fontify nil)
(condition-case nil (apply (aref timer 5) (aref timer 6)) (error nil))
(let (retrigger) (cancel-timer timer) (if (aref timer 4) (if ... ... ... ...
... ...)) (condition-case nil (apply ... ...) (error nil)) (if retrigger (aset
timer 0 nil)))
(if (timerp timer) (let (retrigger) (cancel-timer timer) (if ... ...)
(condition-case nil ... ...) (if retrigger ...)) (error "Bogus timer event"))
(let ((inhibit-quit t)) (if (timerp timer) (let ... ... ... ... ...) (error
"Bogus timer event")))
timer-event-handler([t 0 0 500000 t jit-lock-stealth-fontify nil t])
Richard Bielawski
612-667-5039
- Which-function-mode is turning itself off,
Richard.G.Bielawski <=