Reviving a thread from a few weeks ago: > I noticed this because it got a warning. It seems rather a kludge. > Is there any more general feature that could be used here? > > (defun ff-which-function-are-we-in () > "Return the name of the function whose definition/declaration point is > in. > Also remember that name in `ff-function-name'." > > (setq ff-function-name nil) > > (save-excursion > (if (re-search-backward ada-procedure-start-regexp nil t) > (setq ff-function-name (buffer-substring (match-beginning 0) > (match-end 0))) > ; we didn't find a procedure start, perhaps there is a package > (if (re-search-backward ada-package-start-regexp nil t) > (setq ff-function-name (buffer-substring (match-beginning 0) > (match-end 0))) > ))))
What exactly is the problem here? It's an example in find-file.el to illustrate an extension mechanism it supports. Is it just that the function returns a value as well as storing it by side-effect? Davis Herring -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel