summaryrefslogtreecommitdiff
path: root/lisp/button.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2017-05-29 01:00:05 +0100
committerWilfred Hughes <me@wilfred.me.uk>2017-05-29 01:00:05 +0100
commitf7c4bad17d83297ee9a1b57552b1944020f23aea (patch)
treeea53c36fdd0cc84a11bf3a2c2e09b247bd984e6c /lisp/button.el
parent3bc3dc406343bd7e50acae7c0f9d5f8cc89420cd (diff)
downloademacs-f7c4bad17d83297ee9a1b57552b1944020f23aea.tar.gz
Ensure button-get works in any buffer
* lisp/button.el (button-get): Previously we assumed that button-get was called in the buffer containing the button. In other buffers, button-get always returned nil. Fix this by passing the relevant buffer from the marker.
Diffstat (limited to 'lisp/button.el')
-rw-r--r--lisp/button.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/button.el b/lisp/button.el
index b04bc283e40..99c03d9d687 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -194,6 +194,8 @@ changes to a supertype are not reflected in its subtypes)."
((button--area-button-p button)
(get-text-property (cdr button)
prop (button--area-button-string button)))
+ ((markerp button)
+ (get-text-property button prop (marker-buffer button)))
(t ; Must be a text-property button.
(get-text-property button prop))))