Show
Ignore:
Timestamp:
07/29/06 07:48:34 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/progmodes/compile.el

    r4111 r4131  
    227227     ;; makes things ambiguous with output such as "foo:344:50:blabla" since 
    228228     ;; the "foo" part can match this first line (in which case the file 
    229      ;; name as "344").  To avoid this, we disallow filenames exclusively 
    230      ;; composed of digits.  --Stef 
     229     ;; name as "344").  To avoid this, the second line disallows filenames 
     230     ;; exclusively composed of digits.  --Stef 
     231     ;; Similarly, we get lots of false positives with messages including 
     232     ;; times of the form "HH:MM:SS" where MM is taken as a line number, so 
     233     ;; the last line tries to rule out message where the info after the 
     234     ;; line number starts with "SS".  --Stef 
    231235     "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ 
    232236\\([0-9]*[^0-9\n].*?\\): ?\ 
     
    234238\\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ 
    235239\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ 
    236  *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\)\\)?" 
     240 *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\)\\|\ 
     241\[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" 
    237242     1 (2 . 5) (4 . 6) (7 . 8)) 
    238243 
     
    406411 
    407412(defvar compilation-mode-font-lock-keywords 
    408    '(;; Don't highlight this as a compilation message. 
    409      ("^Compilation started at.*" 
    410       (0 '(face nil message nil help-echo nil mouse-face nil) t)) 
    411      ;; configure output lines. 
     413   '(;; configure output lines. 
    412414     ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" 
    413415      (1 font-lock-variable-name-face) 
     
    420422      (0 '(face nil message nil help-echo nil mouse-face nil) t) 
    421423      (1 compilation-info-face)) 
    422      ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" 
     424     ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\|segmentation fault\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" 
    423425      (0 '(face nil message nil help-echo nil mouse-face nil) t) 
    424426      (1 compilation-error-face) 
     
    18241826              fmts (cdr fmts))) 
    18251827      (setq dirs (cdr dirs))) 
    1826     (or buffer 
    1827         ;; The file doesn't exist.  Ask the user where to find it. 
    1828         (save-excursion          ;This save-excursion is probably not right. 
    1829           (let ((pop-up-windows t)) 
    1830             (compilation-set-window (display-buffer (marker-buffer marker)) 
    1831                                     marker) 
    1832             (let ((name (expand-file-name 
    1833                          (read-file-name 
    1834                           (format "Find this %s in (default %s): " 
    1835                                   compilation-error filename) 
    1836                           spec-dir filename t)))) 
    1837               (if (file-directory-p name) 
    1838                   (setq name (expand-file-name filename name))) 
    1839               (setq buffer (and (file-exists-p name) 
    1840                                 (find-file-noselect name))))))) 
     1828    (while (null buffer)    ;Repeat until the user selects an existing file. 
     1829      ;; The file doesn't exist.  Ask the user where to find it. 
     1830      (save-excursion            ;This save-excursion is probably not right. 
     1831        (let ((pop-up-windows t)) 
     1832          (compilation-set-window (display-buffer (marker-buffer marker)) 
     1833                                  marker) 
     1834          (let* ((name (read-file-name 
     1835                        (format "Find this %s in (default %s): " 
     1836                                compilation-error filename) 
     1837                        spec-dir filename t nil 
     1838                        ;; Try to make sure the user can only select 
     1839                        ;; a valid answer.  This predicate may be ignored, 
     1840                        ;; tho, so we still have to double-check afterwards. 
     1841                        ;; TODO: We should probably fix read-file-name so 
     1842                        ;; that it never ignores this predicate, even when 
     1843                        ;; using popup dialog boxes. 
     1844                        (lambda (name) 
     1845                          (if (file-directory-p name) 
     1846                              (setq name (expand-file-name filename name))) 
     1847                          (file-exists-p name)))) 
     1848                 (origname name)) 
     1849            (cond 
     1850             ((not (file-exists-p name)) 
     1851              (message "Cannot find file `%s'" name) 
     1852              (ding) (sit-for 2)) 
     1853             ((and (file-directory-p name) 
     1854                   (not (file-exists-p 
     1855                         (setq name (expand-file-name filename name))))) 
     1856              (message "No `%s' in directory %s" filename origname) 
     1857              (ding) (sit-for 2)) 
     1858             (t 
     1859              (setq buffer (find-file-noselect name)))))))) 
    18411860    ;; Make intangible overlays tangible. 
    1842     ;; This is very weird: it's not even clear which is the current buffer, 
    1843     ;; so the code below can't be expected to DTRT here.  --Stef 
    1844     (mapcar (function (lambda (ov) 
    1845                         (when (overlay-get ov 'intangible) 
    1846                           (overlay-put ov 'intangible nil)))) 
    1847             (overlays-in (point-min) (point-max))) 
     1861    ;; This is weird: it's not even clear which is the current buffer, 
     1862    ;; so the code below can't be expected to DTRT here.  -- Stef 
     1863    (dolist (ov (overlays-in (point-min) (point-max))) 
     1864      (when (overlay-get ov 'intangible) 
     1865        (overlay-put ov 'intangible nil))) 
    18481866    buffer)) 
    18491867