-->
Previous | Table of Contents | Next |
You can customize your version of emacs by placing custom functions within a file called .emacs. This file must reside in your home directory. This file contains functions written in emacs LISP, with which you can personalize emacs to your liking. An example LISP function follows:
(keyboard-translate ?\C-h ?\C-?)
This function is helpful if your terminal translates the <Backspace> key into the <Ctrl-h> characters. These characters are, by default, the sequence used to summon help from within emacs. By specifying a new function and binding this function to a key, you can customize how emacs responds to these key sequences.
In the preceding example, ?\C-h represents the <Ctrl-h> keypress. ?\C-? represents the <Delete> key. On nearly all ASCII keyboards, both keys represent the same ASCII value, namely 8. After you enter this function line into your .emacs file and save it, the next time you invoke emacs, youll be able to delete characters by using the <Backspace> key.
Of course, this also means youll no longer have access to help from the keyboard. To alleviate this problem, you can bind the help function to a new key sequence, just as you did with the delete function. Simply place the following line into your .emacs file, specifying your chosen key for key:
(keyboard-translate ?\C-key ?\C-h)
You can find more information on another editor and about Linuxs files system in the following chapters:
Previous | Table of Contents | Next |