mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-26 10:49:33 +00:00
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)
This commit is contained in:
parent
a3f1ac2e3b
commit
7ad1d075b9
@ -1966,7 +1966,9 @@ Only intended for interactive use."
|
||||
(defun ffap-guess-file-name-at-point ()
|
||||
"Try to get a file name at point.
|
||||
This hook is intended to be put in `file-name-at-point-functions'."
|
||||
(let ((guess (ffap-guesser)))
|
||||
;; ffap-guesser can signal an error, and we don't want that when,
|
||||
;; e.g., the user types M-n at the "C-x C-f" prompt.
|
||||
(let ((guess (ignore-errors (ffap-guesser))))
|
||||
(when (stringp guess)
|
||||
(let ((url (ffap-url-p guess)))
|
||||
(or url
|
||||
|
Loading…
Reference in New Issue
Block a user