[Top][All Lists]

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

Identifying DEFUNs in which-func-mode

From: Juanma Barranquero
Subject: Identifying DEFUNs in which-func-mode
Date: Wed, 7 Oct 2009 03:27:44 +0200

IMO, defining this function somewhere

(defun which-func-identify-DEFUN ()
      (if (looking-at "DEFUN +(\"[^\"]+\", +\\(F[^,]+\\),")
          (match-string-no-properties 1)

and adding it to `which-func-functions' for C files in the Emacs tree
would be useful.

Alas, it can't be added through .dir-locals.el, because hooks are
unsafe as directory-local variables. One (not particularly elegant)
way to fix it would be to add to C mode the function and a boolean
variable to set it; that variable could be safely set in
.dir-locals.el. Surely others can think of better ways.

But before taking the trouble, does anyone else think that it would be
useful to have this in standard Emacs, or it is the intersection of
Emacs developers and which-func-mode users too small?


reply via email to

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