diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-03-28 03:20:31 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-03-28 03:20:31 +0000 |
commit | 6340a43f5cb0dba8156c59d220ca2efdb72c5928 (patch) | |
tree | 83c87322025b515fed0fc38e2e16cc7e35396a76 /lisp/button.el | |
parent | 070f60e096db386cb716a246ae5e878ff35ccf28 (diff) | |
download | emacs-6340a43f5cb0dba8156c59d220ca2efdb72c5928.tar.gz |
(make-text-button): Add explicit `button' property.
(default-button): Don't put a `button' property on it.
Diffstat (limited to 'lisp/button.el')
-rw-r--r-- | lisp/button.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/button.el b/lisp/button.el index d3c4cd8ea9e..05ea7aec5e2 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -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) |