Subject: bug#34947: 26.1; cua-mode: wrong type argument when activating rectangle

From: Noam Postavsky <[email-masked]>
Date: Mon, 15 Apr 2019 21:10:58 -0400

severity 34947 minor
tags 34947 + patch
quit

Braun Gábor <[email-masked]> writes:

> Suggested patch:
>
> Autoload the command mentioned in the error message.
> Library cua-base.el binds cua-toggle-rectangle-mark to a key
> in the :set function in (defcustom cua-rectangle-mark-key ...),
> so it should ensure that the command is defined.
>
> --- lisp/emulation/cua-base.el	2018-12-15 09:08:18 +0100
> +++ lisp/emulation/cua-base.el	2019-03-09 09:08:18 +0100
> @@ -592,6 +592,7 @@
>
>  (autoload 'cua-set-rectangle-mark "cua-rect"
>    "Start rectangle at mouse click position." t nil)
> +(autoload 'cua-toggle-rectangle-mark "cua-rect" nil t)
>
>  ;; Stub definitions until it is loaded
>  (defvar cua--rectangle)

Looks safe and sensible, I'll push to emacs-26 in a couple of days if
there are no objections.