X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/f7ff1b0f0792f1f870778404531e68e77832c4a1..refs/heads/wip:/lisp/autoarg.el diff --git a/lisp/autoarg.el b/lisp/autoarg.el index 378ec1318b..27b6d49d6c 100644 --- a/lisp/autoarg.el +++ b/lisp/autoarg.el @@ -1,6 +1,6 @@ ;;; autoarg.el --- make digit keys supply prefix args -;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2014 Free Software Foundation, Inc. ;; Author: Dave Love ;; Created: 1998-09-04 @@ -75,7 +75,6 @@ (setq prefix-arg (if (zerop digit) '- (- digit)))) (t (setq prefix-arg digit)))) - (setq universal-argument-num-events (length (this-command-keys))) (setq overriding-terminal-local-map universal-argument-map)) (defvar autoarg-kp-mode-map @@ -90,15 +89,19 @@ ;;;###autoload (define-minor-mode autoarg-mode - "Toggle Autoarg minor mode globally. -With ARG, turn Autoarg mode on if ARG is positive, off otherwise. + "Toggle Autoarg mode, a global minor mode. +With a prefix argument ARG, enable Autoarg mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. + \\ -In Autoarg mode digits are bound to `digit-argument' -- i.e. they -supply prefix arguments as C-DIGIT and M-DIGIT normally do -- and -C-DIGIT inserts DIGIT. \\[autoarg-terminate] terminates the prefix sequence -and inserts the digits of the autoarg sequence into the buffer. -Without a numeric prefix arg the normal binding of \\[autoarg-terminate] is -invoked, i.e. what it would be with Autoarg mode off. +In Autoarg mode, digits are bound to `digit-argument', i.e. they +supply prefix arguments as C-DIGIT and M-DIGIT normally do. +Furthermore, C-DIGIT inserts DIGIT. +\\[autoarg-terminate] terminates the prefix sequence and inserts +the digits of the autoarg sequence into the buffer. +Without a numeric prefix arg, the normal binding of \\[autoarg-terminate] +is invoked, i.e. what it would be with Autoarg mode off. For example: `6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'. @@ -112,11 +115,14 @@ then invokes the normal binding of \\[autoarg-terminate]. ;;;###autoload (define-minor-mode autoarg-kp-mode - "Toggle Autoarg-KP minor mode globally. -With ARG, turn Autoarg mode on if ARG is positive, off otherwise. + "Toggle Autoarg-KP mode, a global minor mode. +With a prefix argument ARG, enable Autoarg-KP mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. + \\ -This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1' -etc. to supply digit arguments. +This is similar to `autoarg-mode' but rebinds the keypad keys +`kp-1' etc. to supply digit arguments. \\{autoarg-kp-mode-map}" nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard