[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display pr
From: |
Artur Malabarba |
Subject: |
bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display properties |
Date: |
Tue, 01 Mar 2016 14:00:32 -0300 |
1. Visit the scratch buffer.
2. Evaluate this code:
(defun my-action (&rest _)
(interactive)
(message "WORKED!"))
(make-button (point-min) (+ 30 (point-min))
'display "..."
'action #'my-action
'follow-link t)
3. As expected, the first 30 chars of the buffer will be hidden under a
button that displays as “...”. Hitting RET on that buffer works as
expected (you see the message “Worked!” on the echo-area).
4. Try clicking on the button with the mouse. You'll get the following error:
Debugger entered--Lisp error: (void-function nil)
nil(("..." . 1))
button-activate(("..." . 1) t)
push-button((mouse-2 (#<window 3 on *scratch*> 1 (14 . 2) 15461622 ("..." .
1) 1 (1 . 0) nil (5 . 2) (9 . 18))))
funcall-interactively(push-button (mouse-2 (#<window 3 on *scratch*> 1 (14 .
2) 15461622 ("..." . 1) 1 (1 . 0) nil (5 . 2) (9 . 18))))
call-interactively(push-button nil nil)
command-execute(push-button)
5. Adding a `mouse-action' property makes no difference.
6. Without the `display' property, everything works as expected.
Looks like this happens because the first argument given to
`button-activate' is `("..." . 1)', while it should be the overlay.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display properties,
Artur Malabarba <=