Be more consistent in using register-read-with-preview to read registers

* frameset.el (frameset-to-register):
* kmacro.el (kmacro-to-register):
* register.el (increment-register):
* calc/calc-yank.el (calc-copy-to-register, calc-insert-register)
(calc-append-to-register, calc-prepend-to-register):
* play/gametree.el (gametree-layout-to-register)
(gametree-apply-register-layout):
* textmodes/picture.el (picture-clear-rectangle-to-register)
(picture-yank-rectangle-from-register):
* vc/emerge.el (emerge-combine-versions-register):
Use register-read-with-preview to read registers.

* cedet/semantic/senator.el (senator-copy-tag-to-register):
Use register-read-with-preview, if available.

* calculator.el, emulation/viper-cmd.el: Comments.
This commit is contained in:
Glenn Morris 2014-02-02 16:40:49 -08:00
parent 5dca7759a7
commit 6a6b8e405e
12 changed files with 96 additions and 26 deletions

View file

@ -494,8 +494,12 @@ prefix argument, the rectangle is actually killed, shifting remaining text."
(defun picture-clear-rectangle-to-register (start end register &optional killp)
"Clear rectangle delineated by point and mark into REGISTER.
The rectangle is saved in REGISTER and replaced with whitespace. With
prefix argument, the rectangle is actually killed, shifting remaining text."
(interactive "r\ncRectangle to register: \nP")
prefix argument, the rectangle is actually killed, shifting remaining text.
Interactively, reads the register using `register-read-with-preview'."
(interactive (list (region-beginning) (region-end)
(register-read-with-preview "Rectangle to register: ")
current-prefix-arg))
(set-register register (picture-snarf-rectangle start end killp)))
(defun picture-snarf-rectangle (start end &optional killp)
@ -534,8 +538,11 @@ regardless of where you click."
The rectangle is positioned with upper left corner at point, overwriting
existing text. With prefix argument, the rectangle is
inserted instead, shifting existing text. Leaves mark at one corner
of rectangle and point at the other (diagonally opposed) corner."
(interactive "cRectangle from register: \nP")
of rectangle and point at the other (diagonally opposed) corner.
Interactively, reads the register using `register-read-with-preview'."
(interactive (list (register-read-with-preview "Rectangle from register: ")
current-prefix-arg))
(let ((rectangle (get-register register)))
(if (not (consp rectangle))
(error "Register %c does not contain a rectangle" register)