Mercurial > emacs
comparison lispref/files.texi @ 53505:780b9eb8b58e
hooks.texi (Standard Hooks): Add before-save-hook.
files.texi (Saving Buffers): Likewise.
author | Simon Josefsson <jas@extundo.com> |
---|---|
date | Mon, 05 Jan 2004 18:20:27 +0000 |
parents | bd30a9882e31 |
children | 5bd5de5e98c2 |
comparison
equal
deleted
inserted
replaced
53504:f657faa17ea1 | 53505:780b9eb8b58e |
---|---|
1 @c -*-texinfo-*- | 1 @c -*-texinfo-*- |
2 @c This is part of the GNU Emacs Lisp Reference Manual. | 2 @c This is part of the GNU Emacs Lisp Reference Manual. |
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 | 3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004 |
4 @c Free Software Foundation, Inc. | 4 @c Free Software Foundation, Inc. |
5 @c See the file elisp.texi for copying conditions. | 5 @c See the file elisp.texi for copying conditions. |
6 @setfilename ../info/files | 6 @setfilename ../info/files |
7 @node Files, Backups and Auto-Saving, Documentation, Top | 7 @node Files, Backups and Auto-Saving, Documentation, Top |
8 @comment node-name, next, previous, up | 8 @comment node-name, next, previous, up |
406 pertain to where the file came from. Such hooks are usually set up by | 406 pertain to where the file came from. Such hooks are usually set up by |
407 major modes, as buffer-local bindings for this variable. | 407 major modes, as buffer-local bindings for this variable. |
408 | 408 |
409 This variable automatically becomes buffer-local whenever it is set; | 409 This variable automatically becomes buffer-local whenever it is set; |
410 switching to a new major mode always resets this variable. | 410 switching to a new major mode always resets this variable. |
411 @end defvar | |
412 | |
413 @defvar before-save-hook | |
414 This normal hook runs before a buffer has been saved in its visited | |
415 file. One use of this hook is for the Copyright package; it uses this | |
416 hook to make sure the file has the current year in the copyright | |
417 header. | |
411 @end defvar | 418 @end defvar |
412 | 419 |
413 @c Emacs 19 feature | 420 @c Emacs 19 feature |
414 @defvar after-save-hook | 421 @defvar after-save-hook |
415 This normal hook runs after a buffer has been saved in its visited file. | 422 This normal hook runs after a buffer has been saved in its visited file. |