From: Stefan Monnier Date: Thu, 19 Jul 2001 21:46:37 +0000 (+0000) Subject: (compilation-parse-errors): `linenum' might return a this-error using X-Git-Tag: emacs-pretest-21.0.105~439 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b6858da26e4e6671ee93b67b921a86309b3d6a2;p=emacs.git (compilation-parse-errors): `linenum' might return a this-error using the alternative format (a pair of markers). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1fef44b867..94a88539600 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,10 +1,15 @@ +2001-07-19 Stefan Monnier + + * progmodes/compile.el (compilation-parse-errors): `linenum' might + return a this-error using the alternative format (a pair of markers). + 2001-07-19 Gerd Moellmann * font-lock.el (c++-keywords): Add Standard C++ operator names. * mail/mh-utils.el (mh-find-progs): Also search in `lib'. From Mats Bengtsson , - + 2001-07-17 Pavel Jan,Bm(Bk * international/iso-transl.el: Fix typo in the header of the file. @@ -16,7 +21,7 @@ 2001-07-17 Eli Zaretskii - * toolbar/tool-bar.el (tool-bar-add-item-from-menu) + * toolbar/tool-bar.el (tool-bar-add-item-from-menu) (tool-bar-add-item): Don't call image-related primitives if the display doesn't support images. @@ -34,8 +39,8 @@ 2000-07-17 Han-Wen Nienhuys - * server.el (server-process-filter, server-visit-files): Add - support for +LINE:COLUMN style emacsclient calls. + * server.el (server-process-filter, server-visit-files): + Add support for +LINE:COLUMN style emacsclient calls. 2001-07-16 Pavel Jan,Bm(Bk @@ -47,6 +52,14 @@ * play/handwrite.el: Author is no more reachable. +2001-07-17 Stefan Monnier + + * term/sun.el (ignore-key, sun-esc-bracket, meta-flag): Remove. + (sun-raw-prefix): Replace t3, t4, t6, and t7 with f3, f4, f6 and f7. + Complete bindings for F<1..12> keys. + (global-map): Remove `undo' binding (already in the default). + Replace `t' bindings with `f' bindings. + 2001-07-16 Stefan Monnier * progmodes/tcl.el (tcl-fill-mode-map): Use tcl-indent-exp. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 3eff86d2ce4..cc899ba20a6 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -264,10 +264,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2) ;; E, file.cc(35,52) Illegal operation on pointers ("[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3) -;;; This seems to be superfluous because the first pattern matches it. -;;; ;; GNU messages with program name and optional column number. -;;; ("[a-zA-Z]?:?[^0-9 \n\t:]+[^ \n\t:]*:[ \t]*\\([^ \n\t:]+\\):\ -;;;\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4) + ;; This seems to be superfluous because the first pattern matches it. + ;; ;; GNU messages with program name and optional column number. + ;; ("[a-zA-Z]?:?[^0-9 \n\t:]+[^ \n\t:]*:[ \t]*\\([^ \n\t:]+\\):\ + ;;\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4) ;; Cray C compiler error messages ("\\(cc\\| cft\\)-[0-9]+ c\\(c\\|f77\\): ERROR \\([^,\n]+, \\)* File = \ @@ -407,13 +407,13 @@ Otherwise, it saves all modified buffers without asking." ;; Currently zgrep has trouble. It runs egrep instead of grep, ;; and it doesn't pass along long options right. "grep" -;;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path -;;; (call-process "zgrep" nil nil nil -;;; "foo" null-device) -;;; (error nil)) -;;; 1) -;;; "zgrep" -;;; "grep") + ;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path + ;; (call-process "zgrep" nil nil nil + ;; "foo" null-device) + ;; (error nil)) + ;; 1) + ;; "zgrep" + ;; "grep") "The default grep program for `grep-command' and `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called.") @@ -453,14 +453,12 @@ Sometimes it is useful for files to supply local values for this variable. You might also use mode hooks to specify it in certain modes, like this: (add-hook 'c-mode-hook - (function (lambda () (unless (or (file-exists-p \"makefile\") (file-exists-p \"Makefile\")) - (make-local-variable 'compile-command) - (setq compile-command - (concat \"make -k \" - (file-name-sans-extension buffer-file-name)))))))" + (set (make-local-variable 'compile-command) + (concat \"make -k \" + (file-name-sans-extension buffer-file-name))))))" :type 'string :group 'compilation) @@ -535,19 +533,20 @@ to a function that generates a unique name." (interactive (if (or compilation-read-command current-prefix-arg) (list (read-from-minibuffer "Compile command: " - compile-command nil nil + (eval compile-command) nil nil '(compile-history . 1))) - (list compile-command))) - (setq compile-command command) + (list (eval compile-command)))) + (unless (equal command (eval compile-command)) + (setq compile-command command)) (save-some-buffers (not compilation-ask-about-save) nil) - (compile-internal compile-command "No more errors")) + (compile-internal command "No more errors")) -;;; run compile with the default command line +;; run compile with the default command line (defun recompile () "Re-compile the program including the current buffer." (interactive) (save-some-buffers (not compilation-ask-about-save) nil) - (compile-internal compile-command "No more errors")) + (compile-internal (eval compile-command) "No more errors")) (defun grep-process-setup () "Set up `compilation-exit-message-function' for `grep'." @@ -773,7 +772,8 @@ Returns the compilation buffer created." (save-excursion (set-buffer outbuf) (compilation-mode name-of-mode) - ;; (setq buffer-read-only t) ;;; Non-ergonomic. + ;; In what way is it non-ergonomic ? -stef + ;; (toggle-read-only 1) ;;; Non-ergonomic. (set (make-local-variable 'compilation-parse-errors-function) parser) (set (make-local-variable 'compilation-error-message) error-message) (set (make-local-variable 'compilation-error-regexp-alist) @@ -1663,11 +1663,11 @@ Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." (let ((dirs compilation-search-path) buffer thisdir fmts name) (if (file-name-absolute-p filename) - ;; The file name is absolute. Use its explicit directory as - ;; the first in the search path, and strip it from FILENAME. - (setq filename (abbreviate-file-name (expand-file-name filename)) - dirs (cons (file-name-directory filename) dirs) - filename (file-name-nondirectory filename))) + ;; The file name is absolute. Use its explicit directory as + ;; the first in the search path, and strip it from FILENAME. + (setq filename (abbreviate-file-name (expand-file-name filename)) + dirs (cons (file-name-directory filename) dirs) + filename (file-name-nondirectory filename))) ;; Now search the path. (while (and dirs (null buffer)) (setq thisdir (or (car dirs) dir) @@ -1898,9 +1898,17 @@ An error message with no file name and no file name has been seen earlier")) find-at-least)) (and limit-search (>= end-of-match limit-search))) - (not (equal ; Same filename? - (car (cdr (car compilation-error-list))) - (car (cdr this-error))))) + ;; `this-error' could contain a pair of + ;; markers already. + (let ((thispos (cdr this-error)) + (lastpos (cdar compilation-error-list))) + (not (equal + (if (markerp thispos) + (marker-buffer thispos) + (car thispos)) + (if (markerp lastpos) + (marker-buffer lastpos) + (car lastpos)))))) ;; We are past the limits and the last error ;; parsed, didn't belong to the same source file ;; as the earlier ones i.e. we have seen all the @@ -1981,9 +1989,9 @@ An error message with no file name and no file name has been seen earlier")) (set-marker compilation-parsing-end (point)) (setq compilation-error-list (nreverse compilation-error-list)) -;;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen." -;;; compilation-num-errors-found -;;; (/ (* 100.0 (point)) (point-max))) + ;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen." + ;; compilation-num-errors-found + ;; (/ (* 100.0 (point)) (point-max))) (message "Parsing error messages...done."))) (defun compile-collect-regexps (type this)