emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make register insertion consistent with other insertion


From: Mathias Dahl
Subject: Re: Make register insertion consistent with other insertion
Date: Sat, 13 Sep 2014 13:27:53 +0200

> I'd like to apply the following patch to flip the sense of the prefix
> argument to interact calls to insert-register. I find the current
> default behavior of putting point before the inserted text annoying; I
> want it after more often and don't want to add C-u to an already long
> key sequence.

I seldom use registers but I tried this out right now. I can say for a fact that I know that, in the way I would use it, if I got into the habit of  using it, would be to prefer point after the inserted text.

So, for what it's worth: +1.

/Mathias


On Thu, Sep 11, 2014 at 4:26 AM, Daniel Colascione <address@hidden> wrote:
I'd like to apply the following patch to flip the sense of the prefix
argument to interact calls to insert-register. I find the current
default behavior of putting point before the inserted text annoying; I
want it after more often and don't want to add C-u to an already long
key sequence.

Of course, this is an incompatible change to a very old interface, but
the breakage should be limited to muscle memory and recorded macros.

=== modified file 'lisp/register.el'
--- lisp/register.el    2014-06-03 09:06:18 +0000
+++ lisp/register.el    2014-09-11 02:24:53 +0000
@@ -425,13 +425,14 @@
   "Insert contents of register REGISTER.  (REGISTER is a character.)
 Normally puts point before and mark after the inserted text.
 If optional second arg is non-nil, puts mark before and point after.
-Interactively, second arg is non-nil if prefix arg is supplied.
+Interactively, second arg is nil if prefix arg is supplied and t
+otherwise.

 Interactively, reads the register using `register-read-with-preview'."
   (interactive (progn
                 (barf-if-buffer-read-only)
                 (list (register-read-with-preview "Insert register: ")
-                      current-prefix-arg)))
+                      (not current-prefix-arg))))
   (push-mark)
   (let ((val (get-register register)))
     (cond





reply via email to

[Prev in Thread] Current Thread [Next in Thread]