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


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to