From: harven <harven@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Are abbrevs for this?
Date: Sat, 13 Jun 2009 10:14:50 +0200 [thread overview]
Message-ID: <m2r5xok0sl.fsf@free.fr> (raw)
In-Reply-To: mailman.451.1244720587.2239.help-gnu-emacs@gnu.org
"Paulo J. Matos" <pocmatos@gmail.com> writes:
> On Thu, Jun 11, 2009 at 8:53 AM, TomSW<tom.weissmann@gmail.com> wrote:
>> On Jun 11, 1:53 am, Xah Lee <xah...@gmail.com> wrote:
>>> On Jun 10, 6:53 am, "Paulo J. Matos" <pocma...@gmail.com> wrote:
>>>
>>> > Hi all,
>>>
>>> > I am developing a new major mode for a new specification language
>>> > which uses a lot of unicode symbols but it also has an ascii notation.
>>> > Like some scheme modes convert the lambda keyword into the greek
>>> > lambda letter, I have a table of keywords that would like them to be
>>> > changed into unicode symbols.
>>
>> If the scheme modes are anything like pretty-haskell, they don't
>> actually convert the text, they use font-lock to disguise "lambda" as
>> the greek letter - the source code itself doesn't change.
>>
>
> That's the approach I need...
Here is the code
;; real lisp hackers use the lambda character
;; courtesy of stefan monnier on c.l.l
(defun sm-lambda-mode-hook ()
(font-lock-add-keywords
nil `(("\\<lambda\\>"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
,(make-char 'greek-iso8859-7 107))
nil))))))
(add-hook 'emacs-lisp-mode-hook 'sm-lambda-mode-hook)
(add-hook 'lisp-interactive-mode-hook 'sm-lamba-mode-hook)
(add-hook 'scheme-mode-hook 'sm-lambda-mode-hook)
next prev parent reply other threads:[~2009-06-13 8:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.368.1244642017.2239.help-gnu-emacs@gnu.org>
2009-06-10 23:53 ` Are abbrevs for this? Xah Lee
2009-06-11 7:53 ` TomSW
2009-06-11 11:42 ` Paulo J. Matos
[not found] ` <mailman.451.1244720587.2239.help-gnu-emacs@gnu.org>
2009-06-11 11:55 ` TomSW
2009-06-13 8:14 ` harven [this message]
2009-06-10 13:53 Paulo J. Matos
2009-06-11 1:13 ` Maurizio Vitale
2009-06-11 11:43 ` Paulo J. Matos
2009-06-11 12:18 ` Maurizio Vitale
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=m2r5xok0sl.fsf@free.fr \
--to=harven@free.fr \
--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.