/[emacs]/emacs/lisp/progmodes/flymake.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/flymake.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by teirllm, Sat Jul 2 21:12:19 2005 UTC revision 1.23 by lektu, Sun Jul 3 23:18:19 2005 UTC
# Line 32  Line 32 
32    
33  ;;; Code:  ;;; Code:
34    
35    ;;;; [[ Silence the byte-compiler
36    
37    (eval-when-compile
38      (defvar flymake-check-start-time)
39      (defvar flymake-check-was-interrupted)
40      (defvar flymake-err-info)
41      (defvar flymake-is-running)
42      (defvar flymake-last-change-time)
43      (defvar flymake-new-err-info))
44    
45    ;;;; ]]
46    
47  ;;;; [[ Xemacs overlay compatibility  ;;;; [[ Xemacs overlay compatibility
48  (if (featurep 'xemacs) (progn  (if (featurep 'xemacs) (progn
49  (autoload 'make-overlay            "overlay" "Overlay compatibility kit." t)  (autoload 'make-overlay            "overlay" "Overlay compatibility kit." t)
# Line 53  Line 65 
65  (defalias 'flymake-float-time  (defalias 'flymake-float-time
66    (if (fboundp 'float-time)    (if (fboundp 'float-time)
67        'float-time        'float-time
68      (lambda ()      (with-no-warnings
69        (multiple-value-bind (s0 s1 s2) (current-time)        (lambda ()
70          (+ (* (float (ash 1 16)) s0) (float s1) (* 0.0000001 s2))))))          (multiple-value-bind (s0 s1 s2) (current-time)
71              (+ (* (float (ash 1 16)) s0) (float s1) (* 0.0000001 s2)))))))
72    
73  (defsubst flymake-replace-regexp-in-string (regexp rep str)  (defsubst flymake-replace-regexp-in-string (regexp rep str)
74    (if (fboundp 'replace-regexp-in-string)    (if (fboundp 'replace-regexp-in-string)
# Line 1138  For the format of LINE-ERR-INFO, see `fl Line 1151  For the format of LINE-ERR-INFO, see `fl
1151    (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs))))    (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs))))
1152      include-dirs))      include-dirs))
1153    
 (defun flymake-find-file (rel-file-name include-dirs)  
   "Iterate through INCLUDE-DIRS to find file REL-FILE-NAME.  
 Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists,  or just REL-FILE-NAME if not."  
   (let* ((count          (length include-dirs))  
          (idx            0)  
          (found          nil)  
          (full-file-name rel-file-name))  
   
     (while (and (not found) (< idx count))  
       (let* ((dir (nth idx include-dirs)))  
         (setq full-file-name  (concat dir "/" rel-file-name))  
         (when (file-exists-p full-file-name)  
           (setq found t)))  
       (setq idx (1+ idx)))  
     (if found  
         full-file-name  
       rel-file-name)))  
   
1154  (defun flymake-restore-formatting (source-buffer)  (defun flymake-restore-formatting (source-buffer)
1155    "Remove any formatting made by flymake."    "Remove any formatting made by flymake."
1156    )    )
# Line 1468  With arg, turn Flymake mode on if and on Line 1463  With arg, turn Flymake mode on if and on
1463        ;;+(add-hook 'find-file-hook 'flymake-find-file-hook)        ;;+(add-hook 'find-file-hook 'flymake-find-file-hook)
1464    
1465        (flymake-report-status (current-buffer) "" "")        (flymake-report-status (current-buffer) "" "")
1466            
1467        (setq flymake-timer        (setq flymake-timer
1468              (run-at-time nil 1 'flymake-on-timer-event (current-buffer)))              (run-at-time nil 1 'flymake-on-timer-event (current-buffer)))
1469    

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26