Appendix A. Emacs Variables

This appendix lists some Emacs variables. We chose them for their general usefulness and for their applicability to subjects in this book.

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 9.

Table A-1. Backups, auto-save, and versioning (Chapter 2, Chapter 12)

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 can yield different results, especially when you're editing files owned by another user, and in operating systems that allow "hard links" to files (alternate names that are associated with the physical file). There are a raft of variables that can tweak this behavior based on context; check the online help for make-backup-files for the details.

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 ...

Get Learning GNU Emacs, 3rd 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.