Variable: tar-subfile-mode-hook

tar-subfile-mode-hook is a customizable variable defined in tar-mode.el.gz.

Value

nil

Documentation

Hook run after entering or leaving tar-subfile-mode(var)/tar-subfile-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/tar-mode.el.gz
(define-minor-mode tar-subfile-mode
  "Minor mode for editing an element of a tar-file.

This mode arranges for \"saving\" this buffer to write the data
into the tar-file buffer that it came from.  The changes will
actually appear on disk when you save the tar-file's buffer."
  ;; Don't do this, because it is redundant and wastes mode line space.
  ;; :lighter " TarFile"
  :lighter nil
  (or (and (boundp 'tar-superior-buffer) tar-superior-buffer)
      (error "This buffer is not an element of a tar file"))
  (cond (tar-subfile-mode
	 (add-hook 'write-file-functions #'tar-subfile-save-buffer nil t)
	 ;; turn off auto-save.
	 (auto-save-mode -1)
	 (setq buffer-auto-save-file-name nil))
	(t
	 (remove-hook 'write-file-functions #'tar-subfile-save-buffer t))))