diff options
| author | Eli Zaretskii | 2016-04-08 11:05:20 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-04-08 11:05:20 +0300 |
| commit | 7ad1d075b940f276adaf3b6bb0c024079c403f80 (patch) | |
| tree | 33acb23746af466e98c360b8f87297be260e34f0 | |
| parent | a3f1ac2e3b546951f3182a7b42cad7f64a94e0b8 (diff) | |
| download | emacs-7ad1d075b940f276adaf3b6bb0c024079c403f80.tar.gz emacs-7ad1d075b940f276adaf3b6bb0c024079c403f80.zip | |
Avoid signaling errors in 'M-n' at the 'C-x C-f' prompt
* lisp/ffap.el (ffap-guess-file-name-at-point): Ignore errors
while 'ffap-guesser' runs. (Bug#23218)
| -rw-r--r-- | lisp/ffap.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el index 36727b3747d..8343b475c1b 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -1966,7 +1966,9 @@ Only intended for interactive use." | |||
| 1966 | (defun ffap-guess-file-name-at-point () | 1966 | (defun ffap-guess-file-name-at-point () |
| 1967 | "Try to get a file name at point. | 1967 | "Try to get a file name at point. |
| 1968 | This hook is intended to be put in `file-name-at-point-functions'." | 1968 | This hook is intended to be put in `file-name-at-point-functions'." |
| 1969 | (let ((guess (ffap-guesser))) | 1969 | ;; ffap-guesser can signal an error, and we don't want that when, |
| 1970 | ;; e.g., the user types M-n at the "C-x C-f" prompt. | ||
| 1971 | (let ((guess (ignore-errors (ffap-guesser)))) | ||
| 1970 | (when (stringp guess) | 1972 | (when (stringp guess) |
| 1971 | (let ((url (ffap-url-p guess))) | 1973 | (let ((url (ffap-url-p guess))) |
| 1972 | (or url | 1974 | (or url |