]> git.eshelyaron.com Git - emacs.git/commitdiff
(make-text-button): Add explicit `button' property.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Mar 2007 03:20:31 +0000 (03:20 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Mar 2007 03:20:31 +0000 (03:20 +0000)
(default-button): Don't put a `button' property on it.

lisp/ChangeLog
lisp/button.el

index e17d73f174c67e767ae1bd244ff0606b100505a1..315e985350561408b9e55d99e11518e5469601e9 100644 (file)
@@ -1,5 +1,8 @@
 2007-03-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * button.el (make-text-button): Add explicit `button' property.
+       (default-button): Don't put a `button' property on it.
+
        * progmodes/python.el (python-mode): Skip comments when parsing.
 
        * vc-arch.el (vc-with-current-file-buffer): New macro.
index d3c4cd8ea9e31ce8b16f1a6cbd38569a39cae7be..05ea7aec5e22b4e50178a40eab9962f4673ffe82 100644 (file)
@@ -89,9 +89,6 @@ Mode-specific keymaps may want to use this as their parent keymap.")
 ;; Prevent insertions adjacent to the text-property buttons from
 ;; inheriting its properties.
 (put 'default-button 'rear-nonsticky t)
-;; Text property buttons don't have a `button' property of their own, so
-;; they inherit this.
-(put 'default-button 'button t)
 
 ;; A `category-symbol' property for the default button type
 (put 'button 'button-category-symbol 'default-button)
@@ -316,7 +313,11 @@ Also see `insert-text-button'."
       (setcar (cdr type-entry)
              (button-category-symbol (car (cdr type-entry))))))
   ;; Now add all the text properties at once
-  (add-text-properties beg end properties)
+  (add-text-properties beg end
+                       ;; Each button should have a non-eq `button'
+                       ;; property so that next-single-property-change can
+                       ;; detect boundaries reliably.
+                       (cons 'button (cons (list t) properties)))
   ;; Return something that can be used to get at the button.
   beg)