/[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.19 by miles, Tue Jun 14 23:20:37 2005 UTC revision 1.20 by lektu, Fri Jul 1 14:13:12 2005 UTC
# Line 390  Return t if so, nil if not." Line 390  Return t if so, nil if not."
390    
391  (defun flymake-find-possible-master-files (file-name master-file-dirs masks)  (defun flymake-find-possible-master-files (file-name master-file-dirs masks)
392    "Find (by name and location) all possible master files.    "Find (by name and location) all possible master files.
393  Master files are .cpp and .c for and .h. Files are searched for  Master files are .cpp and .c for and .h.  Files are searched for
394  starting from the .h directory and max max-level parent dirs.  starting from the .h directory and max max-level parent dirs.
395  File contents are not checked."  File contents are not checked."
396    (let* ((dirs master-file-dirs)    (let* ((dirs master-file-dirs)
# Line 423  File contents are not checked." Line 423  File contents are not checked."
423      files))      files))
424    
425  (defun flymake-master-file-compare (file-one file-two)  (defun flymake-master-file-compare (file-one file-two)
426    "Compare two files speccified by FILE-ONE and FILE-TWO.    "Compare two files specified by FILE-ONE and FILE-TWO.
427  This function is used in sort to move most possible file names  This function is used in sort to move most possible file names
428  to the beginning of the list (File.h -> File.cpp moved to top."  to the beginning of the list (File.h -> File.cpp moved to top)."
429    (and (equal (file-name-sans-extension flymake-included-file-name)    (and (equal (file-name-sans-extension flymake-included-file-name)
430                (file-name-sans-extension (file-name-nondirectory file-one)))                (file-name-sans-extension (file-name-nondirectory file-one)))
431         (not (equal file-one file-two))))         (not (equal file-one file-two))))
# Line 750  It's flymake process filter." Line 750  It's flymake process filter."
750    
751  (defun flymake-get-line-err-count (line-err-info-list type)  (defun flymake-get-line-err-count (line-err-info-list type)
752    "Return number of errors of specified TYPE.    "Return number of errors of specified TYPE.
753  Value of TYPE is eigher e or w."  Value of TYPE is either \"e\" or \"w\"."
754    (let* ((idx        0)    (let* ((idx        0)
755           (count      (length line-err-info-list))           (count      (length line-err-info-list))
756           (err-count  0))           (err-count  0))
# Line 859  Return t if it has at least one flymake Line 859  Return t if it has at least one flymake
859    
860  (defun flymake-highlight-line (line-no line-err-info-list)  (defun flymake-highlight-line (line-no line-err-info-list)
861    "Highlight line LINE-NO in current buffer.    "Highlight line LINE-NO in current buffer.
862  Perhaps use text from LINE-ERR-INFO-ILST to enhance highlighting."  Perhaps use text from LINE-ERR-INFO-LIST to enhance highlighting."
863    (goto-line line-no)    (goto-line line-no)
864    (let* ((line-beg (flymake-line-beginning-position))    (let* ((line-beg (flymake-line-beginning-position))
865           (line-end (flymake-line-end-position))           (line-end (flymake-line-end-position))
# Line 995  from compile.el") Line 995  from compile.el")
995  ;;)  ;;)
996    
997  (defun flymake-parse-line (line)  (defun flymake-parse-line (line)
998    "Parse LINE to see if it is an error of warning.    "Parse LINE to see if it is an error or warning.
999  Return its components if so, nil if no."  Return its components if so, nil otherwise."
1000    (let ((raw-file-name nil)    (let ((raw-file-name nil)
1001          (line-no 0)          (line-no 0)
1002          (err-type "e")          (err-type "e")
# Line 1110  For the format of LINE-ERR-INFO, see `fl Line 1110  For the format of LINE-ERR-INFO, see `fl
1110        inc-dirs)))        inc-dirs)))
1111    
1112  (defcustom flymake-get-project-include-dirs-function 'flymake-get-project-include-dirs-imp  (defcustom flymake-get-project-include-dirs-function 'flymake-get-project-include-dirs-imp
1113    "Function used to get project inc dirs, one paramater: basedir name."    "Function used to get project include dirs, one parameter: basedir name."
1114    :group 'flymake    :group 'flymake
1115    :type 'function)    :type 'function)
1116    
# Line 1139  For the format of LINE-ERR-INFO, see `fl Line 1139  For the format of LINE-ERR-INFO, see `fl
1139      include-dirs))      include-dirs))
1140    
1141  (defun flymake-find-file (rel-file-name include-dirs)  (defun flymake-find-file (rel-file-name include-dirs)
1142    "Iterate through include-dirs to find file REL-FILE-NAME.    "Iterate through INCLUDE-DIRS to find file REL-FILE-NAME.
1143  Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists,  or just REL-FILE-NAME if not."  Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists,  or just REL-FILE-NAME if not."
1144    (let* ((count          (length include-dirs))    (let* ((count          (length include-dirs))
1145           (idx            0)           (idx            0)
# Line 1366  Return first 'INCLUDE-DIRS/REL-FILE-NAME Line 1366  Return first 'INCLUDE-DIRS/REL-FILE-NAME
1366        (flymake-log 1 "no errors for line %d" line-no))))        (flymake-log 1 "no errors for line %d" line-no))))
1367    
1368  (defun flymake-make-err-menu-data (line-no line-err-info-list)  (defun flymake-make-err-menu-data (line-no line-err-info-list)
1369    "Make a (menu-title (item-title item-action)*) list with errors/warnings from line-err-info."    "Make a (menu-title (item-title item-action)*) list with errors/warnings from LINE-ERR-INFO-LIST."
1370    (let* ((menu-items  nil))    (let* ((menu-items  nil))
1371      (when line-err-info-list      (when line-err-info-list
1372        (let* ((count           (length line-err-info-list))        (let* ((count           (length line-err-info-list))
# Line 1431  Return first 'INCLUDE-DIRS/REL-FILE-NAME Line 1431  Return first 'INCLUDE-DIRS/REL-FILE-NAME
1431    (message-box warning))    (message-box warning))
1432    
1433  (defcustom flymake-gui-warnings-enabled t  (defcustom flymake-gui-warnings-enabled t
1434    "Enables/disables gui warnings."    "Enables/disables GUI warnings."
1435    :group 'flymake    :group 'flymake
1436    :type 'boolean)    :type 'boolean)
1437    
# Line 1557  With arg, turn Flymake mode on if and on Line 1557  With arg, turn Flymake mode on if and on
1557            (flymake-er-get-line (nth idx err-info-list))))))            (flymake-er-get-line (nth idx err-info-list))))))
1558    
1559  (defun flymake-get-prev-err-line-no (err-info-list line-no)  (defun flymake-get-prev-err-line-no (err-info-list line-no)
1560    "Return prev line with error."    "Return previous line with error."
1561    (when err-info-list    (when err-info-list
1562      (let* ((count (length err-info-list)))      (let* ((count (length err-info-list)))
1563        (while (and (> count 0) (<= line-no (flymake-er-get-line (nth (1- count) err-info-list))))        (while (and (> count 0) (<= line-no (flymake-er-get-line (nth (1- count) err-info-list))))
# Line 1587  With arg, turn Flymake mode on if and on Line 1587  With arg, turn Flymake mode on if and on
1587        (flymake-log 1 "no errors in current buffer"))))        (flymake-log 1 "no errors in current buffer"))))
1588    
1589  (defun flymake-goto-prev-error ()  (defun flymake-goto-prev-error ()
1590    "Go to prev error in err ring."    "Go to previous error in err ring."
1591    (interactive)    (interactive)
1592    (let ((line-no (flymake-get-prev-err-line-no flymake-err-info (flymake-current-line-no))))    (let ((line-no (flymake-get-prev-err-line-no flymake-err-info (flymake-current-line-no))))
1593      (when (not line-no)      (when (not line-no)

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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