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.
This commit is contained in:
Wilfred Hughes 2017-05-29 01:00:05 +01:00
parent 3bc3dc4063
commit f7c4bad17d

View file

@ -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))))