aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2019-05-17 01:34:47 +0000
committerKatsumi Yamaoka2019-05-17 01:34:47 +0000
commitca3c59146bd5c0effdc7602718b91f1ee41f866a (patch)
tree3428d44247a38985096e28850db55f9434582bb4
parent802dcafb5ebc3588e26a7f83e6144b73d99f2e13 (diff)
downloademacs-ca3c59146bd5c0effdc7602718b91f1ee41f866a.tar.gz
emacs-ca3c59146bd5c0effdc7602718b91f1ee41f866a.zip
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).
-rw-r--r--lisp/ffap.el5
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
513name may have a suffix added from `ffap-compression-suffixes'. 513name may have a suffix added from `ffap-compression-suffixes'.
514The optional NOMODIFY argument suppresses the extra search." 514The optional NOMODIFY argument suppresses the extra search."
515 (cond 515 (cond
516 ((not file) nil) ; quietly reject nil 516 ((or (not file) ; quietly reject nil
517 (zerop (length file))) ; and also ""
518 nil)
517 ((file-exists-p file) file) ; try unmodified first 519 ((file-exists-p file) file) ; try unmodified first
518 ;; three reasons to suppress search: 520 ;; three reasons to suppress search:
519 (nomodify nil) 521 (nomodify nil)
@@ -1326,6 +1328,7 @@ which may actually result in an URL rather than a filename."
1326 ;; If it contains a colon, get rid of it (and return if exists) 1328 ;; If it contains a colon, get rid of it (and return if exists)
1327 ((and (string-match path-separator name) 1329 ((and (string-match path-separator name)
1328 (setq name (ffap-string-at-point 'nocolon)) 1330 (setq name (ffap-string-at-point 'nocolon))
1331 (> (length name) 0)
1329 (ffap-file-exists-string name))) 1332 (ffap-file-exists-string name)))
1330 ;; File does not exist, try the alist: 1333 ;; File does not exist, try the alist:
1331 ((let ((alist ffap-alist) tem try case-fold-search) 1334 ((let ((alist ffap-alist) tem try case-fold-search)