bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23909: 25.1.50; `button-label' must be called in the buffer where th


From: Eli Zaretskii
Subject: bug#23909: 25.1.50; `button-label' must be called in the buffer where the button is in but not mentioned in document
Date: Thu, 07 Jul 2016 18:24:18 +0300

> From: Jiajie Chen <jiegec@qq.com>
> Date: Thu, 07 Jul 2016 18:19:11 +0800
> 
> The definition of button-label is:
> 
> #+BEGIN_SRC elisp
> (defun button-label (button)
>   "Return BUTTON's text label."
>   (if (button--area-button-p button)
>       (substring-no-properties (button--area-button-string button))
>     (buffer-substring-no-properties (button-start button)
>                                     (button-end button))))
> #+END_SRC
> 
> So when the function is called in a different buffer, it
> returns a wrong result.

AFAICT, all of the functions in button.el operate on buttons in the
current buffer, although only a few mention that explicitly in their
doc strings.  Patches to mention that in the doc strings are welcome.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]