diff options
| author | Glenn Morris | 2014-02-01 19:42:20 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-01 19:42:20 -0800 |
| commit | 4472a196032874cb3d1d82999e331b981598d130 (patch) | |
| tree | c7087f0c3ce95107b83449285cd60fda20c5fd3a | |
| parent | 70e5a261ac4e923a09a464af9ffb9a321a42e70e (diff) | |
| download | emacs-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/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/register.el | 55 |
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 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-02-02 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2014-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. |
| 149 | If `register-alist' and `register-preview-delay' are both non-nil, | 149 | Prompt with the string PROMPT. If `register-alist' and |
| 150 | display a window listing registers after `register-preview-delay' seconds. | 150 | `register-preview-delay' are both non-nil, display a window |
| 151 | If `help-char' (or a member of `help-event-list') is pressed, display | 151 | listing existing registers after `register-preview-delay' seconds. |
| 152 | such a window regardless." | 152 | If `help-char' (or a member of `help-event-list') is pressed, |
| 153 | display 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. |
| 177 | With prefix argument, store current frame configuration. | 178 | With prefix argument, store current frame configuration. |
| 178 | Use \\[jump-to-register] to go to that location or restore that configuration. | 179 | Use \\[jump-to-register] to go to that location or restore that configuration. |
| 179 | Argument is a character, naming the register." | 180 | Argument is a character, naming the register. |
| 181 | |||
| 182 | Interactively, 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. |
| 190 | Use \\[jump-to-register] to restore the configuration. | 193 | Use \\[jump-to-register] to restore the configuration. |
| 191 | Argument is a character, naming the register." | 194 | Argument is a character, naming the register. |
| 195 | |||
| 196 | Interactively, 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. |
| 201 | Use \\[jump-to-register] to restore the configuration. | 206 | Use \\[jump-to-register] to restore the configuration. |
| 202 | Argument is a character, naming the register." | 207 | Argument is a character, naming the register. |
| 208 | |||
| 209 | Interactively, 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 | |||
| 217 | First argument is a character, naming the register. | 224 | First argument is a character, naming the register. |
| 218 | Optional second arg non-nil (interactively, prefix argument) says to | 225 | Optional second arg non-nil (interactively, prefix argument) says to |
| 219 | delete any existing frames that the frameset doesn't mention. | 226 | delete any existing frames that the frameset doesn't mention. |
| 220 | \(Otherwise, these frames are iconified.)" | 227 | \(Otherwise, these frames are iconified.) |
| 228 | |||
| 229 | Interactively, 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. | |||
| 265 | Two args, NUMBER and REGISTER (a character, naming the register). | 274 | Two args, NUMBER and REGISTER (a character, naming the register). |
| 266 | If NUMBER is nil, a decimal number is read from the buffer starting | 275 | If NUMBER is nil, a decimal number is read from the buffer starting |
| 267 | at point, and point moves to the end of that number. | 276 | at point, and point moves to the end of that number. |
| 268 | Interactively, NUMBER is the prefix arg (none means nil)." | 277 | Interactively, NUMBER is the prefix arg (none means nil). |
| 278 | |||
| 279 | Interactively, 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. |
| 301 | The Lisp value REGISTER is a character." | 312 | The Lisp value REGISTER is a character. |
| 313 | |||
| 314 | Interactively, 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.) |
| 401 | Normally puts point before and mark after the inserted text. | 414 | Normally puts point before and mark after the inserted text. |
| 402 | If optional second arg is non-nil, puts mark before and point after. | 415 | If optional second arg is non-nil, puts mark before and point after. |
| 403 | Interactively, second arg is non-nil if prefix arg is supplied." | 416 | Interactively, second arg is non-nil if prefix arg is supplied. |
| 417 | |||
| 418 | Interactively, 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. | |||
| 431 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. | 446 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. |
| 432 | START and END are buffer positions indicating what to copy. | 447 | START and END are buffer positions indicating what to copy. |
| 433 | The optional argument REGION if non-nil, indicates that we're not just copying | 448 | The optional argument REGION if non-nil, indicates that we're not just copying |
| 434 | some text between START and END, but we're copying the region." | 449 | some text between START and END, but we're copying the region. |
| 450 | |||
| 451 | Interactively, 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. |
| 451 | With prefix arg, delete as well. | 468 | With prefix arg, delete as well. |
| 452 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. | 469 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. |
| 453 | START and END are buffer positions indicating what to append." | 470 | START and END are buffer positions indicating what to append. |
| 471 | |||
| 472 | Interactively, 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. |
| 473 | With prefix arg, delete as well. | 492 | With prefix arg, delete as well. |
| 474 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. | 493 | Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. |
| 475 | START and END are buffer positions indicating what to prepend." | 494 | START and END are buffer positions indicating what to prepend. |
| 495 | |||
| 496 | Interactively, 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. | |||
| 496 | To insert this register in the buffer, use \\[insert-register]. | 517 | To insert this register in the buffer, use \\[insert-register]. |
| 497 | 518 | ||
| 498 | Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. | 519 | Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. |
| 499 | START and END are buffer positions giving two corners of rectangle." | 520 | START and END are buffer positions giving two corners of rectangle. |
| 521 | |||
| 522 | Interactively, 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) |