dired-do-print handles printer-name
authorRichard M. Stallman <rms@gnu.org>
Thu, 2 Jan 2014 22:35:00 +0000 (17:35 -0500)
committerRichard M. Stallman <rms@gnu.org>
Thu, 2 Jan 2014 22:35:00 +0000 (17:35 -0500)
* dired-aux.el (dired-do-print): Handle printer-name.

lisp/ChangeLog
lisp/dired-aux.el

index bea33b8..7ec7fc1 100644 (file)
@@ -1,5 +1,7 @@
 2014-01-02  Richard Stallman  <rms@gnu.org>
 
+       * dired-aux.el (dired-do-print): Handle printer-name.
+
        * mail/rmailmm.el (rmail-mime-message-p): Moved to rmail.el.
        * mail/rmail.el (rmail-mime-message-p): Moved from rmailmm.el.
        (rmail-epa-decrypt): Turn off mime processing.
index 6ed7d9e..8f1a4be 100644 (file)
@@ -415,6 +415,12 @@ Uses the shell command coming from variables `lpr-command' and
 `lpr-switches' as default."
   (interactive "P")
   (let* ((file-list (dired-get-marked-files t arg))
+        (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