Mercurial > emacs
diff lisp/button.el @ 76771:45b86f4ac0f6
(make-text-button): Add explicit `button' property.
(default-button): Don't put a `button' property on it.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Wed, 28 Mar 2007 03:20:31 +0000 |
| parents | e3694f1cb928 |
| children | c93f4d8744d5 |
line wrap: on
line diff
--- a/lisp/button.el Wed Mar 28 01:21:47 2007 +0000 +++ b/lisp/button.el Wed Mar 28 03:20:31 2007 +0000 @@ -89,9 +89,6 @@ ;; 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 @@ (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)
