Variable: buffer-stale-function

buffer-stale-function is a variable defined in files.el.gz.

Value

buffer-stale--default-function

Documentation

Function to check whether a buffer needs reverting.

This should be a function with one optional argument NOCONFIRM. Auto Revert Mode passes t for NOCONFIRM. The function should return non-nil if the buffer should be reverted. A return value of fast means that the need for reverting was not checked, but that reverting the buffer is fast. The buffer is current when this function is called.

The idea behind the NOCONFIRM argument is that it should be non-nil if the buffer is going to be reverted without asking the user. In such situations, one has to be careful with potentially time consuming operations.

For historical reasons, a value of nil means to use the default function. This should not be relied upon.

For more information on how this variable is used by Auto Revert mode, see Info node (elisp)Reverting.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defvar buffer-stale-function #'buffer-stale--default-function
  "Function to check whether a buffer needs reverting.
This should be a function with one optional argument NOCONFIRM.
Auto Revert Mode passes t for NOCONFIRM.  The function should return
non-nil if the buffer should be reverted.  A return value of
`fast' means that the need for reverting was not checked, but
that reverting the buffer is fast.  The buffer is current when
this function is called.

The idea behind the NOCONFIRM argument is that it should be
non-nil if the buffer is going to be reverted without asking the
user.  In such situations, one has to be careful with potentially
time consuming operations.

For historical reasons, a value of nil means to use the default function.
This should not be relied upon.

For more information on how this variable is used by Auto Revert mode,
see Info node `(elisp)Reverting'.")