[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kludge in find-file.el
From: |
Stuart D. Herring |
Subject: |
Re: kludge in find-file.el |
Date: |
Tue, 16 Aug 2005 08:14:28 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.4-2 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: kludge in find-file.el,
Stuart D. Herring <=