unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Make register insertion consistent with other insertion
@ 2014-09-11  2:26 Daniel Colascione
  2014-09-11 14:01 ` Tom
  2014-09-13 11:27 ` Mathias Dahl
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Colascione @ 2014-09-11  2:26 UTC (permalink / raw)
  To: Emacs developers

[-- 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 --]

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

end of thread, other threads:[~2014-09-13 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-09-13 14:04   ` Stefan Monnier

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).