unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Make register insertion consistent with other insertion
Date: Wed, 10 Sep 2014 19:26:15 -0700	[thread overview]
Message-ID: <54110847.50204@dancol.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1288 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.

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: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2014-09-11  2:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  2:26 Daniel Colascione [this message]
2014-09-11 14:01 ` Make register insertion consistent with other insertion Tom
2014-09-13 11:27 ` Mathias Dahl
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=54110847.50204@dancol.org \
    --to=dancol@dancol.org \
    --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).