[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defcustom write-file-functions and write-contents-functions?
From: |
Luc Teirlinck |
Subject: |
Re: Defcustom write-file-functions and write-contents-functions? |
Date: |
Tue, 6 Jan 2004 21:03:54 -0600 (CST) |
Avtually, in my previous files.texi diff, I forgot to make a relevant
change: make the defvar's for `before-save-hook' and `after-save-hook'
into defopt's:
===File ~/files.texi-newdiff================================
*** files.texi.~1.60.~ Mon Jan 5 12:46:02 2004
--- files.texi Tue Jan 6 20:50:23 2004
***************
*** 404,428 ****
This works just like @code{write-file-functions}, but it is intended for
hooks that pertain to the contents of the file, as opposed to hooks that
pertain to where the file came from. Such hooks are usually set up by
! major modes, as buffer-local bindings for this variable.
This variable automatically becomes buffer-local whenever it is set;
! switching to a new major mode always resets this variable.
@end defvar
! @defvar before-save-hook
! This normal hook runs before a buffer has been saved in its visited
! file. One use of this hook is for the Copyright package; it uses this
! hook to make sure the file has the current year in the copyright
! header.
! @end defvar
@c Emacs 19 feature
! @defvar after-save-hook
This normal hook runs after a buffer has been saved in its visited file.
One use of this hook is in Fast Lock mode; it uses this hook to save the
highlighting information in a cache file.
! @end defvar
@defvar file-precious-flag
If this variable is address@hidden, then @code{save-buffer} protects
--- 404,432 ----
This works just like @code{write-file-functions}, but it is intended for
hooks that pertain to the contents of the file, as opposed to hooks that
pertain to where the file came from. Such hooks are usually set up by
! major modes, as buffer-local bindings for this variable. If any of the
! functions in this hook returns address@hidden, @code{write-file-functions}
! is not run.
This variable automatically becomes buffer-local whenever it is set;
! switching to a new major mode always resets this variable, but
! calling @code{set-visited-file-name} does not.
@end defvar
! @defopt before-save-hook
! This normal hook runs before a buffer is saved in its visited file,
! regardless of whether that is done normally or by one of the hooks
! described above. One use of this hook is for the Copyright package;
! it uses this hook to make sure the file has the current year in the
! copyright header.
! @end defopt
@c Emacs 19 feature
! @defopt after-save-hook
This normal hook runs after a buffer has been saved in its visited file.
One use of this hook is in Fast Lock mode; it uses this hook to save the
highlighting information in a cache file.
! @end defopt
@defvar file-precious-flag
If this variable is address@hidden, then @code{save-buffer} protects
============================================================