1 |
;;; macros.el --- non-primitive commands for keyboard macros |
;;; macros.el --- non-primitive commands for keyboard macros |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 87, 92, 94, 95 Free Software Foundation, Inc. |
;; Copyright (C) 1985, 86, 87, 92, 94, 95, 04 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Maintainer: FSF |
;; Maintainer: FSF |
6 |
;; Keywords: abbrev |
;; Keywords: abbrev |
151 |
(cond ((= char ?\\) |
(cond ((= char ?\\) |
152 |
(insert "\\\\")) |
(insert "\\\\")) |
153 |
((= char ?\") |
((= char ?\") |
154 |
(insert "\\\"")) |
(insert "\\\"")) |
155 |
((= char ?\;) |
((= char ?\;) |
156 |
(insert "\\;")) |
(insert "\\;")) |
157 |
((= char 127) |
((= char 127) |
240 |
|
|
241 |
;;;###autoload |
;;;###autoload |
242 |
(defun apply-macro-to-region-lines (top bottom &optional macro) |
(defun apply-macro-to-region-lines (top bottom &optional macro) |
243 |
"For each complete line between point and mark, move to the beginning |
"Apply last keyboard macro to all lines in the region. |
244 |
of the line, and run the last keyboard macro. |
For each line that begins in the region, move to the beginning of |
245 |
|
the line, and run the last keyboard macro. |
246 |
|
|
247 |
When called from lisp, this function takes two arguments TOP and |
When called from lisp, this function takes two arguments TOP and |
248 |
BOTTOM, describing the current region. TOP must be before BOTTOM. |
BOTTOM, describing the current region. TOP must be before BOTTOM. |
278 |
\\C-x ) |
\\C-x ) |
279 |
|
|
280 |
and then select the region of un-tablified names and use |
and then select the region of un-tablified names and use |
281 |
`\\[apply-macro-to-region-lines]' to build the table from the names. |
`\\[apply-macro-to-region-lines]' to build the table from the names." |
|
" |
|
282 |
(interactive "r") |
(interactive "r") |
283 |
(or macro |
(or macro |
284 |
(progn |
(progn |
286 |
(error "No keyboard macro has been defined")) |
(error "No keyboard macro has been defined")) |
287 |
(setq macro last-kbd-macro))) |
(setq macro last-kbd-macro))) |
288 |
(save-excursion |
(save-excursion |
289 |
(let ((end-marker (progn |
(let ((end-marker (copy-marker bottom)) |
|
(goto-char bottom) |
|
|
(beginning-of-line) |
|
|
(point-marker))) |
|
290 |
next-line-marker) |
next-line-marker) |
291 |
(goto-char top) |
(goto-char top) |
292 |
(if (not (bolp)) |
(if (not (bolp)) |