aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-09-26 00:01:27 +0000
committerRichard M. Stallman2005-09-26 00:01:27 +0000
commitf0685ed1d455e2e47b11f1ea9a708a2730a270a4 (patch)
treef27fda52ef4f5756398776216b6126b13bfc56d9
parent96fdce72bb41205baa8f82abb3580682035805db (diff)
downloademacs-f0685ed1d455e2e47b11f1ea9a708a2730a270a4.tar.gz
emacs-f0685ed1d455e2e47b11f1ea9a708a2730a270a4.zip
(compilation-error-properties): When getting the file from the
previous error message, correctly decode the new data format.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/progmodes/compile.el22
2 files changed, 26 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9c9bc0d1eb1..62cd1a6df9e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12005-09-25 Richard M. Stallman <rms@gnu.org>
2
3 * progmodes/compile.el (compilation-error-properties):
4 When getting the file from the previous error message,
5 correctly decode the new data format.
6
7 * progmodes/cc-cmds.el (c-electric-paren):
8 Call old-blink-paren only for close-paren.
9
12005-09-24 Andreas Schwab <schwab@suse.de> 102005-09-24 Andreas Schwab <schwab@suse.de>
2 11
3 * term/rxvt.el (rxvt-register-default-colors): Delete redundant 12 * term/rxvt.el (rxvt-register-default-colors): Delete redundant
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 5ff256e5f8f..3ef1c0c1ff6 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -614,6 +614,7 @@ Faces `compilation-error-face', `compilation-warning-face',
614;; This function is the central driver, called when font-locking to gather 614;; This function is the central driver, called when font-locking to gather
615;; all information needed to later jump to corresponding source code. 615;; all information needed to later jump to corresponding source code.
616;; Return a property list with all meta information on this error location. 616;; Return a property list with all meta information on this error location.
617
617(defun compilation-error-properties (file line end-line col end-col type fmt) 618(defun compilation-error-properties (file line end-line col end-col type fmt)
618 (unless (< (next-single-property-change (match-beginning 0) 'directory nil (point)) 619 (unless (< (next-single-property-change (match-beginning 0) 'directory nil (point))
619 (point)) 620 (point))
@@ -628,11 +629,22 @@ Faces `compilation-error-face', `compilation-warning-face',
628 (get-text-property dir 'directory))))) 629 (get-text-property dir 'directory)))))
629 (setq file (cons file (car dir))))) 630 (setq file (cons file (car dir)))))
630 ;; This message didn't mention one, get it from previous 631 ;; This message didn't mention one, get it from previous
631 (setq file (previous-single-property-change (point) 'message) 632 (let ((prev-pos
632 file (or (if file 633 ;; Find the previous message.
633 (car (nth 2 (car (or (get-text-property (1- file) 'message) 634 (previous-single-property-change (point) 'message)))
634 (get-text-property file 'message)))))) 635 (if prev-pos
635 '("*unknown*")))) 636 ;; Get the file structure that belongs to it.
637 (let* ((prev
638 (or (get-text-property (1- prev-pos) 'message)
639 (get-text-property prev-pos 'message)))
640 (prev-struct
641 (car (nth 2 (car prev)))))
642 ;; Construct FILE . DIR from that.
643 (if prev-struct
644 (setq file (cons (car prev-struct)
645 (cadr prev-struct))))))
646 (unless file
647 (setq file '("*unknown*")))))
636 ;; All of these fields are optional, get them only if we have an index, and 648 ;; All of these fields are optional, get them only if we have an index, and
637 ;; it matched some part of the message. 649 ;; it matched some part of the message.
638 (and line 650 (and line