Mercurial > hg > xemacs-beta
diff lisp/packages/lpr.el @ 6:27bc7f280385 r19-15b4
Import from CVS: tag r19-15b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:47:15 +0200 |
parents | ac2d302a0011 |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/lisp/packages/lpr.el Mon Aug 13 08:46:57 2007 +0200 +++ b/lisp/packages/lpr.el Mon Aug 13 08:47:15 2007 +0200 @@ -95,6 +95,9 @@ (interactive "r") (print-region-1 start end lpr-switches t)) +;; XEmacs change +(require 'message) ; Until We can get some sensible autoloads, or + ; message-flatten-list gets put somewhere decent. (defun print-region-1 (start end switches page-headers) ;; On some MIPS system, having a space in the job name ;; crashes the printer demon. But using dashes looks ugly @@ -106,6 +109,7 @@ (binary-process-input buffer-file-type) (binary-process-output buffer-file-type) (width tab-width) + nswitches switch-string) (save-excursion (if page-headers @@ -116,9 +120,18 @@ (list lpr-headers-switches) lpr-headers-switches) switches)))) + (setq nswitches (message-flatten-list ; XEmacs + (mapcar '(lambda (arg) ; Dynamic evaluation + (cond ((stringp arg) arg) + ((functionp arg) (apply arg nil)) + ((symbolp arg) (eval arg)) + ((consp arg) (apply (car arg) + (cdr arg))) + (t nil))) + switches))) (setq switch-string - (if switches (concat " with options " - (mapconcat 'identity switches " ")) + (if nswitches (concat " with options " + (mapconcat 'identity nswitches " ")) "")) (message "Spooling%s..." switch-string) (if (/= tab-width 8) @@ -150,7 +163,7 @@ ;; These belong in pr if we are using that. (and lpr-add-switches lpr-headers-switches (list "-T" title)) - switches))) + nswitches))) (if (markerp end) (set-marker end nil)) (message "Spooling%s...done" switch-string))))