Function: mpc-select-toggle

mpc-select-toggle is an interactive and byte-compiled function defined in mpc.el.gz.

Signature

(mpc-select-toggle &optional EVENT)

Documentation

Toggle the selection of the tag value at point.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-select-toggle (&optional event)
  "Toggle the selection of the tag value at point."
  (interactive (list last-nonmenu-event))
  (mpc-event-set-point event)
  (save-excursion
    (cond
     ;; The line is already selected: deselect it.
     ((get-char-property (point) 'mpc-select)
      (let ((ols nil))
        (dolist (ol mpc-select)
          (if (and (<= (overlay-start ol) (point))
                   (> (overlay-end ol) (point)))
              (delete-overlay ol)
            (push ol ols)))
        (cl-assert (= (1+ (length ols)) (length mpc-select)))
        (setq mpc-select ols)))
     ;; We're trying to select *ALL* additionally to others.
     ((mpc-tagbrowser-all-p) nil)
     ;; Select the current line.
     (t (mpc-select-make-overlay))))
  (when mpc-tag
    (mpc-tagbrowser-all-select)
    (mpc-selection-refresh)))