emacs-devel
[Top][All Lists]
Advanced

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

Re: compilation-find-file does not allow completing two levels of direct


From: Stefan Monnier
Subject: Re: compilation-find-file does not allow completing two levels of directory
Date: Mon, 15 Jan 2007 16:47:20 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

> RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v
> retrieving revision 1.413
> diff -u -r1.413 compile.el
> --- compile.el        24 Nov 2006 10:29:44 -0000      1.413
> +++ compile.el        15 Jan 2007 19:32:56 -0000
> @@ -1852,17 +1852,7 @@
>            (let* ((name (read-file-name
>                          (format "Find this %s in (default %s): "
>                                  compilation-error filename)
> -                        spec-dir filename t nil
> -                        ;; Try to make sure the user can only select
> -                        ;; a valid answer.  This predicate may be ignored,
> -                        ;; tho, so we still have to double-check afterwards.
> -                        ;; TODO: We should probably fix read-file-name so
> -                        ;; that it never ignores this predicate, even when
> -                        ;; using popup dialog boxes.
> -                        (lambda (name)
> -                          (if (file-directory-p name)
> -                              (setq name (expand-file-name filename name)))
> -                          (file-exists-p name))))
> +                        spec-dir filename t nil nil))
>                   (origname name))
>              (cond
>               ((not (file-exists-p name))

Thanks.

We can keep the file-exists-p in the predicate.  And we should add a comment
explaining why the predicate is "incomplete" (otherwise someone might be
tempted to redo what I did).


        Stefan




reply via email to

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