annotate lisp/autoarg.el @ 105674:a5942def89eb

* info.el (Info-complete-menu-item): Handle `boundaries' explicitly. (Info-menu): Remove unused vars `last' and `completions'. (Info-index-nodes): Remove unused var `node'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 19 Oct 2009 13:47:10 +0000
parents 4efc7ca085ce
children 1d1d5d9bd884
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1 ;;; autoarg.el --- make digit keys supply prefix args
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
2
74439
ddcbd2c1b70d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74257
diff changeset
3 ;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004,
100908
a9dc0e7c3f2b Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 94678
diff changeset
4 ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
5
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
6 ;; Author: Dave Love <fx@gnu.org>
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
7 ;; Created: 1998-09-04
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
8 ;; Keywords: abbrev, emulations
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
9
29087
d6e90113152f Fix boilerplate comments.
Dave Love <fx@gnu.org>
parents: 28956
diff changeset
10 ;; This file is part of GNU Emacs.
d6e90113152f Fix boilerplate comments.
Dave Love <fx@gnu.org>
parents: 28956
diff changeset
11
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
14 ;; the Free Software Foundation, either version 3 of the License, or
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
15 ;; (at your option) any later version.
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
16
29087
d6e90113152f Fix boilerplate comments.
Dave Love <fx@gnu.org>
parents: 28956
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
21
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
24
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
26
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
27 ;; This provides `autoarg-mode', a global minor mode meant to emulate
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
28 ;; a facility reported from Twenex Emacs whereby digit keys supplied
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
29 ;; prefix args rather than self inserting, with a digit sequence
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
30 ;; terminated by space acting to insert the digits.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
31
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
32 ;; The bindings of DIGIT and C-DIGIT are swapped and a command bound
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
33 ;; to SPC deals with a numeric prefix arg or acts normally without
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
34 ;; such an arg. (In the absence of a suitable terminal, you'd
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
35 ;; probably want to swap DIGIT and M-DIGIT.) See the mode doc.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
36
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
37 ;; You probably don't really want to use this.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
38
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
39 ;; Also provides `autoarg-kp-mode' which is similar, but leaves the
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
40 ;; digit keys alone and redefines the `keypad' keys, `kp-1' &c as
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
41 ;; digit arguments. (Use `NumLock' if necessary to generate kp-N.)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
42 ;; You're more likely to want to use this.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
43
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
44 ;;; Code:
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
45
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
46 (defvar autoarg-mode-map
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
47 (let ((map (make-sparse-keymap)))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
48 ;; Loop over digit characters to set up keymap.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
49 (dotimes (i 10)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
50 (define-key map `[,(+ ?0 i)] 'digit-argument)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
51 (define-key map `[(control ,(+ ?0 i))] 'self-insert-command))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
52 (define-key map " " 'autoarg-terminate)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
53 map)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
54 "Keymap for Autoarg mode.")
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
55
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
56 ;; Logical additions:
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
57 ;; (define-key autoarg-mode-map [?-] 'negative-argument)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
58 ;; (define-key autoarg-mode-map [(control ?-)] 'self-insert-command)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
59 ;; A sensible/addition?
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
60 ;; (define-key autoarg-mode-map [?\r] 'autoarg-terminate)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
61
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
62 (defvar autoarg-kp-digits
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
63 (let (alist)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
64 (dotimes (i 10 alist)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
65 (push (cons (intern (format "kp-%d" i)) i) alist))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
66
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
67 (defun autoarg-kp-digit-argument (arg)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
68 "Part of the numeric argument for the next command, like `digit-argument'."
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
69 (interactive "P")
101010
4efc7ca085ce Replace last-command-char with last-command-event.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
70 (let ((digit (cdr (assq last-command-event autoarg-kp-digits))))
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
71 (cond ((integerp arg)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
72 (setq prefix-arg (+ (* arg 10)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
73 (if (< arg 0) (- digit) digit))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
74 ((eq arg '-)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
75 ;; Treat -0 as just -, so that -01 will work.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
76 (setq prefix-arg (if (zerop digit) '- (- digit))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
77 (t
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
78 (setq prefix-arg digit))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
79 (setq universal-argument-num-events (length (this-command-keys)))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
80 (setq overriding-terminal-local-map universal-argument-map))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
81
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
82 (defvar autoarg-kp-mode-map
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
83 (let ((map (make-sparse-keymap)))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
84 ;; Loop over digit characters to set up keymap.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
85 (dotimes (i 10)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
86 (let ((sym (intern (format "kp-%d" i))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
87 (define-key map (vector sym) 'autoarg-kp-digit-argument)))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
88 (define-key map [kp-subtract] 'negative-argument)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
89 map)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
90 "Keymap for Autoarg-KP mode.")
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
91
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
92 ;;;###autoload
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
93 (define-minor-mode autoarg-mode
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
94 "Toggle Autoarg minor mode globally.
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
95 With ARG, turn Autoarg mode on if ARG is positive, off otherwise.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
96 \\<autoarg-mode-map>
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
97 In Autoarg mode digits are bound to `digit-argument' -- i.e. they
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
98 supply prefix arguments as C-DIGIT and M-DIGIT normally do -- and
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
99 C-DIGIT inserts DIGIT. \\[autoarg-terminate] terminates the prefix sequence
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
100 and inserts the digits of the autoarg sequence into the buffer.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
101 Without a numeric prefix arg the normal binding of \\[autoarg-terminate] is
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
102 invoked, i.e. what it would be with Autoarg mode off.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
103
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
104 For example:
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
105 `6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
106 `6 9 a' inserts 69 `a's into the buffer.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
107 `6 9 \\[autoarg-terminate] \\[autoarg-terminate]' inserts `69' into the buffer and
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
108 then invokes the normal binding of \\[autoarg-terminate].
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
109 `C-u \\[autoarg-terminate]' invokes the normal binding of \\[autoarg-terminate] four times.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
110
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
111 \\{autoarg-mode-map}"
48598
2645c533c1fc (autoarg-mode): Give it a :group.
Dave Love <fx@gnu.org>
parents: 29425
diff changeset
112 nil " Aarg" autoarg-mode-map :global t :group 'keyboard)
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
113
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
114 ;;;###autoload
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
115 (define-minor-mode autoarg-kp-mode
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
116 "Toggle Autoarg-KP minor mode globally.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
117 With ARG, turn Autoarg mode on if ARG is positive, off otherwise.
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
118 \\<autoarg-kp-mode-map>
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
119 This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1'
74257
5c36efa11051 (autoarg-kp-mode): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents: 68651
diff changeset
120 etc. to supply digit arguments.
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
121
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
122 \\{autoarg-kp-mode-map}"
48613
e771680828e5 (autoarg-kp-mode): Give it a :group.
Dave Love <fx@gnu.org>
parents: 48598
diff changeset
123 nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard
29382
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
124 (if autoarg-kp-mode
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
125 (dotimes (i 10)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
126 (let ((sym (intern (format "kp-%d" i))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
127 (define-key universal-argument-map (vector sym)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
128 'autoarg-kp-digit-argument)))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
129 (dotimes (i 10)
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
130 (let ((sym (intern (format "kp-%d" i))))
5558cf965f4d Rewritten to use define-minor-mode.
Dave Love <fx@gnu.org>
parents: 29087
diff changeset
131 (define-key universal-argument-map (vector sym) nil)))))
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
132
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
133 (defun autoarg-terminate (n)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
134 "Maybe terminate a digit prefix sequence.
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
135 With a non-negative numeric prefix arg, insert the digits comprising
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
136 the arg into the current buffer. Otherwise use the binding of the key
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
137 which invoked this function, excluding the Autoarg keymap."
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
138 (interactive "P")
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
139 (if (numberp n)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
140 (insert (number-to-string n))
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
141 (let* ((autoarg-mode nil) ; hide the bindings
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
142 (binding (key-binding (this-single-command-keys))))
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
143 (if binding (call-interactively binding)))))
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
144
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
145 (provide 'autoarg)
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
146
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 79721
diff changeset
147 ;; arch-tag: 2ba2ab4f-d60e-402a-ae4d-37e29af723c2
28908
7b7bdd8aaa74 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
148 ;;; autoarg.el ends here