From: Glenn Morris Date: Sat, 21 Jun 2008 20:30:00 +0000 (+0000) Subject: (bug-reference-fontify): Revert previous change that saved match data. X-Git-Tag: emacs-pretest-23.0.90~4586 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=321d9c42c4496b1bdd444df79499673604396d7c;p=emacs.git (bug-reference-fontify): Revert previous change that saved match data. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4fc1e994541..9739db2ad4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -20,7 +20,6 @@ rather than mouse-1. (bug-reference-url-format): Autoload safe if string. (bug-reference-bug-regexp): Make space after "bug" optional. - (bug-reference-fontify): Save match data. * Makefile.in (all): Explicitly pass EMACS to sub-make, 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.") ;; Remove old overlays. (bug-reference-unfontify beg-line end-line) (goto-char beg-line) - (save-match-data - (while (and (< (point) end-line) - (re-search-forward bug-reference-bug-regexp end-line 'move)) - (when (or (not bug-reference-prog-mode) - ;; This tests for both comment and string syntax. - (nth 8 (syntax-ppss))) - (let ((overlay (make-overlay (match-beginning 0) (match-end 0) - nil t nil))) - (overlay-put overlay 'category 'bug-reference) - (overlay-put overlay 'bug-reference-url - (format bug-reference-url-format - (match-string-no-properties 1)))))))))) + (while (and (< (point) end-line) + (re-search-forward bug-reference-bug-regexp end-line 'move)) + (when (or (not bug-reference-prog-mode) + ;; This tests for both comment and string syntax. + (nth 8 (syntax-ppss))) + (let ((overlay (make-overlay (match-beginning 0) (match-end 0) + nil t nil))) + (overlay-put overlay 'category 'bug-reference) + (overlay-put overlay 'bug-reference-url + (format bug-reference-url-format + (match-string-no-properties 1))))))))) ;; Taken from button.el. (defun bug-reference-push-button (&optional pos use-mouse-action)