emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/progmodes bug-reference.el


From: Juri Linkov
Subject: [Emacs-diffs] emacs/lisp/progmodes bug-reference.el
Date: Wed, 14 Jan 2009 00:37:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     09/01/14 00:37:49

Modified files:
        lisp/progmodes : bug-reference.el 

Log message:
        (bug-reference-fontify): Check for
        non-nil `bug-reference-url-format' before putting an overlay
        property `bug-reference-url'.
        (bug-reference-mode, bug-reference-prog-mode): Don't check for
        `bug-reference-url-format'.  Doc fix.  (Bug#1744)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/bug-reference.el?cvsroot=emacs&r1=1.6&r2=1.7

Patches:
Index: bug-reference.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/bug-reference.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- bug-reference.el    5 Jan 2009 03:23:16 -0000       1.6
+++ bug-reference.el    14 Jan 2009 00:37:49 -0000      1.7
@@ -85,9 +85,11 @@
          (let ((overlay (make-overlay (match-beginning 0) (match-end 0)
                                       nil t nil)))
            (overlay-put overlay 'category 'bug-reference)
+           ;; Don't put a link if format is undefined
+           (when bug-reference-url-format
            (overlay-put overlay 'bug-reference-url
                         (format bug-reference-url-format
-                                (match-string-no-properties 1)))))))))
+                                  (match-string-no-properties 1))))))))))
 
 ;; Taken from button.el.
 (defun bug-reference-push-button (&optional pos use-mouse-action)
@@ -108,14 +110,12 @@
 
 ;;;###autoload
 (define-minor-mode bug-reference-mode
-  "Minor mode to buttonize bugzilla references in the current buffer.
-Requires `bug-reference-url-format' to be set in the buffer."
+  "Minor mode to buttonize bugzilla references in the current buffer."
   nil
   ""
   nil
   (if bug-reference-mode
-      (when bug-reference-url-format
-       (jit-lock-register #'bug-reference-fontify))
+      (jit-lock-register #'bug-reference-fontify)
     (jit-lock-unregister #'bug-reference-fontify)
     (save-restriction
       (widen)
@@ -128,8 +128,7 @@
   ""
   nil
   (if bug-reference-prog-mode
-      (when bug-reference-url-format
-       (jit-lock-register #'bug-reference-fontify))
+      (jit-lock-register #'bug-reference-fontify)
     (jit-lock-unregister #'bug-reference-fontify)
     (save-restriction
       (widen)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]