Function: info-xref-with-output

info-xref-with-output is a macro defined in info-xref.el.gz.

Signature

(info-xref-with-output &rest BODY)

Documentation

Run BODY with an info-xref output buffer.

This is meant to nest, so you can wrap it around a set of different info-xref checks and have them write to the one output buffer created by the outermost info-xref-with-output, with an overall good/bad count summary inserted at the very end.

Source Code

;; Defined in /usr/src/emacs/lisp/info-xref.el.gz
(defmacro info-xref-with-output (&rest body)
  "Run BODY with an info-xref output buffer.
This is meant to nest, so you can wrap it around a set of
different info-xref checks and have them write to the one output
buffer created by the outermost `info-xref-with-output', with an
overall good/bad count summary inserted at the very end."

  (declare (debug t))
  `(save-excursion
     (unless info-xref-in-progress
       (display-buffer (get-buffer-create info-xref-output-buffer))
       (set-buffer info-xref-output-buffer)
       (setq buffer-read-only nil)
       (fundamental-mode)
       (erase-buffer)
       (insert ";; info-xref output -*- mode: compilation -*-\n\n")
       (compilation-mode)
       (setq info-xref-good    0
             info-xref-bad     0
             info-xref-unavail 0
             info-xref-xfile-alist nil))

     (let ((info-xref-in-progress t)
           (info-xref-output-heading ""))
       ,@body)

     (unless info-xref-in-progress
       (info-xref-output "done, %d good, %d bad, %d unavailable"
                         info-xref-good info-xref-bad info-xref-unavail))))