diff options
author | Lin Sun <lin.sun@zoom.us> | 2020-09-21 17:33:13 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-21 17:33:13 +0200 |
commit | fa560bea191033e8af6bf3dc49cb6f6d94611535 (patch) | |
tree | 45c6a76e1282662664d5fd8f53f70132408ab66d /lisp/cedet | |
parent | 018278a8d095f79c001ad3b128cdba18ac8e2d5f (diff) | |
download | emacs-fa560bea191033e8af6bf3dc49cb6f6d94611535.tar.gz |
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).
Diffstat (limited to 'lisp/cedet')
-rw-r--r-- | lisp/cedet/ede/emacs.el | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index bfcbd40fcce..a052c5c61e7 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)) |