aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-05-08 16:02:14 +0000
committerStefan Monnier2007-05-08 16:02:14 +0000
commit44038dc83b6716737ad663fd3e823f35adf8f482 (patch)
tree22a7b7ef9da81c6a1271a10a725fb3d558d4ec67
parent2ed8e1f79ec2e2118315de5b5eeb08ba37ed9468 (diff)
downloademacs-44038dc83b6716737ad663fd3e823f35adf8f482.tar.gz
emacs-44038dc83b6716737ad663fd3e823f35adf8f482.zip
(compilation-find-file): Add a big comment.
-rw-r--r--lisp/progmodes/compile.el19
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."
1863 (let* ((name (read-file-name 1863 (let* ((name (read-file-name
1864 (format "Find this %s in (default %s): " 1864 (format "Find this %s in (default %s): "
1865 compilation-error filename) 1865 compilation-error filename)
1866 spec-dir filename t nil)) 1866 spec-dir filename t nil
1867 ;; The predicate below is fine when called from
1868 ;; minibuffer-complete-and-exit, but it's too
1869 ;; restrictive otherwise, since it also prevents the
1870 ;; user from completing "fo" to "foo/" when she
1871 ;; wants to enter "foo/bar".
1872 ;;
1873 ;; Try to make sure the user can only select
1874 ;; a valid answer. This predicate may be ignored,
1875 ;; tho, so we still have to double-check afterwards.
1876 ;; TODO: We should probably fix read-file-name so
1877 ;; that it never ignores this predicate, even when
1878 ;; using popup dialog boxes.
1879 ;; (lambda (name)
1880 ;; (if (file-directory-p name)
1881 ;; (setq name (expand-file-name filename name)))
1882 ;; (file-exists-p name))
1883 ))
1867 (origname name)) 1884 (origname name))
1868 (cond 1885 (cond
1869 ((not (file-exists-p name)) 1886 ((not (file-exists-p name))