diff options
| author | Stefan Monnier | 2006-07-11 15:08:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-07-11 15:08:33 +0000 |
| commit | b8fa0ffd0cc04a300b52fbf28ab0850c2f34cc09 (patch) | |
| tree | 41907abc4a3217b36a614b0456fba14dbfa1afd8 | |
| parent | bc684c16bcafecd1f79bef4441ae9d76b0ab3a49 (diff) | |
| download | emacs-b8fa0ffd0cc04a300b52fbf28ab0850c2f34cc09.tar.gz emacs-b8fa0ffd0cc04a300b52fbf28ab0850c2f34cc09.zip | |
(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'.
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 101 |
2 files changed, 65 insertions, 51 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06c13af51da..b15d8f1fb01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,16 @@ | |||
| 1 | 2006-07-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | ||
| 4 | Fix ambiguity introduced by last change. | ||
| 5 | (compilation-find-file): Move save-excursion to where it may | ||
| 6 | make sense. Fix a left over `find-file'. | ||
| 7 | |||
| 1 | 2006-07-11 Robert J. Chassell <bob@rattlesnake.com> | 8 | 2006-07-11 Robert J. Chassell <bob@rattlesnake.com> |
| 2 | 9 | ||
| 3 | * textmodes/texinfmt.el: (texinfo-format-separate-node): | 10 | * textmodes/texinfmt.el: (texinfo-format-separate-node): |
| 4 | Insert a string before point, which fits documentation, not after. | 11 | Insert a string before point, which fits documentation, not after. |
| 5 | (texinfo-multitable-item): In a multitable row, insert any | 12 | (texinfo-multitable-item): In a multitable row, insert any |
| 6 | additional needed @tabs and spaces. | 13 | additional needed @tabs and spaces. |
| 7 | 14 | ||
| 8 | 2006-07-11 Nick Roberts <nickrob@snap.net.nz> | 15 | 2006-07-11 Nick Roberts <nickrob@snap.net.nz> |
| 9 | 16 | ||
| @@ -19,7 +26,7 @@ | |||
| 19 | (tumme-display-properties-format) | 26 | (tumme-display-properties-format) |
| 20 | (tumme-dired-insert-marked-thumbs, tumme-rotate-original) | 27 | (tumme-dired-insert-marked-thumbs, tumme-rotate-original) |
| 21 | (tumme-get-exif-file-name) | 28 | (tumme-get-exif-file-name) |
| 22 | (tumme-thumbnail-set-image-description, tumme-gallery-generate): | 29 | (tumme-thumbnail-set-image-description, tumme-gallery-generate): |
| 23 | Fit to 80 columns. | 30 | Fit to 80 columns. |
| 24 | 31 | ||
| 25 | 2006-07-11 Kim F. Storm <storm@cua.dk> | 32 | 2006-07-11 Kim F. Storm <storm@cua.dk> |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 5f10bec032a..3c63d5f01b1 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -223,8 +223,13 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 223 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) | 223 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) |
| 224 | 224 | ||
| 225 | (gnu | 225 | (gnu |
| 226 | ;; I have no idea what this first line is supposed to match, but it | ||
| 227 | ;; makes things ambiguous with output such as "foo:344:50:blabla" since | ||
| 228 | ;; the "foo" part can match this first line (in which case the file | ||
| 229 | ;; name as "344"). To avoid this, we disallow filenames exclusively | ||
| 230 | ;; composed of digits. --Stef | ||
| 226 | "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ | 231 | "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ |
| 227 | \\(.+?\\): ?\ | 232 | \\([0-9]*[^0-9\n].*?\\): ?\ |
| 228 | \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ | 233 | \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ |
| 229 | \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ | 234 | \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ |
| 230 | \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ | 235 | \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ |
| @@ -293,7 +298,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" | |||
| 293 | \\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) | 298 | \\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) |
| 294 | 299 | ||
| 295 | (gcov-file | 300 | (gcov-file |
| 296 | "^ *-: *\\(0\\):Source:\\(.+\\)$" | 301 | "^ *-: *\\(0\\):Source:\\(.+\\)$" |
| 297 | 2 1 nil 0 nil | 302 | 2 1 nil 0 nil |
| 298 | (1 compilation-line-face prepend) (2 compilation-info-face prepend)) | 303 | (1 compilation-line-face prepend) (2 compilation-info-face prepend)) |
| 299 | (gcov-header | 304 | (gcov-header |
| @@ -312,11 +317,11 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" | |||
| 312 | (1 compilation-line-face prepend)) | 317 | (1 compilation-line-face prepend)) |
| 313 | (gcov-called-line | 318 | (gcov-called-line |
| 314 | "^ *\\([0-9]+\\): *\\([0-9]+\\):.*$" | 319 | "^ *\\([0-9]+\\): *\\([0-9]+\\):.*$" |
| 315 | nil 2 nil 0 nil | 320 | nil 2 nil 0 nil |
| 316 | (0 'default t) | 321 | (0 'default t) |
| 317 | (1 compilation-info-face prepend) (2 compilation-line-face prepend)) | 322 | (1 compilation-info-face prepend) (2 compilation-line-face prepend)) |
| 318 | (gcov-never-called | 323 | (gcov-never-called |
| 319 | "^ *\\(#####\\): *\\([0-9]+\\):.*$" | 324 | "^ *\\(#####\\): *\\([0-9]+\\):.*$" |
| 320 | nil 2 nil 2 nil | 325 | nil 2 nil 2 nil |
| 321 | (0 'default t) | 326 | (0 'default t) |
| 322 | (1 compilation-error-face prepend) (2 compilation-line-face prepend)) | 327 | (1 compilation-error-face prepend) (2 compilation-line-face prepend)) |
| @@ -1796,49 +1801,51 @@ If DIRECTORY. is nil, that means use `default-directory'. | |||
| 1796 | If FILENAME is not found at all, ask the user where to find it. | 1801 | If FILENAME is not found at all, ask the user where to find it. |
| 1797 | Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." | 1802 | Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." |
| 1798 | (or formats (setq formats '("%s"))) | 1803 | (or formats (setq formats '("%s"))) |
| 1799 | (save-excursion | 1804 | (let ((dirs compilation-search-path) |
| 1800 | (let ((dirs compilation-search-path) | 1805 | (spec-dir (if directory |
| 1801 | (spec-dir (if directory | 1806 | (expand-file-name directory) |
| 1802 | (expand-file-name directory) | 1807 | default-directory)) |
| 1803 | default-directory)) | 1808 | buffer thisdir fmts name) |
| 1804 | buffer thisdir fmts name) | 1809 | (if (file-name-absolute-p filename) |
| 1805 | (if (file-name-absolute-p filename) | 1810 | ;; The file name is absolute. Use its explicit directory as |
| 1806 | ;; The file name is absolute. Use its explicit directory as | 1811 | ;; the first in the search path, and strip it from FILENAME. |
| 1807 | ;; the first in the search path, and strip it from FILENAME. | 1812 | (setq filename (abbreviate-file-name (expand-file-name filename)) |
| 1808 | (setq filename (abbreviate-file-name (expand-file-name filename)) | 1813 | dirs (cons (file-name-directory filename) dirs) |
| 1809 | dirs (cons (file-name-directory filename) dirs) | 1814 | filename (file-name-nondirectory filename))) |
| 1810 | filename (file-name-nondirectory filename))) | 1815 | ;; Now search the path. |
| 1811 | ;; Now search the path. | 1816 | (while (and dirs (null buffer)) |
| 1812 | (while (and dirs (null buffer)) | 1817 | (setq thisdir (or (car dirs) spec-dir) |
| 1813 | (setq thisdir (or (car dirs) spec-dir) | 1818 | fmts formats) |
| 1814 | fmts formats) | 1819 | ;; For each directory, try each format string. |
| 1815 | ;; For each directory, try each format string. | 1820 | (while (and fmts (null buffer)) |
| 1816 | (while (and fmts (null buffer)) | 1821 | (setq name (expand-file-name (format (car fmts) filename) thisdir) |
| 1817 | (setq name (expand-file-name (format (car fmts) filename) thisdir) | 1822 | buffer (and (file-exists-p name) |
| 1818 | buffer (and (file-exists-p name) | 1823 | (find-file-noselect name)) |
| 1819 | (find-file-noselect name)) | 1824 | fmts (cdr fmts))) |
| 1820 | fmts (cdr fmts))) | 1825 | (setq dirs (cdr dirs))) |
| 1821 | (setq dirs (cdr dirs))) | 1826 | (or buffer |
| 1822 | (or buffer | 1827 | ;; The file doesn't exist. Ask the user where to find it. |
| 1823 | ;; The file doesn't exist. Ask the user where to find it. | 1828 | (save-excursion ;This save-excursion is probably not right. |
| 1824 | (let ((pop-up-windows t)) | 1829 | (let ((pop-up-windows t)) |
| 1825 | (compilation-set-window (display-buffer (marker-buffer marker)) | 1830 | (compilation-set-window (display-buffer (marker-buffer marker)) |
| 1826 | marker) | 1831 | marker) |
| 1827 | (let ((name (expand-file-name | 1832 | (let ((name (expand-file-name |
| 1828 | (read-file-name | 1833 | (read-file-name |
| 1829 | (format "Find this %s in (default %s): " | 1834 | (format "Find this %s in (default %s): " |
| 1830 | compilation-error filename) | 1835 | compilation-error filename) |
| 1831 | spec-dir filename t)))) | 1836 | spec-dir filename t)))) |
| 1832 | (if (file-directory-p name) | 1837 | (if (file-directory-p name) |
| 1833 | (setq name (expand-file-name filename name))) | 1838 | (setq name (expand-file-name filename name))) |
| 1834 | (setq buffer (and (file-exists-p name) | 1839 | (setq buffer (and (file-exists-p name) |
| 1835 | (find-file name)))))) | 1840 | (find-file-noselect name))))))) |
| 1836 | ;; Make intangible overlays tangible. | 1841 | ;; Make intangible overlays tangible. |
| 1837 | (mapcar (function (lambda (ov) | 1842 | ;; This is very weird: it's not even clear which is the current buffer, |
| 1838 | (when (overlay-get ov 'intangible) | 1843 | ;; so the code below can't be expected to DTRT here. --Stef |
| 1839 | (overlay-put ov 'intangible nil)))) | 1844 | (mapcar (function (lambda (ov) |
| 1840 | (overlays-in (point-min) (point-max))) | 1845 | (when (overlay-get ov 'intangible) |
| 1841 | buffer))) | 1846 | (overlay-put ov 'intangible nil)))) |
| 1847 | (overlays-in (point-min) (point-max))) | ||
| 1848 | buffer)) | ||
| 1842 | 1849 | ||
| 1843 | (defun compilation-get-file-structure (file &optional fmt) | 1850 | (defun compilation-get-file-structure (file &optional fmt) |
| 1844 | "Retrieve FILE's file-structure or create a new one. | 1851 | "Retrieve FILE's file-structure or create a new one. |