diff options
| -rw-r--r-- | lisp/register.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/register.el b/lisp/register.el index 0f9e5df36f5..940ae584683 100644 --- a/lisp/register.el +++ b/lisp/register.el | |||
| @@ -136,29 +136,29 @@ delete any existing frames that the frame configuration doesn't mention. | |||
| 136 | 136 | ||
| 137 | (add-hook 'kill-buffer-hook 'register-swap-out) | 137 | (add-hook 'kill-buffer-hook 'register-swap-out) |
| 138 | 138 | ||
| 139 | (defun number-to-register (arg char) | 139 | (defun number-to-register (number register) |
| 140 | "Store a number in a register. | 140 | "Store a number in a register. |
| 141 | Two args, NUMBER and REGISTER (a character, naming the register). | 141 | Two args, NUMBER and REGISTER (a character, naming the register). |
| 142 | If NUMBER is nil, a decimal number is read from the buffer starting | 142 | If NUMBER is nil, a decimal number is read from the buffer starting |
| 143 | at point, and point moves to the end of that number. | 143 | at point, and point moves to the end of that number. |
| 144 | Interactively, NUMBER is the prefix arg (none means nil)." | 144 | Interactively, NUMBER is the prefix arg (none means nil)." |
| 145 | (interactive "P\ncNumber to register: ") | 145 | (interactive "P\ncNumber to register: ") |
| 146 | (set-register char | 146 | (set-register register |
| 147 | (if arg | 147 | (if number |
| 148 | (prefix-numeric-value arg) | 148 | (prefix-numeric-value number) |
| 149 | (if (looking-at "\\s-*-?[0-9]+") | 149 | (if (looking-at "\\s-*-?[0-9]+") |
| 150 | (progn | 150 | (progn |
| 151 | (goto-char (match-end 0)) | 151 | (goto-char (match-end 0)) |
| 152 | (string-to-int (match-string 0))) | 152 | (string-to-int (match-string 0))) |
| 153 | 0)))) | 153 | 0)))) |
| 154 | 154 | ||
| 155 | (defun increment-register (arg char) | 155 | (defun increment-register (number register) |
| 156 | "Add NUMBER to the contents of register REGISTER. | 156 | "Add NUMBER to the contents of register REGISTER. |
| 157 | Interactively, NUMBER is the prefix arg (none means nil)." | 157 | Interactively, NUMBER is the prefix arg." |
| 158 | (interactive "p\ncIncrement register: ") | 158 | (interactive "p\ncIncrement register: ") |
| 159 | (or (numberp (get-register char)) | 159 | (or (numberp (get-register register)) |
| 160 | (error "Register does not contain a number")) | 160 | (error "Register does not contain a number")) |
| 161 | (set-register char (+ arg (get-register char)))) | 161 | (set-register register (+ number (get-register register)))) |
| 162 | 162 | ||
| 163 | (defun view-register (register) | 163 | (defun view-register (register) |
| 164 | "Display what is contained in register named REGISTER. | 164 | "Display what is contained in register named REGISTER. |