aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-01-09 02:16:47 +0000
committerStefan Monnier2008-01-09 02:16:47 +0000
commitea27e496b7a188df399087219b7c717cf3f6316d (patch)
tree58d4cb287765f0ea141b2cda98a8b08b1389fcf2
parentc5578d5fff348216e1e25ef7153efb16ae1b17f5 (diff)
downloademacs-ea27e496b7a188df399087219b7c717cf3f6316d.tar.gz
emacs-ea27e496b7a188df399087219b7c717cf3f6316d.zip
(ffap-read-file-or-url): Don't use let-binding to temporarily
add a file-name handler.
-rw-r--r--lisp/ChangeLog28
-rw-r--r--lisp/ffap.el33
2 files changed, 33 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc79ba3b156..029a81975fa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,20 +1,22 @@
12008-01-09 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * ffap.el (ffap-read-file-or-url): Don't use let-binding to temporarily
4 add a file-name handler.
5
12008-01-08 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> 62008-01-08 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2 7
3 * textmodes/bibtex.el (bibtex-initialize): New autoloaded 8 * textmodes/bibtex.el (bibtex-initialize): New autoloaded command.
4 command. Rename from function bibtex-files-expand. New optional 9 Rename from function bibtex-files-expand. New optional arg select.
5 arg select.
6 (bibtex-flash-head): Allow blink-matching-delay being zero. 10 (bibtex-flash-head): Allow blink-matching-delay being zero.
7 (bibtex-clean-entry): Use atomic-change-group. 11 (bibtex-clean-entry): Use atomic-change-group.
8 (bibtex-format-entry): Check presence of required fields only 12 (bibtex-format-entry): Check presence of required fields only
9 after formatting of fields. Use member-ignore-case. Do not use 13 after formatting of fields. Use member-ignore-case. Do not use
10 bibtex-parse-entry. Do not use booktitle field to set a missing 14 bibtex-parse-entry. Do not use booktitle field to set a missing title.
11 title.
12 (bibtex-autofill-entry): Do not call undo-boundary. 15 (bibtex-autofill-entry): Do not call undo-boundary.
13 (bibtex-lessp): Handle crossref keys that point to another bibtex 16 (bibtex-lessp): Handle crossref keys that point to another bibtex file.
14 file.
15 (bibtex-sort-buffer, bibtex-prepare-new-entry, bibtex-validate): 17 (bibtex-sort-buffer, bibtex-prepare-new-entry, bibtex-validate):
16 Parse keys if necessary. 18 Parse keys if necessary.
17 19
182008-01-08 Nick Roberts <nickrob@snap.net.nz> 202008-01-08 Nick Roberts <nickrob@snap.net.nz>
19 21
20 * progmodes/gdb-ui.el (gdb-var-list-children-1): Put varnum in 22 * progmodes/gdb-ui.el (gdb-var-list-children-1): Put varnum in
@@ -22,8 +24,8 @@
22 24
232008-01-08 Nick Roberts <nickrob@snap.net.nz> 252008-01-08 Nick Roberts <nickrob@snap.net.nz>
24 26
25 * progmodes/gdb-ui.el (gud-gdb-command-name): Explain 27 * progmodes/gdb-ui.el (gud-gdb-command-name):
26 "--annotate=3" option is necessary for the Graphical Interface. 28 Explain "--annotate=3" option is necessary for the Graphical Interface.
27 29
282008-01-08 Nick Roberts <nickrob@snap.net.nz> 302008-01-08 Nick Roberts <nickrob@snap.net.nz>
29 31
@@ -91,10 +93,8 @@
91 93
92 * time-stamp.el (time-stamp-time-zone): 94 * time-stamp.el (time-stamp-time-zone):
93 * whitespace.el (whitespace-check-buffer-leading) 95 * whitespace.el (whitespace-check-buffer-leading)
94 (whitespace-check-buffer-trailing) 96 (whitespace-check-buffer-trailing, whitespace-check-buffer-indent)
95 (whitespace-check-buffer-indent) 97 (whitespace-check-buffer-spacetab, whitespace-check-buffer-ateol):
96 (whitespace-check-buffer-spacetab)
97 (whitespace-check-buffer-ateol):
98 * progmodes/sh-script.el (sh-indentation): 98 * progmodes/sh-script.el (sh-indentation):
99 * textmodes/ispell.el (ispell-local-pdict): 99 * textmodes/ispell.el (ispell-local-pdict):
100 Add safe-local-variable properties. 100 Add safe-local-variable properties.
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 52fb372b8cd..fa5e70e860b 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1263,20 +1263,25 @@ which may actually result in an url rather than a filename."
1263 (setq dir (file-name-directory guess)))) 1263 (setq dir (file-name-directory guess))))
1264 (let ((minibuffer-completing-file-name t) 1264 (let ((minibuffer-completing-file-name t)
1265 (completion-ignore-case read-file-name-completion-ignore-case) 1265 (completion-ignore-case read-file-name-completion-ignore-case)
1266 ;; because of `rfn-eshadow-update-overlay'. 1266 (fnh-elem (cons ffap-url-regexp 'url-file-handler)))
1267 (file-name-handler-alist 1267 ;; Explain to `rfn-eshadow' that we can use URLs here.
1268 (cons (cons ffap-url-regexp 'url-file-handler) 1268 (push fnh-elem file-name-handler-alist)
1269 file-name-handler-alist))) 1269 (unwind-protect
1270 (setq guess 1270 (setq guess
1271 (completing-read 1271 (completing-read
1272 prompt 1272 prompt
1273 'ffap-read-file-or-url-internal 1273 'ffap-read-file-or-url-internal
1274 dir 1274 dir
1275 nil 1275 nil
1276 (if dir (cons guess (length dir)) guess) 1276 (if dir (cons guess (length dir)) guess)
1277 (list 'file-name-history) 1277 (list 'file-name-history)
1278 (and buffer-file-name 1278 (and buffer-file-name
1279 (abbreviate-file-name buffer-file-name))))) 1279 (abbreviate-file-name buffer-file-name))))
1280 ;; Remove the special handler manually. We used to just let-bind
1281 ;; file-name-handler-alist to preserve its value, but that caused
1282 ;; other modifications to be lost (e.g. when Tramp gets loaded
1283 ;; during the completing-read call).
1284 (setq file-name-handler-alist (delq fnh-elem file-name-handler-alist))))
1280 ;; Do file substitution like (interactive "F"), suggested by MCOOK. 1285 ;; Do file substitution like (interactive "F"), suggested by MCOOK.
1281 (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) 1286 (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess)))
1282 ;; Should not do it on url's, where $ is a common (VMS?) character. 1287 ;; Should not do it on url's, where $ is a common (VMS?) character.