From: Decebal <CLDWesterhof@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Making callable function of a macro
Date: Thu, 25 Sep 2008 00:07:23 -0700 (PDT) [thread overview]
Message-ID: <19cc8ee3-7dbc-47ac-bee9-bf233b42a0eb@j22g2000hsf.googlegroups.com> (raw)
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.
next reply other threads:[~2008-09-25 7:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 7:07 Decebal [this message]
2008-09-25 7:39 ` Making callable function of a macro 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19cc8ee3-7dbc-47ac-bee9-bf233b42a0eb@j22g2000hsf.googlegroups.com \
--to=cldwesterhof@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.