diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-05-09 14:06:55 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-05-09 14:06:55 +0100 |
commit | c6eb2760766b402fb620a733d100adfd320e4df5 (patch) | |
tree | 9a116468d6b11f22a68680d05dd5bfaacd2e0c4c /lisp/button.el | |
parent | 40f655e0505d954e507ead5f5bda7dc7113adc06 (diff) | |
parent | ae3c510696f02f01d03052f070e5ce65b4018a45 (diff) | |
download | emacs-c6eb2760766b402fb620a733d100adfd320e4df5.tar.gz emacs-c6eb2760766b402fb620a733d100adfd320e4df5.tar.bz2 emacs-c6eb2760766b402fb620a733d100adfd320e4df5.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/button.el')
-rw-r--r-- | lisp/button.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/button.el b/lisp/button.el index b3afc4eca25..3a6a6de774c 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -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 |