unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8941: which-func-ff-hook should be less noisy
@ 2011-06-27 12:03 Juanma Barranquero
  2011-07-04 20:42 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2011-06-27 12:03 UTC (permalink / raw)
  To: 8941

In this change,

revno: 102581
committer: Stefan Monnier <monnier@iro.umontreal.ca>
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





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

end of thread, other threads:[~2011-07-05 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-27 12:03 bug#8941: which-func-ff-hook should be less noisy Juanma Barranquero
2011-07-04 20:42 ` Stefan Monnier
2011-07-04 22:08   ` Juanma Barranquero
2011-07-05 18:56     ` Stefan Monnier

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).