mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-24 10:38:38 +00:00
(flymake-buildfile-dirs): Remove.
(flymake-find-buildfile): Use locate-dominating-file.
This commit is contained in:
parent
6b6b99547b
commit
8ebbfc80ba
@ -1,5 +1,8 @@
|
|||||||
2007-07-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
2007-07-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* progmodes/flymake.el (flymake-buildfile-dirs): Remove.
|
||||||
|
(flymake-find-buildfile): Use locate-dominating-file.
|
||||||
|
|
||||||
* vc.el (vc-delistify): Use mapconcat.
|
* vc.el (vc-delistify): Use mapconcat.
|
||||||
(vc-do-command): Minor simplification.
|
(vc-do-command): Minor simplification.
|
||||||
(vc-expand-dirs): Use push.
|
(vc-expand-dirs): Use push.
|
||||||
|
@ -325,11 +325,6 @@ Return nil if we cannot, non-nil if we can."
|
|||||||
(or (nth 2 (flymake-get-file-name-mode-and-masks file-name))
|
(or (nth 2 (flymake-get-file-name-mode-and-masks file-name))
|
||||||
'flymake-get-real-file-name))
|
'flymake-get-real-file-name))
|
||||||
|
|
||||||
(defcustom flymake-buildfile-dirs '("." ".." "../.." "../../.." "../../../.." "../../../../.." "../../../../../.." "../../../../../../.." "../../../../../../../.." "../../../../../../../../.." "../../../../../../../../../.." "../../../../../../../../../../..")
|
|
||||||
"Dirs to look for buildfile."
|
|
||||||
:group 'flymake
|
|
||||||
:type '(repeat (string)))
|
|
||||||
|
|
||||||
(defvar flymake-find-buildfile-cache (flymake-makehash 'equal))
|
(defvar flymake-find-buildfile-cache (flymake-makehash 'equal))
|
||||||
|
|
||||||
(defun flymake-get-buildfile-from-cache (dir-name)
|
(defun flymake-get-buildfile-from-cache (dir-name)
|
||||||
@ -346,19 +341,15 @@ Return nil if we cannot, non-nil if we can."
|
|||||||
Buildfile includes Makefile, build.xml etc.
|
Buildfile includes Makefile, build.xml etc.
|
||||||
Return its file name if found, or nil if not found."
|
Return its file name if found, or nil if not found."
|
||||||
(or (flymake-get-buildfile-from-cache source-dir-name)
|
(or (flymake-get-buildfile-from-cache source-dir-name)
|
||||||
(let* ((dirs flymake-buildfile-dirs)
|
(let* ((file (locate-dominating-file
|
||||||
(buildfile-dir nil)
|
source-dir-name
|
||||||
(found nil))
|
(concat "\\`" (regexp-quote buildfile-name) "\\'"))))
|
||||||
(while (and (not found) dirs)
|
(if file
|
||||||
(setq buildfile-dir (concat source-dir-name (car dirs)))
|
|
||||||
(when (file-exists-p (expand-file-name buildfile-name buildfile-dir))
|
|
||||||
(setq found t))
|
|
||||||
(setq dirs (cdr dirs)))
|
|
||||||
(if found
|
|
||||||
(progn
|
(progn
|
||||||
(flymake-log 3 "found buildfile at %s/%s" buildfile-dir buildfile-name)
|
(flymake-log 3 "found buildfile at %s" file)
|
||||||
(flymake-add-buildfile-to-cache source-dir-name buildfile-dir)
|
(setq file (file-name-directory file))
|
||||||
buildfile-dir)
|
(flymake-add-buildfile-to-cache source-dir-name file)
|
||||||
|
file)
|
||||||
(progn
|
(progn
|
||||||
(flymake-log 3 "buildfile for %s not found" source-dir-name)
|
(flymake-log 3 "buildfile for %s not found" source-dir-name)
|
||||||
nil)))))
|
nil)))))
|
||||||
|
Loading…
Reference in New Issue
Block a user