/[emacs]/emacs/lisp/macros.el
ViewVC logotype

Diff of /emacs/lisp/macros.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40.2.1 by handa, Fri Apr 16 12:50:07 2004 UTC revision 1.40.2.2 by miles, Sat Sep 4 09:14:25 2004 UTC
# Line 1  Line 1 
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
# Line 151  use this command, and then save the file Line 151  use this command, and then save the file
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)
# Line 240  Possibilities: \\<query-replace-map> Line 240  Possibilities: \\<query-replace-map>
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.
# Line 277  and write a macro to massage a word into Line 278  and write a macro to massage a word into
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
# Line 286  and then select the region of un-tablifi Line 286  and then select the region of un-tablifi
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))

Legend:
Removed from v.1.40.2.1  
changed lines
  Added in v.1.40.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26