### Switch to another version control backend (C-x v b) Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Use C-x v b to cycle through all backends the current file is registered under. With a prefix argument, it prompts for the backend to use in the minibuffer. ```emacs-lisp C-x v b ``` -------------------------------- ### Lisp comment indentation example Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Shows Emacs Lisp comment indentation conventions: comments starting with two semicolons are indented as code, while three semicolons start at the left margin. The example includes a function definition with mixed comment styles. ```lisp ;; This function is just an example ;;; Here either two or three semicolons are appropriate. (defun foo (x) ;;; And now, the first part of the function: ;; The following line adds one. (1+ x)) ; This line adds one. ``` -------------------------------- ### Inserted header text example Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Example of the text inserted when the default vc-static-header-alist matches a buffer name. Note that the text starts with a blank line. ```c #ifndef lint static char vcid[] = "string"; #endif /* lint */ ``` -------------------------------- ### Example first line with Lisp mode and variables Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Example of a first line specifying Lisp mode and setting fill-column and comment-column to numeric values. ```lisp ;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*- ``` -------------------------------- ### Custom daylight savings start on October 1 Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Lisp expression to set `calendar-daylight-savings-starts` to October 1 of the year, as an example of a custom rule. ```lisp (list 10 1 year) ``` -------------------------------- ### Example log entries before grouping Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Shows three log entries for different files that are checked in by the same author at nearly the same time and have the same text for two of them. ```plaintext * For `vc.texinfo': `Fix expansion typos.' * For `vc.el': `Don't call expand-file-name.' * For `vc-hooks.el': `Don't call expand-file-name.' ``` -------------------------------- ### Local variables list example Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Example of a local variables list with prefix ';;; ' and suffix '***'. The mode variable should be first, and values are used literally. ```lisp ;;; Local Variables: *** ;;; mode:lisp *** ;;; comment-column:0 *** ;;; comment-start: ";;; " *** ;;; comment-end:"***" *** ;;; End: *** ``` -------------------------------- ### To field with continuation line Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Example of a To header field with a continuation line, showing multiple addresses separated by commas and a continuation line starting with whitespace. ```text To: foo@here.net, this@there.net, me@gnu.cambridge.mass.usa.earth.spiral3281 ``` -------------------------------- ### Enable Desktop in .emacs Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Add these lines at the end of your .emacs file to enable the Desktop library. This is an alternative to setting desktop-enable via the Customization buffer. ```emacs-lisp (desktop-load-default) (desktop-read) ``` -------------------------------- ### Example log entries with clumping labels Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Shows log entries that start with a label of the form '{clumpname} ' to be clumped together without an intervening blank line. ```plaintext * For `vc.texinfo': `{expand} Fix expansion typos.' * For `vc.el': `{expand} Don't call expand-file-name.' * For `vc-hooks.el': `{expand} Don't call expand-file-name.' ``` -------------------------------- ### Specify font with -fn command-line option Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Use this command to start Emacs with a specific font, using a wildcard pattern for the font name. The example specifies the font with nickname '6x13'. ```shell emacs -fn "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" & ``` -------------------------------- ### X server font installation commands Source: https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_mono/emacs.html Commands to inform the X server about newly installed fonts. Run these after installing fonts to make them available. ```shell xset fp+ /usr/local/share/emacs/fonts xset fp rehash ```