From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: Are abbrevs for this? Date: Sat, 13 Jun 2009 10:14:50 +0200 Organization: http://groups.google.com Message-ID: References: <183b9113-69f1-45a2-8bec-a3fbdae5e92f@d38g2000prn.googlegroups.com> <21f4fcb3-2935-4034-8508-9d1dcc128487@m19g2000yqk.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1244882496 19976 80.91.229.12 (13 Jun 2009 08:41:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jun 2009 08:41:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 13 10:41:34 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MFOnt-0000OO-M7 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jun 2009 10:41:33 +0200 Original-Received: from localhost ([127.0.0.1]:57518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFOnt-00030h-1j for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jun 2009 04:41:33 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!de-l.enfer-du-nord.net!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp7-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Cancel-Lock: sha1:4R3wx0iM69SOuCTeMgw2oYb84EM= Original-Lines: 35 Original-NNTP-Posting-Date: 13 Jun 2009 10:14:50 MEST Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: 1244880890 news-1.free.fr 22044 82.240.200.149:50244 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:170012 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65238 Archived-At: "Paulo J. Matos" writes: > On Thu, Jun 11, 2009 at 8:53 AM, TomSW wrote: >> On Jun 11, 1:53 am, Xah Lee wrote: >>> On Jun 10, 6:53 am, "Paulo J. Matos" 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 `(("\\" (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)