unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Identifying DEFUNs in which-func-mode
@ 2009-10-07  1:27 Juanma Barranquero
  2009-10-07  2:29 ` Eric M. Ludlam
  0 siblings, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2009-10-07  1:27 UTC (permalink / raw)
  To: Emacs developers

IMO, defining this function somewhere

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

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?

    Juanma




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

end of thread, other threads:[~2009-10-07 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07  1:27 Identifying DEFUNs in which-func-mode Juanma Barranquero
2009-10-07  2:29 ` Eric M. Ludlam
2009-10-07  2:44   ` Juanma Barranquero
2009-10-07  5:38     ` Chong Yidong
2009-10-07 16:23     ` Eric M. Ludlam
2009-10-07 16:28       ` Juanma Barranquero

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