changeset 391:4b1d23627759

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 14 Aug 1991 22:50:16 +0000
parents 4dfee0c58c2a
children dce611246f59
files lisp/macros.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/macros.el	Wed Aug 14 22:27:13 1991 +0000
+++ b/lisp/macros.el	Wed Aug 14 22:50:16 1991 +0000
@@ -106,8 +106,8 @@
 
 ;;;###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 @@
 `\\[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 @@
 	  (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