Function: cua-rectangle-mark-mode

cua-rectangle-mark-mode is an autoloaded, interactive and byte-compiled function defined in cua-rect.el.gz.

Signature

(cua-rectangle-mark-mode &optional ARG)

Documentation

Toggle the region as rectangular.

Activates the region if needed. Only lasts until the region is deactivated.

This is a minor mode. If called interactively, toggle the Cua-Rectangle-Mark mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate cua-rectangle-mark-mode(var)/cua-rectangle-mark-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 24.4.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
;;;###autoload
(define-minor-mode cua-rectangle-mark-mode
  "Toggle the region as rectangular.
Activates the region if needed.  Only lasts until the region is deactivated."
  :keymap cua--rectangle-keymap
  (cond
   (cua-rectangle-mark-mode
    (add-hook 'deactivate-mark-hook
              (lambda () (cua-rectangle-mark-mode -1)))
    (add-hook 'post-command-hook #'cua--rectangle-post-command nil t)
    (cua-set-rectangle-mark))
   (t
    (cua--deactivate-rectangle)
    (remove-hook 'post-command-hook #'cua--rectangle-post-command t))))