From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: keyboard macro
Date: Mon, 21 Oct 2013 13:26:02 -0400 [thread overview]
Message-ID: <jwv7gd65ypa.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 1048826531.375111.1382373351593.open-xchange@app02.ox.hosteurope.de
> So my question: Is there a way to define a macro/keyboard function that will
> insert a certain character at the point when I write "..x" (not followed by a
> space)?
Not exactly, tho you could cook one up. E.g. (guaranteed 100% untested):
(defvar my-magic-rewrites
'(
("..a" . "ā")
))
(defvar my-last-chars nil)
(defun my-p-s-i-h ()
(unless (eq last-command this-command)
(setq my-last-chars ""))
(setq my-last-chars (concat my-last-chars (string last-command-event)))
(let ((rewrite (assoc my-last-chars my-magic-rewrites)))
(when rewrite
(delete-char (- (length (car rewrite))))
(insert (cdr rewrite)))))
(add-hook 'post-self-insert-hook #'my-p-s-i-h)
But I recommend you try instead M-x describe-input-method RET devana TAB
Stefan
next prev parent reply other threads:[~2013-10-21 17:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 16:35 keyboard macro Christof Spitz
2013-10-21 17:26 ` Stefan Monnier [this message]
[not found] ` <mailman.4410.1382376390.10748.help-gnu-emacs@gnu.org>
2013-10-21 17:39 ` Rustom Mody
2013-10-21 18:17 ` Yuri Khan
2013-10-21 18:25 ` Yuri Khan
[not found] ` <mailman.4414.1382379457.10748.help-gnu-emacs@gnu.org>
2013-10-22 3:48 ` X keyboard settings (was keyboard macro) Rustom Mody
2013-10-22 4:11 ` Yuri Khan
2013-10-22 5:58 ` Joost Kremers
2013-10-22 11:59 ` Jürgen Sauermann
2013-10-22 13:02 ` Stefan Monnier
[not found] ` <mailman.4532.1382529319.10748.help-gnu-emacs@gnu.org>
2013-10-24 1:02 ` Rustom Mody
2013-10-24 12:35 ` Jürgen Sauermann
[not found] ` <mailman.4607.1382618163.10748.help-gnu-emacs@gnu.org>
2013-10-24 17:36 ` Rustom Mody
[not found] <mailman.4404.1382373480.10748.help-gnu-emacs@gnu.org>
2013-10-21 17:00 ` keyboard macro Rustom Mody
2013-10-21 17:59 ` Christof Spitz
2013-10-22 17:38 ` Rustom Mody
-- strict thread matches above, loose matches on Subject: below --
2010-05-28 8:05 Kanhaiya
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=jwv7gd65ypa.fsf-monnier+gmane.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.