Function: sgml-validate

sgml-validate is an interactive and byte-compiled function defined in sgml-mode.el.gz.

Signature

(sgml-validate COMMAND)

Documentation

Validate an SGML document.

Runs COMMAND, a shell command, in a separate process asynchronously with output going to the buffer *compilation*. You can then use the command C-x ` (next-error) to find the next error message and move to the line in the SGML document that caused it.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(defun sgml-validate (command)
  "Validate an SGML document.
Runs COMMAND, a shell command, in a separate process asynchronously
with output going to the buffer `*compilation*'.
You can then use the command \\[next-error] to find the next error message
and move to the line in the SGML document that caused it."
  (interactive
   (list (read-shell-command "Validate command: "
                             (or sgml-saved-validate-command
                                 sgml-validate-command
                                 (concat sgml-validate-command
                                         " "
                                         (when-let* ((name (buffer-file-name)))
                                           (shell-quote-argument
                                            (file-name-nondirectory name))))))))
  (setq sgml-saved-validate-command command)
  (save-some-buffers (not compilation-ask-about-save) nil)
  (compilation-start command))