all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making callable function of a macro
@ 2008-09-25  7:07 Decebal
  2008-09-25  7:39 ` Pascal J. Bourguignon
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Decebal @ 2008-09-25  7:07 UTC (permalink / raw
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-09-30  9:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25  7:07 Making callable function of a macro Decebal
2008-09-25  7:39 ` Pascal J. Bourguignon
2008-09-25  8:40   ` Decebal
2008-09-25  8:48     ` Joost Kremers
2008-09-25  9:25       ` Decebal
2008-09-25  9:45         ` harven
2008-09-25  7:54 ` Joost Kremers
2008-09-25  8:33   ` Andreas Politz
2008-09-25  8:45   ` Decebal
2008-09-25  9:24 ` harven
2008-09-30  9:04 ` Decebal

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.