emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ca3c591: Fix ffap behavior in the Gnus group buffer


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master ca3c591: Fix ffap behavior in the Gnus group buffer (bug#35693)
Date: Thu, 16 May 2019 21:35:07 -0400 (EDT)

branch: master
commit ca3c59146bd5c0effdc7602718b91f1ee41f866a
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    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).
---
 lisp/ffap.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ffap.el b/lisp/ffap.el
index bcb5efe..08f7208 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]