Function: foldout-mouse-hide-or-exit

foldout-mouse-hide-or-exit is an interactive and byte-compiled function defined in foldout.el.gz.

Signature

(foldout-mouse-hide-or-exit EVENT)

Documentation

Hide the subtree under the heading clicked on, or exit a fold.

What happens depends on the number of mouse clicks:-

1 hide subtree
2 exit fold and hide text
3 exit fold without hiding text
4 exit all folds and hide text

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/foldout.el.gz
(defun foldout-mouse-hide-or-exit (event)
  "Hide the subtree under the heading clicked on, or exit a fold.

What happens depends on the number of mouse clicks:-

	1	hide subtree
	2	exit fold and hide text
	3	exit fold without hiding text
	4	exit all folds and hide text"
  (interactive "@e")

  ;; swallow intervening mouse events so we only get the final click-count.
  (setq event (foldout-mouse-swallow-events event))

  ;; hide or exit
  (let ((nclicks (event-click-count event)))
    (if (= nclicks 1)
	(progn
	  (foldout-mouse-goto-heading event)
	  (outline-hide-subtree))
      (foldout-exit-fold
       (cond
	((= nclicks 2) 1)		; exit and hide
	((= nclicks 3) -1)		; exit don't hide
	(t 0))))))			; exit all