aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/button.el
diff options
context:
space:
mode:
authorStephen Leake2019-04-11 14:00:02 -0700
committerStephen Leake2019-04-11 14:00:02 -0700
commit7ba7def5caf7ec9d9bebffff489f0a658229fbda (patch)
treee0cfcb59937ca0528fb81769d7d48a904a91f5dc /lisp/button.el
parent7768581172e11be52b1fcd8224f4594e126bbdb7 (diff)
parentde238b39e335c6814283faa171b35145f124edf2 (diff)
downloademacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.tar.gz
emacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.zip
Merge commit 'de238b39e335c6814283faa171b35145f124edf2'
Diffstat (limited to 'lisp/button.el')
-rw-r--r--lisp/button.el10
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'."
382If the button at POS is a text property button, the return value 382If the button at POS is a text property button, the return value
383is a marker pointing to POS." 383is 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.