emacs-devel
[Top][All Lists]
Advanced

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

Re: Horrible kludge in ff-get-file


From: Thien-Thi Nguyen
Subject: Re: Horrible kludge in ff-get-file
Date: 16 Jul 2006 14:14:21 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Richard Stallman <address@hidden> writes:

>   ;; Another special construct for find-file.el : when in a separate clause,
>   ;; go to the correct package.
>   (add-to-list 'ff-special-constructs
>                (cons "^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))"
>                      (lambda ()
>                      (if (fboundp 'ff-get-file)
>                          (if (boundp 'fname)
>                              (setq fname (ff-get-file
>                                           ada-search-directories-internal
>                                           (ada-make-filename-from-adaname
>                                            (match-string 1))
>                                           ada-spec-suffixes)))))))
> 
> This would be clean if fname were renamed to a clean meaningful name
> and had a defvar.
> 
> Would someone please do that?

there is a cleaner fix: better document `ff-special-constructs'
so that the thunk's return value is both necessary and sufficient
to do the job (no need for `setq' or knowledge of `fname').

also, the binding checks are remnants from the time before
`ff-special-constructs' was autoloaded; they can be removed.

i will make these changes shortly.

thi




reply via email to

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