logo       

Re: question: remapping accented character: msg#00040

emacs.macintosh.osx

Subject: Re: question: remapping accented character

you can use abrrev feature:

(define-abbrev-table 'global-abbrev-table '(
("alpha" "α" nil 0)
("beta" "β" nil 0)
("gamma" "γ" nil 0)
("theta" "θ" nil 0)
("Infinity" "∞" nil 0)
("eop" "∎" nil 0)
("luv" "♥" nil 0)
("é" "{{\\\\'e}}" nil 0)
)
)

or you can define a shortcut to insert whatever:

(global-set-key (kbd "M-i a") (lambda () (interactive) (insert "α")))
(global-set-key (kbd "M-i b") (lambda () (interactive) (insert "β")))
(global-set-key (kbd "M-i t") (lambda () (interactive) (insert "θ")))

Xah
xah@xxxxxxxxxx
http://xahlee.org/
-----------------

On Aug 8, 2007, at 2:32 AM, Marc Shapiro -- at work wrote:

Hi. This is probably the wrong place for this question, but I really can't figure out where to find this information.

How can I remap accented characters? Specifically, in bibtex mode (because bibtex does not deal correctly with Latin-1), when I type "é" (e-acute-accent) I wish the string "{{\\'e}}" to appear in the buffer. Similarly for other diacritical characters.

Everything I tried so far has failed. Thanks for any help.

Marc

---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>





---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise