Function: dired-do-print

dired-do-print is an autoloaded, interactive and byte-compiled function defined in dired-aux.el.gz.

Signature

(dired-do-print &optional ARG)

Documentation

Print the marked (or next ARG) files.

Uses the shell command coming from variables lpr-command and lpr-switches as default.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-do-print (&optional arg)
  "Print the marked (or next ARG) files.
Uses the shell command coming from variables `lpr-command' and
`lpr-switches' as default."
  (interactive "P" dired-mode)
  (require 'lpr)
  (let* ((file-list (dired-get-marked-files t arg nil nil t))
	 (lpr-switches
	  (if (and (stringp printer-name)
		   (string< "" printer-name))
	      (cons (concat lpr-printer-switch printer-name)
		    lpr-switches)
	    lpr-switches))
	 (command (dired-mark-read-string
		   "Print %s with: "
                   (mapconcat #'identity
			      (cons lpr-command
				    (if (stringp lpr-switches)
					(list lpr-switches)
				      lpr-switches))
			      " ")
		   'print arg file-list)))
    (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))
  (dired-post-do-command))