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).
This commit is contained in:
parent
018278a8d0
commit
fa560bea19
1 changed files with 13 additions and 14 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue