X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c558890bde00f4b5079edd2c1d0d51086af3b13b..44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8:/lisp/ffap.el diff --git a/lisp/ffap.el b/lisp/ffap.el index abf979f612..7013e6e8ba 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -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