Appendix C. Emacs Variables

In this appendix, we list several Emacs variables. We chose these for their general usefulness and for their applicability to subjects in chapters preceding Chapter 11, in which we introduced variables.

The variables below are grouped by category, and their default values are shown (where practical to do so). For more details on specific variables, see the chapters referred to at the beginning of each table. For information on variables used in programming language modes, see Chapter 12.

Table C-1. Backups, Auto-Save, and Versioning (Chapter 2 and Chapter 15)

Variable

Default

Description

make-backup-files

t

If t, create a backup version of the current file before saving it for the first time.

backup-by-copying

nil

If t, create backup files by copying rather than renaming the file being saved to a backup version. The default is renaming, which is more efficient. Copying is slightly safer; for example, a disk crash during a copy shouldn’t hurt you, whereas a very badly timed crash during a mv may destroy your backup file. [a]

version-control

nil

If t, create numbered versions of files as backups (with names of the form filename~N~). If nil, only do this for files that have numbered versions already. If ‘never (note the leading single quote), never make numbered versions.

kept-new-versions

2

Number of latest versions of a file to keep when a new numbered backup is made.

kept-old-versions

2

Number of oldest versions ...

Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.