diff options
| author | Glenn Morris | 2008-06-21 20:30:00 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-06-21 20:30:00 +0000 |
| commit | 321d9c42c4496b1bdd444df79499673604396d7c (patch) | |
| tree | 0a47a74139ca628bb97bd1799c426d3300d95c56 | |
| parent | 231f8f3f112875f5bb028079ed1538ea6413aaff (diff) | |
| download | emacs-321d9c42c4496b1bdd444df79499673604396d7c.tar.gz emacs-321d9c42c4496b1bdd444df79499673604396d7c.zip | |
(bug-reference-fontify): Revert previous change that saved match data.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/progmodes/bug-reference.el | 23 |
2 files changed, 11 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4fc1e994541..9739db2ad4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | rather than mouse-1. | 20 | rather than mouse-1. |
| 21 | (bug-reference-url-format): Autoload safe if string. | 21 | (bug-reference-url-format): Autoload safe if string. |
| 22 | (bug-reference-bug-regexp): Make space after "bug" optional. | 22 | (bug-reference-bug-regexp): Make space after "bug" optional. |
| 23 | (bug-reference-fontify): Save match data. | ||
| 24 | 23 | ||
| 25 | * Makefile.in (all): Explicitly pass EMACS to sub-make, | 24 | * Makefile.in (all): Explicitly pass EMACS to sub-make, |
| 26 | for some non-GNU makes. | 25 | for some non-GNU makes. |
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index d98604a2afd..26ae2d57cce 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -77,18 +77,17 @@ There is no default setting for this, it must be set per file.") | |||
| 77 | ;; Remove old overlays. | 77 | ;; Remove old overlays. |
| 78 | (bug-reference-unfontify beg-line end-line) | 78 | (bug-reference-unfontify beg-line end-line) |
| 79 | (goto-char beg-line) | 79 | (goto-char beg-line) |
| 80 | (save-match-data | 80 | (while (and (< (point) end-line) |
| 81 | (while (and (< (point) end-line) | 81 | (re-search-forward bug-reference-bug-regexp end-line 'move)) |
| 82 | (re-search-forward bug-reference-bug-regexp end-line 'move)) | 82 | (when (or (not bug-reference-prog-mode) |
| 83 | (when (or (not bug-reference-prog-mode) | 83 | ;; This tests for both comment and string syntax. |
| 84 | ;; This tests for both comment and string syntax. | 84 | (nth 8 (syntax-ppss))) |
| 85 | (nth 8 (syntax-ppss))) | 85 | (let ((overlay (make-overlay (match-beginning 0) (match-end 0) |
| 86 | (let ((overlay (make-overlay (match-beginning 0) (match-end 0) | 86 | nil t nil))) |
| 87 | nil t nil))) | 87 | (overlay-put overlay 'category 'bug-reference) |
| 88 | (overlay-put overlay 'category 'bug-reference) | 88 | (overlay-put overlay 'bug-reference-url |
| 89 | (overlay-put overlay 'bug-reference-url | 89 | (format bug-reference-url-format |
| 90 | (format bug-reference-url-format | 90 | (match-string-no-properties 1))))))))) |
| 91 | (match-string-no-properties 1)))))))))) | ||
| 92 | 91 | ||
| 93 | ;; Taken from button.el. | 92 | ;; Taken from button.el. |
| 94 | (defun bug-reference-push-button (&optional pos use-mouse-action) | 93 | (defun bug-reference-push-button (&optional pos use-mouse-action) |