[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Widgets clicks and changing windows
From: |
md5i |
Subject: |
Widgets clicks and changing windows |
Date: |
Mon, 03 Dec 2001 16:09:15 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) |
I originally posted this to the pretest-bugs list, but I thought that
maybe more people would be able to comment on it if I posted here.
According to the following changelog comment for wid-edit.el 1.94:
(widget-button-click): Save the selected window
around the code handling clicks on buttons.
and the following comment in the code:
;; Mouse click on a widget button. Do the following
;; in a save-excursion so that the click on the button
;; doesn't change point.
I am guessing that it is desirable that clicking on a widget does not
move the point or change the current window. (This is definitely the
behavior I prefer.) Here is a patch to actually implement this.
*** /tmp/wid-edit.el.~1.101~ Tue Nov 27 12:12:55 2001
--- /tmp/wid-edit.el Tue Nov 27 12:12:55 2001
***************
*** 856,865 ****
(defun widget-button-click (event)
"Invoke the button that the mouse is pointing at."
! (interactive "@e")
(if (widget-event-point event)
(let* ((pos (widget-event-point event))
! (button (get-char-property pos 'button)))
(if button
;; Mouse click on a widget button. Do the following
;; in a save-excursion so that the click on the button
--- 856,868 ----
(defun widget-button-click (event)
"Invoke the button that the mouse is pointing at."
! (interactive "e")
(if (widget-event-point event)
(let* ((pos (widget-event-point event))
! (start (event-start event))
! (button (get-char-property
! pos 'button (and (windowp (posn-window start))
! (window-buffer (posn-window start))))))
(if button
;; Mouse click on a widget button. Do the following
;; in a save-excursion so that the click on the button
--
Michael Welsh Duggan
(address@hidden)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Widgets clicks and changing windows,
md5i <=