--- Begin Message ---
Subject: |
which-func-ff-hook should be less noisy |
Date: |
Mon, 27 Jun 2011 14:03:16 +0200 |
In this change,
revno: 102581
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-12-03 19:49:49 -0500
message:
* lisp/progmodes/which-func.el (which-func-ff-hook): Log the error message.
(which-func-update-1): Distinguish symbols from strings.
(which-function): Stay within 80 columns.
there was added this bit
@@ -207,6 +207,7 @@
(setq imenu--index-alist
(save-excursion (funcall imenu-create-index-function))))
(error
+ (message "which-func-ff-hook error: %S" err)
(setq which-func-mode nil))))
which "logs" the error message. Unfortunately, when you have
`which-func-modes' set to t, you receive that message a lot for what
it is not an error (which-func-mode is simply unsupported in that
buffer / mode).
I don't want to remove it, because I suppose Stefan put it for a
reason. Now, if the reason is simply to log the error in *Messages*,
either doing it directly, or conditionalizing it somehow according to
(eq which-func-modes t) would be better.
If, on the other hand, the intent is to warn the user so s/he adds the
mode to which-func-non-auto-modes (which, IMHO, runs counter to
allowing which-func-modes = t), then I'd suggest to use a delayed
warning
(push (list 'which-func (error-message-string err) :error)
delayed-warnings-list)
which has the double advantage that it is more visible and can be filtered out.
Juanma
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#8941: which-func-ff-hook should be less noisy |
Date: |
Tue, 05 Jul 2011 14:56:50 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> Would the patch below work?
> Yes, if you add the missing quote before (error ...) in
>> + (unless (equal err (error "This buffer cannot use
>> `imenu-default-create-index-function'"))
Thanks, installed,
Stefan
--- End Message ---