aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-02-01 19:42:20 -0800
committerGlenn Morris2014-02-01 19:42:20 -0800
commit4472a196032874cb3d1d82999e331b981598d130 (patch)
treec7087f0c3ce95107b83449285cd60fda20c5fd3a
parent70e5a261ac4e923a09a464af9ffb9a321a42e70e (diff)
downloademacs-4472a196032874cb3d1d82999e331b981598d130.tar.gz
emacs-4472a196032874cb3d1d82999e331b981598d130.zip
register.el doc fixes
* lisp/register.el (register-read-with-preview, point-to-register) (window-configuration-to-register, frame-configuration-to-register) (jump-to-register, number-to-register, view-register, insert-register) (copy-to-register, append-to-register, prepend-to-register) (copy-rectangle-to-register): Doc fixes.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/register.el55
2 files changed, 47 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6471005cf8d..2657353dfe7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-02-02 Glenn Morris <rgm@gnu.org>
2
3 * register.el (register-read-with-preview, point-to-register)
4 (window-configuration-to-register, frame-configuration-to-register)
5 (jump-to-register, number-to-register, view-register, insert-register)
6 (copy-to-register, append-to-register, prepend-to-register)
7 (copy-rectangle-to-register): Doc fixes.
8
12014-02-02 Stefan Monnier <monnier@iro.umontreal.ca> 92014-02-02 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * help-fns.el (help-C-file-name): Handle advised functions (bug#16478). 11 * help-fns.el (help-C-file-name): Handle advised functions (bug#16478).
diff --git a/lisp/register.el b/lisp/register.el
index cca09930611..3b65c648d98 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -145,11 +145,12 @@ Format of each entry is controlled by the variable `register-preview-function'."
145 (insert (mapconcat register-preview-function register-alist "")))))) 145 (insert (mapconcat register-preview-function register-alist ""))))))
146 146
147(defun register-read-with-preview (prompt) 147(defun register-read-with-preview (prompt)
148 "Read and return an event, prompting with PROMPT, possibly showing a preview. 148 "Read and return a register name, possibly showing existing registers.
149If `register-alist' and `register-preview-delay' are both non-nil, 149Prompt with the string PROMPT. If `register-alist' and
150display a window listing registers after `register-preview-delay' seconds. 150`register-preview-delay' are both non-nil, display a window
151If `help-char' (or a member of `help-event-list') is pressed, display 151listing existing registers after `register-preview-delay' seconds.
152such a window regardless." 152If `help-char' (or a member of `help-event-list') is pressed,
153display such a window regardless."
153 (let* ((buffer "*Register Preview*") 154 (let* ((buffer "*Register Preview*")
154 (timer (when (numberp register-preview-delay) 155 (timer (when (numberp register-preview-delay)
155 (run-with-timer register-preview-delay nil 156 (run-with-timer register-preview-delay nil
@@ -176,7 +177,9 @@ such a window regardless."
176 "Store current location of point in register REGISTER. 177 "Store current location of point in register REGISTER.
177With prefix argument, store current frame configuration. 178With prefix argument, store current frame configuration.
178Use \\[jump-to-register] to go to that location or restore that configuration. 179Use \\[jump-to-register] to go to that location or restore that configuration.
179Argument is a character, naming the register." 180Argument is a character, naming the register.
181
182Interactively, reads the register using `register-read-with-preview'."
180 (interactive (list (register-read-with-preview "Point to register: ") 183 (interactive (list (register-read-with-preview "Point to register: ")
181 current-prefix-arg)) 184 current-prefix-arg))
182 ;; Turn the marker into a file-ref if the buffer is killed. 185 ;; Turn the marker into a file-ref if the buffer is killed.
@@ -188,7 +191,9 @@ Argument is a character, naming the register."
188(defun window-configuration-to-register (register &optional _arg) 191(defun window-configuration-to-register (register &optional _arg)
189 "Store the window configuration of the selected frame in register REGISTER. 192 "Store the window configuration of the selected frame in register REGISTER.
190Use \\[jump-to-register] to restore the configuration. 193Use \\[jump-to-register] to restore the configuration.
191Argument is a character, naming the register." 194Argument is a character, naming the register.
195
196Interactively, reads the register using `register-read-with-preview'."
192 (interactive (list (register-read-with-preview 197 (interactive (list (register-read-with-preview
193 "Window configuration to register: ") 198 "Window configuration to register: ")
194 current-prefix-arg)) 199 current-prefix-arg))
@@ -199,7 +204,9 @@ Argument is a character, naming the register."
199(defun frame-configuration-to-register (register &optional _arg) 204(defun frame-configuration-to-register (register &optional _arg)
200 "Store the window configuration of all frames in register REGISTER. 205 "Store the window configuration of all frames in register REGISTER.
201Use \\[jump-to-register] to restore the configuration. 206Use \\[jump-to-register] to restore the configuration.
202Argument is a character, naming the register." 207Argument is a character, naming the register.
208
209Interactively, reads the register using `register-read-with-preview'."
203 (interactive (list (register-read-with-preview 210 (interactive (list (register-read-with-preview
204 "Frame configuration to register: ") 211 "Frame configuration to register: ")
205 current-prefix-arg)) 212 current-prefix-arg))
@@ -217,7 +224,9 @@ If the register contains a window configuration (one frame) or a frameset
217First argument is a character, naming the register. 224First argument is a character, naming the register.
218Optional second arg non-nil (interactively, prefix argument) says to 225Optional second arg non-nil (interactively, prefix argument) says to
219delete any existing frames that the frameset doesn't mention. 226delete any existing frames that the frameset doesn't mention.
220\(Otherwise, these frames are iconified.)" 227\(Otherwise, these frames are iconified.)
228
229Interactively, reads the register using `register-read-with-preview'."
221 (interactive (list (register-read-with-preview "Jump to register: ") 230 (interactive (list (register-read-with-preview "Jump to register: ")
222 current-prefix-arg)) 231 current-prefix-arg))
223 (let ((val (get-register register))) 232 (let ((val (get-register register)))
@@ -265,7 +274,9 @@ delete any existing frames that the frameset doesn't mention.
265Two args, NUMBER and REGISTER (a character, naming the register). 274Two args, NUMBER and REGISTER (a character, naming the register).
266If NUMBER is nil, a decimal number is read from the buffer starting 275If NUMBER is nil, a decimal number is read from the buffer starting
267at point, and point moves to the end of that number. 276at point, and point moves to the end of that number.
268Interactively, NUMBER is the prefix arg (none means nil)." 277Interactively, NUMBER is the prefix arg (none means nil).
278
279Interactively, reads the register using `register-read-with-preview'."
269 (interactive (list current-prefix-arg 280 (interactive (list current-prefix-arg
270 (register-read-with-preview "Number to register: "))) 281 (register-read-with-preview "Number to register: ")))
271 (set-register register 282 (set-register register
@@ -298,7 +309,9 @@ If REGISTER is empty or if it contains text, call
298 309
299(defun view-register (register) 310(defun view-register (register)
300 "Display what is contained in register named REGISTER. 311 "Display what is contained in register named REGISTER.
301The Lisp value REGISTER is a character." 312The Lisp value REGISTER is a character.
313
314Interactively, reads the register using `register-read-with-preview'."
302 (interactive (list (register-read-with-preview "View register: "))) 315 (interactive (list (register-read-with-preview "View register: ")))
303 (let ((val (get-register register))) 316 (let ((val (get-register register)))
304 (if (null val) 317 (if (null val)
@@ -400,7 +413,9 @@ The Lisp value REGISTER is a character."
400 "Insert contents of register REGISTER. (REGISTER is a character.) 413 "Insert contents of register REGISTER. (REGISTER is a character.)
401Normally puts point before and mark after the inserted text. 414Normally puts point before and mark after the inserted text.
402If optional second arg is non-nil, puts mark before and point after. 415If optional second arg is non-nil, puts mark before and point after.
403Interactively, second arg is non-nil if prefix arg is supplied." 416Interactively, second arg is non-nil if prefix arg is supplied.
417
418Interactively, reads the register using `register-read-with-preview'."
404 (interactive (progn 419 (interactive (progn
405 (barf-if-buffer-read-only) 420 (barf-if-buffer-read-only)
406 (list (register-read-with-preview "Insert register: ") 421 (list (register-read-with-preview "Insert register: ")
@@ -431,7 +446,9 @@ With prefix arg, delete as well.
431Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. 446Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
432START and END are buffer positions indicating what to copy. 447START and END are buffer positions indicating what to copy.
433The optional argument REGION if non-nil, indicates that we're not just copying 448The optional argument REGION if non-nil, indicates that we're not just copying
434some text between START and END, but we're copying the region." 449some text between START and END, but we're copying the region.
450
451Interactively, reads the register using `register-read-with-preview'."
435 (interactive (list (register-read-with-preview "Copy to register: ") 452 (interactive (list (register-read-with-preview "Copy to register: ")
436 (region-beginning) 453 (region-beginning)
437 (region-end) 454 (region-end)
@@ -450,7 +467,9 @@ some text between START and END, but we're copying the region."
450 "Append region to text in register REGISTER. 467 "Append region to text in register REGISTER.
451With prefix arg, delete as well. 468With prefix arg, delete as well.
452Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. 469Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
453START and END are buffer positions indicating what to append." 470START and END are buffer positions indicating what to append.
471
472Interactively, reads the register using `register-read-with-preview'."
454 (interactive (list (register-read-with-preview "Append to register: ") 473 (interactive (list (register-read-with-preview "Append to register: ")
455 (region-beginning) 474 (region-beginning)
456 (region-end) 475 (region-end)
@@ -472,7 +491,9 @@ START and END are buffer positions indicating what to append."
472 "Prepend region to text in register REGISTER. 491 "Prepend region to text in register REGISTER.
473With prefix arg, delete as well. 492With prefix arg, delete as well.
474Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. 493Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
475START and END are buffer positions indicating what to prepend." 494START and END are buffer positions indicating what to prepend.
495
496Interactively, reads the register using `register-read-with-preview'."
476 (interactive (list (register-read-with-preview "Prepend to register: ") 497 (interactive (list (register-read-with-preview "Prepend to register: ")
477 (region-beginning) 498 (region-beginning)
478 (region-end) 499 (region-end)
@@ -496,7 +517,9 @@ With prefix arg, delete as well.
496To insert this register in the buffer, use \\[insert-register]. 517To insert this register in the buffer, use \\[insert-register].
497 518
498Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. 519Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG.
499START and END are buffer positions giving two corners of rectangle." 520START and END are buffer positions giving two corners of rectangle.
521
522Interactively, reads the register using `register-read-with-preview'."
500 (interactive (list (register-read-with-preview 523 (interactive (list (register-read-with-preview
501 "Copy rectangle to register: ") 524 "Copy rectangle to register: ")
502 (region-beginning) 525 (region-beginning)