From: Wilfred Hughes Date: Mon, 29 May 2017 00:00:05 +0000 (+0100) Subject: Ensure button-get works in any buffer X-Git-Tag: emacs-26.0.90~521^2~242 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7c4bad17d83297ee9a1b57552b1944020f23aea;p=emacs.git 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. --- 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))))