[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

36.4 Saving Abbrevs in Files

A file of saved abbrev definitions is actually a file of Lisp code. The abbrevs are saved in the form of a Lisp program to define the same abbrev tables with the same contents. Therefore, you can load the file with load (voir la section How Programs Do Loading). However, the function quietly-read-abbrev-file is provided as a more convenient interface.

User-level facilities such as save-some-buffers can save abbrevs in a file automatically, under the control of variables described here.

User Option: abbrev-file-name

This is the default file name for reading and saving abbrevs.

Function: quietly-read-abbrev-file &optional filename

This function reads abbrev definitions from a file named filename, previously written with write-abbrev-file. If filename is omitted or nil, the file specified in abbrev-file-name is used. save-abbrevs is set to t so that changes will be saved.

This function does not display any messages. It returns nil.

User Option: save-abbrevs

A non-nil value for save-abbrevs means that Emacs should offer the user to save abbrevs when files are saved. If the value is silently, Emacs saves the abbrevs without asking the user. abbrev-file-name specifies the file to save the abbrevs in.

Variable: abbrevs-changed

This variable is set non-nil by defining or altering any abbrevs (except “system” abbrevs). This serves as a flag for various Emacs commands to offer to save your abbrevs.

Command: write-abbrev-file &optional filename

Save all abbrev definitions (except “system” abbrevs), for all abbrev tables listed in abbrev-table-name-list, in the file filename, in the form of a Lisp program that when loaded will define the same abbrevs. If filename is nil or omitted, abbrev-file-name is used. This function returns nil.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.