aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-06-29 20:43:59 +0000
committerStefan Monnier2002-06-29 20:43:59 +0000
commit7e30f58e10c7437d63cb8773ab813a78a5d2dd70 (patch)
tree4061664abb46c1cfa9d986c0bb40d399a89f84eb
parent7980ab49840b79a5bc5b96c9a68361e408c1ab89 (diff)
downloademacs-7e30f58e10c7437d63cb8773ab813a78a5d2dd70.tar.gz
emacs-7e30f58e10c7437d63cb8773ab813a78a5d2dd70.zip
Passed it through checkdoc. Moved `provide' to the end, where it belongs.
-rw-r--r--lisp/kmacro.el32
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index c6b0c364a33..c1d89386497 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -26,7 +26,7 @@
26 26
27;; The kmacro package is an alternative user interface to emacs' 27;; The kmacro package is an alternative user interface to emacs'
28;; keyboard macro functionality. This functionality is normally bound 28;; keyboard macro functionality. This functionality is normally bound
29;; to C-x (, C-x ), and C-x C-e, but these bindings are too hard to 29;; to C-x (, C-x ), and C-x e, but these bindings are too hard to
30;; type to be really useful for doing small repeated tasks. 30;; type to be really useful for doing small repeated tasks.
31 31
32;; With kmacro, two function keys are dedicated to keyboard macros, 32;; With kmacro, two function keys are dedicated to keyboard macros,
@@ -60,7 +60,7 @@
60;; The following sequence: M-5 F7 x M-2 F7 y F8 F8 F8 F8 60;; The following sequence: M-5 F7 x M-2 F7 y F8 F8 F8 F8
61;; inserts the following string: x5yx7yx9yx11y 61;; inserts the following string: x5yx7yx9yx11y
62 62
63;; A macro can also be call using a mouse click, default S-mouse-3. 63;; A macro can also be called using a mouse click, default S-mouse-3.
64;; This calls the macro at the point where you click the mouse. 64;; This calls the macro at the point where you click the mouse.
65 65
66;; When you have defined another macro, which is thus called via F8, 66;; When you have defined another macro, which is thus called via F8,
@@ -111,9 +111,7 @@
111 111
112;;; Code: 112;;; Code:
113 113
114(provide 'kmacro) 114;; Customization:
115
116;;; Customization:
117 115
118(defgroup kmacro nil 116(defgroup kmacro nil
119 "Simplified keyboard macro user interface." 117 "Simplified keyboard macro user interface."
@@ -125,7 +123,7 @@
125;;;###autoload 123;;;###autoload
126(defcustom kmacro-initialize nil 124(defcustom kmacro-initialize nil
127 "Setting this variable turns on the kmacro functionality. 125 "Setting this variable turns on the kmacro functionality.
128This binds the kmacro function keys in the global-map, so 126This binds the kmacro function keys in the `global-map', so
129unsetting this variable does not have any effect!" 127unsetting this variable does not have any effect!"
130 :set #'(lambda (symbol value) 128 :set #'(lambda (symbol value)
131 (if value (kmacro-initialize)) 129 (if value (kmacro-initialize))
@@ -156,23 +154,23 @@ unsetting this variable does not have any effect!"
156;; State variables 154;; State variables
157 155
158(defvar kmacro-counter 0 156(defvar kmacro-counter 0
159 "*Current keyboard macro counter") 157 "*Current keyboard macro counter.")
160 158
161(defvar kmacro-counter-format "%d" 159(defvar kmacro-counter-format "%d"
162 "*Current keyboard macro counter format") 160 "*Current keyboard macro counter format.")
163 161
164(defvar kmacro-counter-format-start kmacro-counter-format 162(defvar kmacro-counter-format-start kmacro-counter-format
165 "Macro format at start of macro execution.") 163 "Macro format at start of macro execution.")
166 164
167(defvar kmacro-last-counter 0 "Last counter inserted by key macro") 165(defvar kmacro-last-counter 0 "Last counter inserted by key macro.")
168(defvar kmacro-append-to nil "Last key macro if appending to macro") 166(defvar kmacro-append-to nil "Last key macro if appending to macro.")
169(defvar kmacro-ring nil "Key macro ring") 167(defvar kmacro-ring nil "Key macro ring.")
170 168
171(defvar kmacro-ring-max 4 169(defvar kmacro-ring-max 4
172 "*Maximum number of key macros to save in key macro ring") 170 "*Maximum number of key macros to save in key macro ring.")
173 171
174(defun kmacro-display (macro) 172(defun kmacro-display (macro)
175 "Display a keyboard macro." 173 "Display a keyboard MACRO."
176 (let (s) 174 (let (s)
177 (if (stringp macro) 175 (if (stringp macro)
178 (setq s (if (> (length macro) 50) 176 (setq s (if (> (length macro) 50)
@@ -195,7 +193,7 @@ unsetting this variable does not have any effect!"
195 193
196 194
197(defun kmacro-start-macro (arg) 195(defun kmacro-start-macro (arg)
198 "Set kmacro-counter to ARG or 0 if missing, and start-kbd-macro. 196 "Set `kmacro-counter' to ARG or 0 if missing, and `start-kbd-macro'.
199With \\[universal-argument], append to current keyboard macro (keep kmacro-counter). 197With \\[universal-argument], append to current keyboard macro (keep kmacro-counter).
200 198
201When defining/executing macro, insert macro counter and increment with 199When defining/executing macro, insert macro counter and increment with
@@ -228,7 +226,7 @@ The format of the counter can be modified via \\[kmacro-set-format]."
228 226
229(defun kmacro-call-macro (arg) 227(defun kmacro-call-macro (arg)
230 "End kbd macro if currently being defined; else call last kbd macro. 228 "End kbd macro if currently being defined; else call last kbd macro.
231With numeric prefix argument, repeat macro that many times. 229With numeric prefix ARG, repeat macro that many times.
232With \\[universal-argument], swap current macro with head of macro ring." 230With \\[universal-argument], swap current macro with head of macro ring."
233 (interactive "p") 231 (interactive "p")
234 (cond 232 (cond
@@ -315,7 +313,7 @@ With \\[universal-argument], unconditionally set counter to 0."
315 (t 0)))) 313 (t 0))))
316 314
317(defun kmacro-set-format (format) 315(defun kmacro-set-format (format)
318 "Set macro counter format" 316 "Set macro counter FORMAT."
319 (interactive "sMacro Counter Format (printf format): ") 317 (interactive "sMacro Counter Format (printf format): ")
320 (setq kmacro-counter-format 318 (setq kmacro-counter-format
321 (if (equal format "") 319 (if (equal format "")
@@ -355,3 +353,5 @@ Otherwise, use customized keys."
355 (unless (eq call-mouse t) 353 (unless (eq call-mouse t)
356 (global-set-key (vector call-mouse) 'kmacro-end-call-mouse))) 354 (global-set-key (vector call-mouse) 'kmacro-end-call-mouse)))
357 355
356(provide 'kmacro)
357;;; kmacro.el ends here