diff options
author | Jim Blandy <jimb@redhat.com> | 1991-08-14 22:50:16 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1991-08-14 22:50:16 +0000 |
commit | 881bf512779012dfb1ffa2325554646443a723da (patch) | |
tree | 1352797c634e16d7afd5d132fe9c9664459e9f45 /lisp/macros.el | |
parent | 94ac188c6185c19c0591091401a4801838b533b1 (diff) | |
download | emacs-881bf512779012dfb1ffa2325554646443a723da.tar.gz |
*** empty log message ***
Diffstat (limited to 'lisp/macros.el')
-rw-r--r-- | lisp/macros.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/macros.el b/lisp/macros.el index 8770ac58a2f..630565fbc5e 100644 --- a/lisp/macros.el +++ b/lisp/macros.el @@ -106,8 +106,8 @@ C-l -- redisplay screen and ask again." ;;;###autoload (defun apply-macro-to-region-lines (top bottom &optional macro) - "For each complete line in the current region, move to the beginning of -the line, and run the last keyboard macro. + "For each complete line between point and mark, move to the beginning +of the line, and run the last keyboard macro. When called from lisp, this function takes two arguments TOP and BOTTOM, describing the current region. TOP must be before BOTTOM. @@ -146,8 +146,11 @@ and then select the region of un-tablified names and use `\\[apply-macro-to-region-lines]' to build the table from the names. " (interactive "r") - (if (null last-kbd-macro) - (error "No keyboard macro has been defined.")) + (or macro + (progn + (if (null last-kbd-macro) + (error "No keyboard macro has been defined.")) + (setq macro last-kbd-macro))) (save-excursion (let ((end-marker (progn (goto-char bottom) @@ -158,7 +161,7 @@ and then select the region of un-tablified names and use (forward-line 1)) (while (< (point) end-marker) (save-excursion - (execute-kbd-macro (or macro last-kbd-macro))) + (execute-kbd-macro macro)) (forward-line 1))))) ;;;###autoload |