diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 46 |
2 files changed, 27 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1bc6039b327..9a5c8f672b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-01-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/flymake.el (flymake-find-buildfile): Remove invariant arg | ||
| 4 | `dirs'. Adjust callers. | ||
| 5 | |||
| 1 | 2006-01-09 John Paul Wallington <jpw@gnu.org> | 6 | 2006-01-09 John Paul Wallington <jpw@gnu.org> |
| 2 | 7 | ||
| 3 | * cus-edit.el (custom-comment) <defface>: Add TTY definitions. | 8 | * cus-edit.el (custom-comment) <defface>: Add TTY definitions. |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index f5e4f58cb8f..44da366cbb6 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -312,30 +312,29 @@ Return nil if we cannot, non-nil if we can." | |||
| 312 | (defun flymake-clear-buildfile-cache () | 312 | (defun flymake-clear-buildfile-cache () |
| 313 | (clrhash flymake-find-buildfile-cache)) | 313 | (clrhash flymake-find-buildfile-cache)) |
| 314 | 314 | ||
| 315 | (defun flymake-find-buildfile (buildfile-name source-dir-name dirs) | 315 | (defun flymake-find-buildfile (buildfile-name source-dir-name) |
| 316 | "Find buildfile starting from current directory. | 316 | "Find buildfile starting from current directory. |
| 317 | Buildfile includes Makefile, build.xml etc. | 317 | Buildfile includes Makefile, build.xml etc. |
| 318 | Return its file name if found, or nil if not found." | 318 | Return its file name if found, or nil if not found." |
| 319 | (if (flymake-get-buildfile-from-cache source-dir-name) | 319 | (or (flymake-get-buildfile-from-cache source-dir-name) |
| 320 | (progn | 320 | (let* ((dirs flymake-buildfile-dirs) |
| 321 | (flymake-get-buildfile-from-cache source-dir-name)) | 321 | (buildfile-dir nil) |
| 322 | (let* ((buildfile-dir nil) | 322 | (buildfile nil) |
| 323 | (buildfile nil) | 323 | (found nil)) |
| 324 | (found nil)) | 324 | (while (and (not found) dirs) |
| 325 | (while (and (not found) dirs) | 325 | (setq buildfile-dir (concat source-dir-name (car dirs))) |
| 326 | (setq buildfile-dir (concat source-dir-name (car dirs))) | 326 | (setq buildfile (concat buildfile-dir "/" buildfile-name)) |
| 327 | (setq buildfile (concat buildfile-dir "/" buildfile-name)) | 327 | (when (file-exists-p buildfile) |
| 328 | (when (file-exists-p buildfile) | 328 | (setq found t)) |
| 329 | (setq found t)) | 329 | (setq dirs (cdr dirs))) |
| 330 | (setq dirs (cdr dirs))) | 330 | (if found |
| 331 | (if found | 331 | (progn |
| 332 | (progn | 332 | (flymake-log 3 "found buildfile at %s/%s" buildfile-dir buildfile-name) |
| 333 | (flymake-log 3 "found buildfile at %s/%s" buildfile-dir buildfile-name) | 333 | (flymake-add-buildfile-to-cache source-dir-name buildfile-dir) |
| 334 | (flymake-add-buildfile-to-cache source-dir-name buildfile-dir) | 334 | buildfile-dir) |
| 335 | buildfile-dir) | 335 | (progn |
| 336 | (progn | 336 | (flymake-log 3 "buildfile for %s not found" source-dir-name) |
| 337 | (flymake-log 3 "buildfile for %s not found" source-dir-name) | 337 | nil))))) |
| 338 | nil))))) | ||
| 339 | 338 | ||
| 340 | (defun flymake-fix-file-name (name) | 339 | (defun flymake-fix-file-name (name) |
| 341 | "Replace all occurences of '\' with '/'." | 340 | "Replace all occurences of '\' with '/'." |
| @@ -1608,8 +1607,7 @@ Return full-name. Names are real, not patched." | |||
| 1608 | "Find buildfile, store its dir in buffer data and return its dir, if found." | 1607 | "Find buildfile, store its dir in buffer data and return its dir, if found." |
| 1609 | (let* ((buildfile-dir | 1608 | (let* ((buildfile-dir |
| 1610 | (flymake-find-buildfile buildfile-name | 1609 | (flymake-find-buildfile buildfile-name |
| 1611 | (file-name-directory source-file-name) | 1610 | (file-name-directory source-file-name)))) |
| 1612 | flymake-buildfile-dirs))) | ||
| 1613 | (if buildfile-dir | 1611 | (if buildfile-dir |
| 1614 | (setq flymake-base-dir buildfile-dir) | 1612 | (setq flymake-base-dir buildfile-dir) |
| 1615 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) | 1613 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) |
| @@ -1696,7 +1694,7 @@ Use CREATE-TEMP-F for creating temp copy." | |||
| 1696 | make-args)) | 1694 | make-args)) |
| 1697 | 1695 | ||
| 1698 | (defun flymake-find-make-buildfile (source-dir) | 1696 | (defun flymake-find-make-buildfile (source-dir) |
| 1699 | (flymake-find-buildfile "Makefile" source-dir flymake-buildfile-dirs)) | 1697 | (flymake-find-buildfile "Makefile" source-dir)) |
| 1700 | 1698 | ||
| 1701 | ;;;; .h/make specific | 1699 | ;;;; .h/make specific |
| 1702 | (defun flymake-master-make-header-init () | 1700 | (defun flymake-master-make-header-init () |