emacs-diffs
[Top][All Lists]
Advanced

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

master fa560be: Fix problem with ede-mode bugging out on non-existent fi


From: Lars Ingebrigtsen
Subject: master fa560be: Fix problem with ede-mode bugging out on non-existent files
Date: Mon, 21 Sep 2020 11:33:24 -0400 (EDT)

branch: master
commit fa560bea191033e8af6bf3dc49cb6f6d94611535
Author: Lin Sun <lin.sun@zoom.us>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix problem with ede-mode bugging out on non-existent files
    
    * lisp/cedet/ede/emacs.el: Check whether the directory exists in
    ede-emacs-find-in-directories before using it (bug#43547).
---
 lisp/cedet/ede/emacs.el | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el
index bfcbd40..a052c5c 100644
--- a/lisp/cedet/ede/emacs.el
+++ b/lisp/cedet/ede/emacs.el
@@ -234,20 +234,19 @@ All files need the macros from lisp.h!"
       (let* ((D (car dirs))
             (ed (expand-file-name D base))
             (ef (expand-file-name name ed)))
-       (if (file-exists-p ef)
-           (setq ans ef)
-         ;; Not in this dir?  How about subdirs?
-         (let ((dirfile (directory-files ed t))
-               (moredirs nil)
-               )
-           ;; Get all the subdirs.
-           (dolist (DF dirfile)
-             (when (and (file-directory-p DF)
-                        (not (string-match "\\.$" DF)))
-               (push DF moredirs)))
-           ;; Try again.
-           (setq ans (ede-emacs-find-in-directories name ed moredirs))
-           ))
+       (when (file-exists-p ed)
+          (if (file-exists-p ef)
+             (setq ans ef)
+           ;; Not in this dir?  How about subdirs?
+           (let ((dirfile (directory-files ed t))
+                 (moredirs nil))
+             ;; Get all the subdirs.
+             (dolist (DF dirfile)
+               (when (and (file-directory-p DF)
+                          (not (string-match "\\.$" DF)))
+                 (push DF moredirs)))
+             ;; Try again.
+             (setq ans (ede-emacs-find-in-directories name ed moredirs)))))
        (setq dirs (cdr dirs))))
     ans))
 



reply via email to

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