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

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

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

revision 1.276.2.3 by miles, Fri Aug 27 07:00:28 2004 UTC revision 1.276.2.4 by miles, Sat Sep 4 09:14:25 2004 UTC
# Line 458  starting the compilation process.") Line 458  starting the compilation process.")
458    :version "21.4")    :version "21.4")
459    
460  (defface compilation-info-face  (defface compilation-info-face
461    '((((class color) (min-colors 16) (background light))    '((((class color) (min-colors 16) (background light))
462       (:foreground "Green3" :weight bold))       (:foreground "Green3" :weight bold))
463      (((class color) (min-colors 16) (background dark))      (((class color) (min-colors 16) (background dark))
464       (:foreground "Green" :weight bold))       (:foreground "Green" :weight bold))
465      (((class color)) (:foreground "green" :weight bold))      (((class color)) (:foreground "green" :weight bold))
466      (t (:weight bold)))      (t (:weight bold)))
# Line 579  Faces `compilation-error-face', `compila Line 579  Faces `compilation-error-face', `compila
579      (and end-line      (and end-line
580           (setq end-line (match-string-no-properties end-line))           (setq end-line (match-string-no-properties end-line))
581           (setq end-line (string-to-number end-line)))           (setq end-line (string-to-number end-line)))
582      (and col      (if col
583           (setq col (match-string-no-properties col))          (if (functionp col)
584           (setq col (- (string-to-number col) compilation-first-column)))              (setq col (funcall col))
585      (if (and end-col (setq end-col (match-string-no-properties end-col)))            (and
586          (setq end-col (- (string-to-number end-col) compilation-first-column -1))             (setq col (match-string-no-properties col))
587        (if end-line (setq end-col -1)))             (setq col (- (string-to-number col) compilation-first-column)))))
588        (if (and end-col (functionp end-col))
589            (setq end-col (funcall end-col))
590          (if (and end-col (setq end-col (match-string-no-properties end-col)))
591              (setq end-col (- (string-to-number end-col) compilation-first-column -1))
592            (if end-line (setq end-col -1))))
593      (if (consp type)                    ; not a static type, check what it is.      (if (consp type)                    ; not a static type, check what it is.
594          (setq type (or (and (car type) (match-end (car type)) 1)          (setq type (or (and (car type) (match-end (car type)) 1)
595                         (and (cdr type) (match-end (cdr type)) 0)                         (and (cdr type) (match-end (cdr type)) 0)
# Line 726  FILE should be (ABSOLUTE-FILENAME) or (R Line 731  FILE should be (ABSOLUTE-FILENAME) or (R
731                ,@(when end-line                ,@(when end-line
732                    `((,end-line compilation-line-face nil t)))                    `((,end-line compilation-line-face nil t)))
733    
734                ,@(when col                ,@(when (integerp col)
735                    `((,col compilation-column-face nil t)))                    `((,col compilation-column-face nil t)))
736                ,@(when end-col                ,@(when (integerp end-col)
737                    `((,end-col compilation-column-face nil t)))                    `((,end-col compilation-column-face nil t)))
738    
739                ,@(nthcdr 6 item)                ,@(nthcdr 6 item)
# Line 789  If this is run in a Compilation mode buf Line 794  If this is run in a Compilation mode buf
794  original use.  Otherwise, recompile using `compile-command'."  original use.  Otherwise, recompile using `compile-command'."
795    (interactive)    (interactive)
796    (save-some-buffers (not compilation-ask-about-save) nil)    (save-some-buffers (not compilation-ask-about-save) nil)
797    (let ((default-directory (or compilation-directory default-directory)))    (let ((default-directory
798              (or (and (not (eq major-mode (nth 1 compilation-arguments)))
799                       compilation-directory)
800                  default-directory)))
801      (apply 'compilation-start (or compilation-arguments      (apply 'compilation-start (or compilation-arguments
802                                    `(,(eval compile-command))))))                                    `(,(eval compile-command))))))
803    
# Line 816  Otherwise, construct a buffer name from Line 824  Otherwise, construct a buffer name from
824           (funcall name-function mode-name))           (funcall name-function mode-name))
825          (compilation-buffer-name-function          (compilation-buffer-name-function
826           (funcall compilation-buffer-name-function mode-name))           (funcall compilation-buffer-name-function mode-name))
827          ((and (eq major-mode 'compilation-mode)          ((eq major-mode (nth 1 compilation-arguments))
               (equal mode-name (nth 2 compilation-arguments)))  
828           (buffer-name))           (buffer-name))
829          (t          (t
830           (concat "*" (downcase mode-name) "*"))))           (concat "*" (downcase mode-name) "*"))))
# Line 1522  If nil, don't scroll the compilation out Line 1529  If nil, don't scroll the compilation out
1529    
1530  (defun compilation-goto-locus (msg mk end-mk)  (defun compilation-goto-locus (msg mk end-mk)
1531    "Jump to an error corresponding to MSG at MK.    "Jump to an error corresponding to MSG at MK.
1532  All arguments are markers.  If END-MK is non nil, mark is set there."  All arguments are markers.  If END-MK is non-nil, mark is set there
1533    and overlay is highlighted between MK and END-MK."
1534    (if (eq (window-buffer (selected-window))    (if (eq (window-buffer (selected-window))
1535            (marker-buffer msg))            (marker-buffer msg))
1536        ;; If the compilation buffer window is selected,        ;; If the compilation buffer window is selected,
# Line 1538  All arguments are markers.  If END-MK is Line 1546  All arguments are markers.  If END-MK is
1546      (widen)      (widen)
1547      (goto-char mk))      (goto-char mk))
1548    (if end-mk    (if end-mk
1549        (push-mark end-mk nil t)        (push-mark end-mk t)
1550      (if mark-active (setq mark-active)))      (if mark-active (setq mark-active)))
1551    ;; If hideshow got in the way of    ;; If hideshow got in the way of
1552    ;; seeing the right place, open permanently.    ;; seeing the right place, open permanently.
# Line 1559  All arguments are markers.  If END-MK is Line 1567  All arguments are markers.  If END-MK is
1567                               compilation-highlight-regexp)))                               compilation-highlight-regexp)))
1568      (compilation-set-window-height w)      (compilation-set-window-height w)
1569    
1570      (when (and highlight-regexp      (when highlight-regexp
                (not (and end-mk transient-mark-mode)))  
1571        (unless compilation-highlight-overlay        (unless compilation-highlight-overlay
1572          (setq compilation-highlight-overlay          (setq compilation-highlight-overlay
1573                (make-overlay (point-min) (point-min)))                (make-overlay (point-min) (point-min)))
1574          (overlay-put compilation-highlight-overlay 'face 'region))          (overlay-put compilation-highlight-overlay 'face 'next-error))
1575        (with-current-buffer (marker-buffer mk)        (with-current-buffer (marker-buffer mk)
1576          (save-excursion          (save-excursion
1577            (end-of-line)            (if end-mk (goto-char end-mk) (end-of-line))
1578            (let ((end (point)))            (let ((end (point)))
1579              (beginning-of-line)              (if mk (goto-char mk) (beginning-of-line))
1580              (if (and (stringp highlight-regexp)              (if (and (stringp highlight-regexp)
1581                       (re-search-forward highlight-regexp end t))                       (re-search-forward highlight-regexp end t))
1582                  (progn                  (progn
1583                    (goto-char (match-beginning 0))                    (goto-char (match-beginning 0))
1584                    (move-overlay compilation-highlight-overlay (match-beginning 0) (match-end 0)))                    (move-overlay compilation-highlight-overlay
1585                (move-overlay compilation-highlight-overlay (point) end))                                  (match-beginning 0) (match-end 0)
1586              (sit-for 0.5)                                  (current-buffer)))
1587              (delete-overlay compilation-highlight-overlay)))))))                (move-overlay compilation-highlight-overlay
1588                                (point) end (current-buffer)))
1589                (if (numberp next-error-highlight)
1590                    (sit-for next-error-highlight))
1591                (if (not (eq next-error-highlight t))
1592                    (delete-overlay compilation-highlight-overlay))))))
1593        (when (and (eq next-error-highlight 'fringe-arrow))
1594          (set (make-local-variable 'overlay-arrow-position)
1595               (copy-marker (line-beginning-position))))))
1596    
1597  (defun compilation-find-file (marker filename dir &rest formats)  (defun compilation-find-file (marker filename dir &rest formats)
1598    "Find a buffer for file FILENAME.    "Find a buffer for file FILENAME.

Legend:
Removed from v.1.276.2.3  
changed lines
  Added in v.1.276.2.4

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