Function: html-autoview-mode
html-autoview-mode is an interactive and byte-compiled function
defined in sgml-mode.el.gz.
Signature
(html-autoview-mode &optional ARG)
Documentation
Toggle viewing of HTML files on save (HTML Autoview mode).
HTML Autoview mode is a buffer-local minor mode for use with
html-mode. If enabled, saving the file automatically runs
browse-url-of-buffer to view it.
This is a minor mode. If called interactively, toggle the
Html-Autoview mode mode. If the prefix argument is positive, enable
the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable html-autoview-mode(var)/html-autoview-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(define-minor-mode html-autoview-mode
"Toggle viewing of HTML files on save (HTML Autoview mode).
HTML Autoview mode is a buffer-local minor mode for use with
`html-mode'. If enabled, saving the file automatically runs
`browse-url-of-buffer' to view it."
:lighter nil
(if html-autoview-mode
(add-hook 'after-save-hook #'browse-url-of-buffer nil t)
(remove-hook 'after-save-hook #'browse-url-of-buffer t)))