diff options
| author | Stefan Monnier | 2007-03-28 03:20:31 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-03-28 03:20:31 +0000 |
| commit | 6340a43f5cb0dba8156c59d220ca2efdb72c5928 (patch) | |
| tree | 83c87322025b515fed0fc38e2e16cc7e35396a76 | |
| parent | 070f60e096db386cb716a246ae5e878ff35ccf28 (diff) | |
| download | emacs-6340a43f5cb0dba8156c59d220ca2efdb72c5928.tar.gz emacs-6340a43f5cb0dba8156c59d220ca2efdb72c5928.zip | |
(make-text-button): Add explicit `button' property.
(default-button): Don't put a `button' property on it.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/button.el | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e17d73f174c..315e9853505 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-03-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * button.el (make-text-button): Add explicit `button' property. | ||
| 4 | (default-button): Don't put a `button' property on it. | ||
| 5 | |||
| 3 | * progmodes/python.el (python-mode): Skip comments when parsing. | 6 | * progmodes/python.el (python-mode): Skip comments when parsing. |
| 4 | 7 | ||
| 5 | * vc-arch.el (vc-with-current-file-buffer): New macro. | 8 | * vc-arch.el (vc-with-current-file-buffer): New macro. |
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.") | |||
| 89 | ;; Prevent insertions adjacent to the text-property buttons from | 89 | ;; Prevent insertions adjacent to the text-property buttons from |
| 90 | ;; inheriting its properties. | 90 | ;; inheriting its properties. |
| 91 | (put 'default-button 'rear-nonsticky t) | 91 | (put 'default-button 'rear-nonsticky t) |
| 92 | ;; Text property buttons don't have a `button' property of their own, so | ||
| 93 | ;; they inherit this. | ||
| 94 | (put 'default-button 'button t) | ||
| 95 | 92 | ||
| 96 | ;; A `category-symbol' property for the default button type | 93 | ;; A `category-symbol' property for the default button type |
| 97 | (put 'button 'button-category-symbol 'default-button) | 94 | (put 'button 'button-category-symbol 'default-button) |
| @@ -316,7 +313,11 @@ Also see `insert-text-button'." | |||
| 316 | (setcar (cdr type-entry) | 313 | (setcar (cdr type-entry) |
| 317 | (button-category-symbol (car (cdr type-entry)))))) | 314 | (button-category-symbol (car (cdr type-entry)))))) |
| 318 | ;; Now add all the text properties at once | 315 | ;; Now add all the text properties at once |
| 319 | (add-text-properties beg end properties) | 316 | (add-text-properties beg end |
| 317 | ;; Each button should have a non-eq `button' | ||
| 318 | ;; property so that next-single-property-change can | ||
| 319 | ;; detect boundaries reliably. | ||
| 320 | (cons 'button (cons (list t) properties))) | ||
| 320 | ;; Return something that can be used to get at the button. | 321 | ;; Return something that can be used to get at the button. |
| 321 | beg) | 322 | beg) |
| 322 | 323 | ||