diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2019-05-17 01:34:47 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2019-05-17 01:34:47 +0000 |
commit | ca3c59146bd5c0effdc7602718b91f1ee41f866a (patch) | |
tree | 3428d44247a38985096e28850db55f9434582bb4 /lisp/ffap.el | |
parent | 802dcafb5ebc3588e26a7f83e6144b73d99f2e13 (diff) | |
download | emacs-ca3c59146bd5c0effdc7602718b91f1ee41f866a.tar.gz |
Fix ffap behavior in the Gnus group buffer (bug#35693)
* lisp/ffap.el (ffap-file-exists-string, ffap-file-at-point):
Don't recognize "" as a path or a file name (bug#35693).
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r-- | lisp/ffap.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el index bcb5efef544..08f72089450 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -513,7 +513,9 @@ When using jka-compr (a.k.a. `auto-compression-mode'), the returned name may have a suffix added from `ffap-compression-suffixes'. The optional NOMODIFY argument suppresses the extra search." (cond - ((not file) nil) ; quietly reject nil + ((or (not file) ; quietly reject nil + (zerop (length file))) ; and also "" + nil) ((file-exists-p file) file) ; try unmodified first ;; three reasons to suppress search: (nomodify nil) @@ -1326,6 +1328,7 @@ which may actually result in an URL rather than a filename." ;; If it contains a colon, get rid of it (and return if exists) ((and (string-match path-separator name) (setq name (ffap-string-at-point 'nocolon)) + (> (length name) 0) (ffap-file-exists-string name))) ;; File does not exist, try the alist: ((let ((alist ffap-alist) tem try case-fold-search) |