diff options
| author | Gerd Moellmann | 2000-07-20 20:35:05 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-20 20:35:05 +0000 |
| commit | bd7acc8d7c8626963a34786ecb8bdb4631b5e9e4 (patch) | |
| tree | df72aeaaec240115df84a8467177881b1f09ee4c | |
| parent | bc75b4fd467d6621a9484e9265ef830d0f1fe0dd (diff) | |
| download | emacs-bd7acc8d7c8626963a34786ecb8bdb4631b5e9e4.tar.gz emacs-bd7acc8d7c8626963a34786ecb8bdb4631b5e9e4.zip | |
(universal-argument-map): Bind numeric keypad keys
kp-0 to kp-9 and kp-subtract.
(digit-argument): Handle these keys.
| -rw-r--r-- | lisp/simple.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 4ad1422e082..58aa83f5bb2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1398,6 +1398,17 @@ specifies the value of ERROR-BUFFER." | |||
| 1398 | (define-key map [?7] 'digit-argument) | 1398 | (define-key map [?7] 'digit-argument) |
| 1399 | (define-key map [?8] 'digit-argument) | 1399 | (define-key map [?8] 'digit-argument) |
| 1400 | (define-key map [?9] 'digit-argument) | 1400 | (define-key map [?9] 'digit-argument) |
| 1401 | (define-key map [kp-0] 'digit-argument) | ||
| 1402 | (define-key map [kp-1] 'digit-argument) | ||
| 1403 | (define-key map [kp-2] 'digit-argument) | ||
| 1404 | (define-key map [kp-3] 'digit-argument) | ||
| 1405 | (define-key map [kp-4] 'digit-argument) | ||
| 1406 | (define-key map [kp-5] 'digit-argument) | ||
| 1407 | (define-key map [kp-6] 'digit-argument) | ||
| 1408 | (define-key map [kp-7] 'digit-argument) | ||
| 1409 | (define-key map [kp-8] 'digit-argument) | ||
| 1410 | (define-key map [kp-9] 'digit-argument) | ||
| 1411 | (define-key map [kp-subtract] 'universal-argument-minus) | ||
| 1401 | map) | 1412 | map) |
| 1402 | "Keymap used while processing \\[universal-argument].") | 1413 | "Keymap used while processing \\[universal-argument].") |
| 1403 | 1414 | ||
| @@ -1450,7 +1461,10 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." | |||
| 1450 | "Part of the numeric argument for the next command. | 1461 | "Part of the numeric argument for the next command. |
| 1451 | \\[universal-argument] following digits or minus sign ends the argument." | 1462 | \\[universal-argument] following digits or minus sign ends the argument." |
| 1452 | (interactive "P") | 1463 | (interactive "P") |
| 1453 | (let ((digit (- (logand last-command-char ?\177) ?0))) | 1464 | (let* ((char (if (integerp last-command-char) |
| 1465 | last-command-char | ||
| 1466 | (get last-command-char 'ascii-character))) | ||
| 1467 | (digit (- (logand char ?\177) ?0))) | ||
| 1454 | (cond ((integerp arg) | 1468 | (cond ((integerp arg) |
| 1455 | (setq prefix-arg (+ (* arg 10) | 1469 | (setq prefix-arg (+ (* arg 10) |
| 1456 | (if (< arg 0) (- digit) digit)))) | 1470 | (if (< arg 0) (- digit) digit)))) |