[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el [emacs-unicode-
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el [emacs-unicode-2] |
Date: |
Fri, 19 Nov 2004 02:19:45 -0500 |
Index: emacs/lisp/progmodes/compile.el
diff -c emacs/lisp/progmodes/compile.el:1.276.2.9
emacs/lisp/progmodes/compile.el:1.276.2.10
*** emacs/lisp/progmodes/compile.el:1.276.2.9 Fri Nov 12 02:53:02 2004
--- emacs/lisp/progmodes/compile.el Fri Nov 19 06:55:10 2004
***************
*** 1,7 ****
;;; compile.el --- run compiler as inferior of Emacs, parse error messages
! ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 03, 2004
! ;; Free Software Foundation, Inc.
;; Authors: Roland McGrath <address@hidden>,
;; Daniel Pfeiffer <address@hidden>
--- 1,7 ----
;;; compile.el --- run compiler as inferior of Emacs, parse error messages
! ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
! ;; 2001, 2003, 2004 Free Software Foundation, Inc.
;; Authors: Roland McGrath <address@hidden>,
;; Daniel Pfeiffer <address@hidden>
***************
*** 606,611 ****
--- 606,619 ----
2)))
(compilation-internal-error-properties file line end-line col end-col
type fmt)))
+ (defun compilation-move-to-column (col screen)
+ "Go to column COL on the current line.
+ If SCREEN is non-nil, columns are screen columns, otherwise, they are
+ just char-counts."
+ (if screen
+ (move-to-column col)
+ (goto-char (min (+ (line-beginning-position) col) (line-end-position)))))
+
(defun compilation-internal-error-properties (file line end-line col end-col
type fmt)
"Get the meta-info that will be added as text-properties.
LINE, END-LINE, COL, END-COL are integers or nil.
***************
*** 638,656 ****
(goto-char (marker-position marker))
(when (or end-col end-line)
(beginning-of-line (- (or end-line line) marker-line -1))
! (if (< end-col 0)
(end-of-line)
! (if compilation-error-screen-columns
! (move-to-column end-col)
! (forward-char end-col)))
(setq end-marker (list (point-marker))))
(beginning-of-line (if end-line
! (- end-line line -1)
(- loc marker-line -1)))
(if col
! (if compilation-error-screen-columns
! (move-to-column col)
! (forward-char col))
(forward-to-indentation 0))
(setq marker (list (point-marker))))))
--- 646,662 ----
(goto-char (marker-position marker))
(when (or end-col end-line)
(beginning-of-line (- (or end-line line) marker-line -1))
! (if (or (null end-col) (< end-col 0))
(end-of-line)
! (compilation-move-to-column
! end-col compilation-error-screen-columns))
(setq end-marker (list (point-marker))))
(beginning-of-line (if end-line
! (- line end-line -1)
(- loc marker-line -1)))
(if col
! (compilation-move-to-column
! col compilation-error-screen-columns)
(forward-to-indentation 0))
(setq marker (list (point-marker))))))
***************
*** 1144,1149 ****
--- 1150,1156 ----
(set (make-local-variable 'page-delimiter)
compilation-page-delimiter)
(compilation-setup)
+ (setq buffer-read-only t)
(run-mode-hooks 'compilation-mode-hook))
(defmacro define-compilation-mode (mode name doc &rest body)
***************
*** 1206,1213 ****
"Prepare the buffer for the compilation parsing commands to work.
Optional argument MINOR indicates this is called from
`compilation-minor-mode'."
- (unless minor
- (setq buffer-read-only t))
(make-local-variable 'compilation-current-error)
(make-local-variable 'compilation-messages-start)
(make-local-variable 'compilation-error-screen-columns)
--- 1213,1218 ----
***************
*** 1491,1500 ****
(if (car col)
(if (eq (car col) -1) ; special case for range end
(end-of-line)
! (if columns
! (move-to-column (car col))
! (beginning-of-line)
! (forward-char (car col))))
(beginning-of-line)
(skip-chars-forward " \t"))
(if (nth 3 col)
--- 1496,1502 ----
(if (car col)
(if (eq (car col) -1) ; special case for range end
(end-of-line)
! (compilation-move-to-column (car col) columns))
(beginning-of-line)
(skip-chars-forward " \t"))
(if (nth 3 col)