diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-05-08 16:02:14 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-05-08 16:02:14 +0000 |
commit | 44038dc83b6716737ad663fd3e823f35adf8f482 (patch) | |
tree | 22a7b7ef9da81c6a1271a10a725fb3d558d4ec67 /lisp/progmodes/compile.el | |
parent | 2ed8e1f79ec2e2118315de5b5eeb08ba37ed9468 (diff) | |
download | emacs-44038dc83b6716737ad663fd3e823f35adf8f482.tar.gz emacs-44038dc83b6716737ad663fd3e823f35adf8f482.tar.bz2 emacs-44038dc83b6716737ad663fd3e823f35adf8f482.zip |
(compilation-find-file): Add a big comment.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ce933cb13d5..9266315d98f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1863,7 +1863,24 @@ Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." (let* ((name (read-file-name (format "Find this %s in (default %s): " compilation-error filename) - spec-dir filename t nil)) + spec-dir filename t nil + ;; The predicate below is fine when called from + ;; minibuffer-complete-and-exit, but it's too + ;; restrictive otherwise, since it also prevents the + ;; user from completing "fo" to "foo/" when she + ;; wants to enter "foo/bar". + ;; + ;; 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)) + )) (origname name)) (cond ((not (file-exists-p name)) |