Commit e6038ca3 authored by Chong Yidong's avatar Chong Yidong
Browse files

* cus-edit.el (Custom-move-and-invoke): Deleted.

	(custom-mode-map): Bind mouse-1 to widget-move-and-invoke.

	* wid-edit.el (widget-move-and-invoke): New function, from
	Custom-move-and-invoke.
parent a008c8f4
2005-10-17 Chong Yidong <cyd@stupidchicken.com>
* cus-edit.el (Custom-move-and-invoke): Deleted.
(custom-mode-map): Bind mouse-1 to widget-move-and-invoke.
* wid-edit.el (widget-move-and-invoke): New function, from
Custom-move-and-invoke.
2005-10-17 Bill Wohler <wohler@newt.com>
Moved all remaining images from lisp/toolbar to etc/images, moved
......
......@@ -4245,20 +4245,10 @@ The format is suitable for use with `easy-menu-define'."
(define-key map "u" 'Custom-goto-parent)
(define-key map "n" 'widget-forward)
(define-key map "p" 'widget-backward)
(define-key map [mouse-1] 'Custom-move-and-invoke)
(define-key map [mouse-1] 'widget-move-and-invoke)
map)
"Keymap for `custom-mode'.")
(defun Custom-move-and-invoke (event)
"Move to where you click, and if it is an active field, invoke it."
(interactive "e")
(mouse-set-point event)
(if (widget-event-point event)
(let* ((pos (widget-event-point event))
(button (get-char-property pos 'button)))
(if button
(widget-button-click event)))))
(easy-menu-define Custom-mode-menu
custom-mode-map
"Menu used in customization buffers."
......
......@@ -660,6 +660,16 @@ button is pressed or inactive, respectively. These are currently ignored."
tag 'mouse-face widget-button-pressed-face)))
(insert tag)))
(defun widget-move-and-invoke (event)
"Move to where you click, and if it is an active field, invoke it."
(interactive "e")
(mouse-set-point event)
(if (widget-event-point event)
(let* ((pos (widget-event-point event))
(button (get-char-property pos 'button)))
(if button
(widget-button-click event)))))
;;; Buttons.
(defgroup widget-button nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment