Function: print-buffer

print-buffer is an autoloaded, interactive and byte-compiled function defined in lpr.el.gz.

Signature

(print-buffer)

Documentation

Paginate and print buffer contents.

The variable lpr-headers-switches controls how to paginate. If it is nil (the default), we run the pr program (or whatever program lpr-page-header-program specifies) to paginate. lpr-page-header-switches specifies the switches for that program.

Otherwise, the switches in lpr-headers-switches are used in the print command itself; we expect them to request pagination.

See the variables lpr-switches and lpr-command for further customization of the printer command.

View in manual

Probably introduced at or before Emacs version 18.52.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/lpr.el.gz
;;;###autoload
(defun print-buffer ()
  "Paginate and print buffer contents.

The variable `lpr-headers-switches' controls how to paginate.
If it is nil (the default), we run the `pr' program (or whatever program
`lpr-page-header-program' specifies) to paginate.
`lpr-page-header-switches' specifies the switches for that program.

Otherwise, the switches in `lpr-headers-switches' are used
in the print command itself; we expect them to request pagination.

See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command."
  (interactive
   (unless (y-or-n-p "Send current buffer to default printer? ")
     (error "Canceled")))
  (print-region-1 (point-min) (point-max) lpr-switches t))