Function: widget-choice-mouse-down-action

widget-choice-mouse-down-action is a byte-compiled function defined in wid-edit.el.gz.

Signature

(widget-choice-mouse-down-action WIDGET &optional EVENT)

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
(defun widget-choice-mouse-down-action (widget &optional _event)
  ;; Return non-nil if we need a menu.
  (let ((args (widget-get widget :args))
	(old (widget-get widget :choice)))
    (cond ((not (display-popup-menus-p))
	   ;; No place to pop up a menu.
	   nil)
	  ((< (length args) 2)
	   ;; Empty or singleton list, just return the value.
	   nil)
	  ((> (length args) widget-menu-max-size)
	   ;; Too long, prompt.
	   nil)
	  ((> (length args) 2)
	   ;; Reasonable sized list, use menu.
	   t)
	  ((and widget-choice-toggle (memq old args))
	   ;; We toggle.
	   nil)
	  (t
	   ;; Ask which of the two.
	   t))))