How to enter Greek characters in Emacs

后端 未结 10 1324
说谎
说谎 2021-01-30 11:20

This page indicates that Greek letters can be inserted into Emacs by using M-i. However, Emacs 23.2.1 in a Debian Squeeze variant inserts the \"tab\" character when

10条回答
  •  别那么骄傲
    2021-01-30 11:55

    C-x 8 RET, as described by @Daimrod above, is fine for a one-off insertion.

    If you want to bind a key to insert a given Unicode character: Load library ucs-cmds.el, then use C-1 C-x 8 RET. That inserts the character you choose and also creates a command with the same name, which you can bind to a key.

    For example, C-1 C-x 8 RET GREEK SMALL LETTER LAMBDA RET defines command greek-small-letter-lambda, which inserts that character when called.

    You can create multiple such commands at once, using macro ucsc-make-commands, also from ucs-cmds.el. For example, to create individual commands for each of the Greek letters, just do this:

      (ucsc-make-commands "^greek [a-z]+ letter")
    

    Then you can bind, say, command greek-small-letter-beta to C-c b or whatever:

      (global-set-key (kbd "C-c b") 'greek-small-letter-beta)
    

提交回复
热议问题