diff options
Diffstat (limited to 'lisp/button.el')
| -rw-r--r-- | lisp/button.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/button.el b/lisp/button.el index c46f3d9a52b..921e84dfa68 100644 --- a/lisp/button.el +++ b/lisp/button.el | |||
| @@ -382,10 +382,12 @@ Also see `make-text-button'." | |||
| 382 | If the button at POS is a text property button, the return value | 382 | If the button at POS is a text property button, the return value |
| 383 | is a marker pointing to POS." | 383 | is a marker pointing to POS." |
| 384 | (let ((button (get-char-property pos 'button))) | 384 | (let ((button (get-char-property pos 'button))) |
| 385 | (if (or (overlayp button) (null button)) | 385 | (and button (get-char-property pos 'category) |
| 386 | button | 386 | (if (overlayp button) |
| 387 | ;; Must be a text-property button; return a marker pointing to it. | 387 | button |
| 388 | (copy-marker pos t)))) | 388 | ;; Must be a text-property button; |
| 389 | ;; return a marker pointing to it. | ||
| 390 | (copy-marker pos t))))) | ||
| 389 | 391 | ||
| 390 | (defun next-button (pos &optional count-current) | 392 | (defun next-button (pos &optional count-current) |
| 391 | "Return the next button after position POS in the current buffer. | 393 | "Return the next button after position POS in the current buffer. |