Mercurial > emacs
changeset 71789:aa53161fdb21
(compilation-error-regexp-alist-alist): Fix ambiguity introduced by last change.
(compilation-find-file): Move save-excursion to where it may make sense.
Fix a left over `find-file'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 11 Jul 2006 15:08:33 +0000 |
parents | c4527316e616 |
children | 8a30c071b5fb |
files | lisp/ChangeLog lisp/progmodes/compile.el |
diffstat | 2 files changed, 65 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Jul 11 15:03:24 2006 +0000 +++ b/lisp/ChangeLog Tue Jul 11 15:08:33 2006 +0000 @@ -1,9 +1,16 @@ +2006-07-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Fix ambiguity introduced by last change. + (compilation-find-file): Move save-excursion to where it may + make sense. Fix a left over `find-file'. + 2006-07-11 Robert J. Chassell <bob@rattlesnake.com> * textmodes/texinfmt.el: (texinfo-format-separate-node): - Insert a string before point, which fits documentation, not after. - (texinfo-multitable-item): In a multitable row, insert any - additional needed @tabs and spaces. + Insert a string before point, which fits documentation, not after. + (texinfo-multitable-item): In a multitable row, insert any + additional needed @tabs and spaces. 2006-07-11 Nick Roberts <nickrob@snap.net.nz> @@ -19,7 +26,7 @@ (tumme-display-properties-format) (tumme-dired-insert-marked-thumbs, tumme-rotate-original) (tumme-get-exif-file-name) - (tumme-thumbnail-set-image-description, tumme-gallery-generate): + (tumme-thumbnail-set-image-description, tumme-gallery-generate): Fit to 80 columns. 2006-07-11 Kim F. Storm <storm@cua.dk>
--- a/lisp/progmodes/compile.el Tue Jul 11 15:03:24 2006 +0000 +++ b/lisp/progmodes/compile.el Tue Jul 11 15:08:33 2006 +0000 @@ -223,8 +223,13 @@ \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) (gnu + ;; I have no idea what this first line is supposed to match, but it + ;; makes things ambiguous with output such as "foo:344:50:blabla" since + ;; the "foo" part can match this first line (in which case the file + ;; name as "344"). To avoid this, we disallow filenames exclusively + ;; composed of digits. --Stef "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ -\\(.+?\\): ?\ +\\([0-9]*[^0-9\n].*?\\): ?\ \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ @@ -293,7 +298,7 @@ \\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) (gcov-file - "^ *-: *\\(0\\):Source:\\(.+\\)$" + "^ *-: *\\(0\\):Source:\\(.+\\)$" 2 1 nil 0 nil (1 compilation-line-face prepend) (2 compilation-info-face prepend)) (gcov-header @@ -312,11 +317,11 @@ (1 compilation-line-face prepend)) (gcov-called-line "^ *\\([0-9]+\\): *\\([0-9]+\\):.*$" - nil 2 nil 0 nil + nil 2 nil 0 nil (0 'default t) (1 compilation-info-face prepend) (2 compilation-line-face prepend)) (gcov-never-called - "^ *\\(#####\\): *\\([0-9]+\\):.*$" + "^ *\\(#####\\): *\\([0-9]+\\):.*$" nil 2 nil 2 nil (0 'default t) (1 compilation-error-face prepend) (2 compilation-line-face prepend)) @@ -1796,49 +1801,51 @@ If FILENAME is not found at all, ask the user where to find it. Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." (or formats (setq formats '("%s"))) - (save-excursion - (let ((dirs compilation-search-path) - (spec-dir (if directory - (expand-file-name directory) - default-directory)) - 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))) - ;; Now search the path. - (while (and dirs (null buffer)) - (setq thisdir (or (car dirs) spec-dir) - fmts formats) - ;; For each directory, try each format string. - (while (and fmts (null buffer)) - (setq name (expand-file-name (format (car fmts) filename) thisdir) - buffer (and (file-exists-p name) - (find-file-noselect name)) - fmts (cdr fmts))) - (setq dirs (cdr dirs))) - (or buffer - ;; The file doesn't exist. Ask the user where to find it. - (let ((pop-up-windows t)) - (compilation-set-window (display-buffer (marker-buffer marker)) - marker) - (let ((name (expand-file-name - (read-file-name - (format "Find this %s in (default %s): " - compilation-error filename) - spec-dir filename t)))) - (if (file-directory-p name) - (setq name (expand-file-name filename name))) - (setq buffer (and (file-exists-p name) - (find-file name)))))) - ;; Make intangible overlays tangible. - (mapcar (function (lambda (ov) - (when (overlay-get ov 'intangible) - (overlay-put ov 'intangible nil)))) - (overlays-in (point-min) (point-max))) - buffer))) + (let ((dirs compilation-search-path) + (spec-dir (if directory + (expand-file-name directory) + default-directory)) + 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))) + ;; Now search the path. + (while (and dirs (null buffer)) + (setq thisdir (or (car dirs) spec-dir) + fmts formats) + ;; For each directory, try each format string. + (while (and fmts (null buffer)) + (setq name (expand-file-name (format (car fmts) filename) thisdir) + buffer (and (file-exists-p name) + (find-file-noselect name)) + fmts (cdr fmts))) + (setq dirs (cdr dirs))) + (or buffer + ;; The file doesn't exist. Ask the user where to find it. + (save-excursion ;This save-excursion is probably not right. + (let ((pop-up-windows t)) + (compilation-set-window (display-buffer (marker-buffer marker)) + marker) + (let ((name (expand-file-name + (read-file-name + (format "Find this %s in (default %s): " + compilation-error filename) + spec-dir filename t)))) + (if (file-directory-p name) + (setq name (expand-file-name filename name))) + (setq buffer (and (file-exists-p name) + (find-file-noselect name))))))) + ;; Make intangible overlays tangible. + ;; This is very weird: it's not even clear which is the current buffer, + ;; so the code below can't be expected to DTRT here. --Stef + (mapcar (function (lambda (ov) + (when (overlay-get ov 'intangible) + (overlay-put ov 'intangible nil)))) + (overlays-in (point-min) (point-max))) + buffer)) (defun compilation-get-file-structure (file &optional fmt) "Retrieve FILE's file-structure or create a new one.