unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathias Dahl <mathias.dahl@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Make register insertion consistent with other insertion
Date: Sat, 13 Sep 2014 13:27:53 +0200	[thread overview]
Message-ID: <CABrcCQ7NcH3URK9PKB5iSd08U7-_dzDd91Hzd8AO8nvMR2jcSw@mail.gmail.com> (raw)
In-Reply-To: <54110847.50204@dancol.org>

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

>
> > 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 <dancol@dancol.org>
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
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2825 bytes --]

  parent reply	other threads:[~2014-09-13 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  2:26 Make register insertion consistent with other insertion Daniel Colascione
2014-09-11 14:01 ` Tom
2014-09-13 11:27 ` Mathias Dahl [this message]
2014-09-13 14:04   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABrcCQ7NcH3URK9PKB5iSd08U7-_dzDd91Hzd8AO8nvMR2jcSw@mail.gmail.com \
    --to=mathias.dahl@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).