all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18120: cua-rect.el issue on help
@ 2014-07-27 21:54 Pierre-Yves
  2019-08-03 19:48 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Yves @ 2014-07-27 21:54 UTC (permalink / raw
  To: 18120

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

cua-rectangle feature does offer to type ? for help. It will display several available key sequence. Since modifier is not known, a function computes the string from the prefix variable.
It is basically a switch, which works for ‘hyper or ‘super or ‘alt or ‘meta , but it does not work for ‘control.

This is feasible to use ‘control as the modifier. 
   (setq cua--rectangle-modifier-key ‘control)


This one liner patch fixes the help in such case.
The cua-rect-help.patch is the result of `diff -c` command.
The 0001- prefixed patch is git, but I believe this is not the proper format.


[-- Attachment #2: cua-rect-help.patch --]
[-- Type: application/octet-stream, Size: 505 bytes --]

*** lisp/emulation/cua-rect.el.orig	2014-07-27 23:45:04.000000000 +0200
--- lisp/emulation/cua-rect.el	2014-07-27 23:44:56.000000000 +0200
***************
*** 1346,1351 ****
--- 1346,1352 ----
    (let ((M (cond ((eq cua--rectangle-modifier-key 'hyper) " H-")
  		 ((eq cua--rectangle-modifier-key 'super) " s-")
  		 ((eq cua--rectangle-modifier-key 'alt) " A-")
+                  ((eq cua--rectangle-modifier-key 'control) " C-")
  		 (t " M-"))))
      (message
       (concat (if help "C-?:help" "")

[-- Attachment #3: 0001-cua-rect-help-check-for-control-value.patch --]
[-- Type: application/octet-stream, Size: 864 bytes --]

From e005034f22b87c5479e36649da416f7d74af1a72 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Luyten <py@luyten.fr>
Date: Sun, 27 Jul 2014 20:04:50 +0200
Subject: [PATCH] cua-rect help : check for 'control value

---
 lisp/emulation/cua-rect.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index d516bd4..2f9215b 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1346,6 +1346,7 @@ With prefix arg, indent to that column."
   (let ((M (cond ((eq cua--rectangle-modifier-key 'hyper) " H-")
 		 ((eq cua--rectangle-modifier-key 'super) " s-")
 		 ((eq cua--rectangle-modifier-key 'alt) " A-")
+                 ((eq cua--rectangle-modifier-key 'control) " C-")
 		 (t " M-"))))
     (message
      (concat (if help "C-?:help" "")
-- 
1.8.5.2 (Apple Git-48)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#18120: cua-rect.el issue on help
  2014-07-27 21:54 bug#18120: cua-rect.el issue on help Pierre-Yves
@ 2019-08-03 19:48 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-03 19:48 UTC (permalink / raw
  To: Pierre-Yves; +Cc: 18120

Pierre-Yves <py@luyten.fr> writes:

> cua-rectangle feature does offer to type ? for help. It will display
> several available key sequence. Since modifier is not known, a
> function computes the string from the prefix variable.
> It is basically a switch, which works for ‘hyper or ‘super or ‘alt or
> ‘meta , but it does not work for ‘control.
>
> This is feasible to use ‘control as the modifier. 
>    (setq cua--rectangle-modifier-key ‘control)

[...]

>   		 ((eq cua--rectangle-modifier-key 'super) " s-")
>   		 ((eq cua--rectangle-modifier-key 'alt) " A-")
> +                  ((eq cua--rectangle-modifier-key 'control) " C-")
>   		 (t " M-"))))

(I'm going through old bug reports that unfortunately have not received
any responses yet.)

I don't use cua mode myself, but this looks like it's "obviously" the
right thing, so I've applied the patch to Emacs 27.

If a cua user determines that it's not quite the right thing to do,
please feel free to revert the patch.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-03 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-27 21:54 bug#18120: cua-rect.el issue on help Pierre-Yves
2019-08-03 19:48 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.