mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Only treat display strings as buttons if they have 'button' property
* lisp/button.el (push-button): Use 'posn-point' instead of 'posn-string' if the string doesn't have the 'button' property (Bug#40859).
This commit is contained in:
parent
1f149cb392
commit
0bd6ae773a
1 changed files with 6 additions and 4 deletions
|
|
@ -469,10 +469,12 @@ return t."
|
|||
;; POS is a mouse event; switch to the proper window/buffer
|
||||
(let ((posn (event-start pos)))
|
||||
(with-current-buffer (window-buffer (posn-window posn))
|
||||
(if (posn-string posn)
|
||||
;; mode-line, header-line, or display string event.
|
||||
(button-activate (posn-string posn) t)
|
||||
(push-button (posn-point posn) t))))
|
||||
(let* ((str (posn-string posn))
|
||||
(str-button (and str (get-text-property (cdr str) 'button (car str)))))
|
||||
(if str-button
|
||||
;; mode-line, header-line, or display string event.
|
||||
(button-activate str t)
|
||||
(push-button (posn-point posn) t)))))
|
||||
;; POS is just normal position
|
||||
(let ((button (button-at (or pos (point)))))
|
||||
(when button
|
||||
|
|
|
|||
Loading…
Reference in a new issue