[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making callable function of a macro
From: |
Decebal |
Subject: |
Making callable function of a macro |
Date: |
Thu, 25 Sep 2008 00:07:23 -0700 (PDT) |
User-agent: |
G2/1.0 |
I made the following macro to process some files:
#####
Macro:
ESC < ;; beginning-of-buffer
C-SPC ;; set-mark-command
ESC C-s ;; isearch-forward-regexp
^ = ;; self-insert-command * 2
RET ;; newline
C-a ;; beginning-of-line
2*C-n ;; next-line
C-w ;; kill-region
ESC > ;; end-of-buffer
C-SPC ;; set-mark-command
ESC < ;; beginning-of-buffer
ESC C-s ;; isearch-forward-regexp
^ = ;; self-insert-command * 2
RET ;; newline
C-a ;; beginning-of-line
C-w ;; kill-region
ESC < ;; beginning-of-buffer
ESC C-% ;; query-replace-regexp
C-q ;; quoted-insert
LFD ;; newline-and-indent
ESC 5 ;; digit-argument
SPC ;; self-insert-command
RET ;; newline
C-q ;; quoted-insert
TAB ;; indent-relative
RET ;; newline
! ;; self-insert-command
ESC < ;; beginning-of-buffer
RET ;; newline
C-p ;; previous-line
Probleem ;; self-insert-command * 8
C-q ;; quoted-insert
TAB ;; indent-relative
Referentie ;; self-insert-command * 10
C-q ;; quoted-insert
TAB ;; indent-relative
Oplossing ;; self-insert-command * 9
C-a ;; beginning-of-line
#####
Now other people like the functionality that I made. ;-}
But they do not use Emacs. So I would like to change the macro to a
function. In this way the script that is used to generate the input
files, could call Emacs and process them directly. Is this possible?
If so: how would I do this?
I have worked with Emacs, but not really with the Lisp capabilities.
More as an editor.
- Making callable function of a macro,
Decebal <=
Re: Making callable function of a macro, Joost Kremers, 2008/09/25
Re: Making callable function of a macro, harven, 2008/09/25
Re: Making callable function of a macro, Decebal, 2008/09/30