Книга: Learning GNU Emacs, 3rd Edition

3.4.2.3 Deleting a word abbreviation

3.4.2.3 Deleting a word abbreviation

If you use word abbreviations frequently, you may define an abbreviation and later change your mind. You can edit the word abbreviation list by typing M-x edit-abbrevs Enter. You can see (but not edit) the list by typing M-x list-abbrevs Enter.

After the list is displayed, use C-k (or any other editing commands) to delete the abbreviations you don't want to use. Because Emacs itself formats this list, don't try to edit lines or add new lines; deleting is about the only operation that's safe. Here's how the abbreviations look when you edit word abbreviations. The file is divided into different sections based on whether the abbreviations are global or local to a particular mode:

(text-mode-abbrev-table)
(lisp-mode-abbrev-table)
(fundamental-mode-abbrev-table)
(global-abbrev-table)
"iwthout" 1        "without"
"prhase"  1        "phrase"
"teh"     1        "the"
"fo"      1        "of"
"eamcs"   2        "Emacs"
"wrok"    1        "work"
"aslo"    1        "also"
"sotred"  1        "stored"
"inforamtion" 1    "information"
"esc"     6        "Esc"
"taht"    1        "that"
"chatper" 1        "chapter"
"adn"     1        "and"
"iwth"    1        "with"
"chpater" 1        "chapter"
"loaction" 1       "location"
"recieve" 1        "receive"
"wart"    1        "World Association for Replicant Technology"

The file is divided into sections by mode. We defined global abbreviations in this case; any abbreviations Flyspell (described earlier in this chapter) creates are local abbreviations and would be listed under the mode in which they were defined.

In this buffer, the first column lists the abbreviations (in this case, mostly misspellings). The second column is for internal record keeping; you don't need to concern yourself with it. The third column provides the definitions of the abbreviations, the word or phrase that Emacs substitutes whenever it sees the abbreviation.

To delete any abbreviation, delete the line for that abbreviation and save the file by typing M-x write-abbrev-file. You can move back to the buffer you were editing before by typing C-x b (a command for working with multiple buffers, discussed in Chapter 4).

Оглавление книги


Генерация: 1.754. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз