From xemacs-m  Fri Aug 29 17:54:43 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA01752
	for <xemacs-beta@xemacs.org>; Fri, 29 Aug 1997 17:54:42 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.7/8.8.7) id PAA28894;
	Fri, 29 Aug 1997 15:59:41 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: lpr.el is hosed
References: <199708292231.SAA04132@cs.sunysb.edu>
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: kifer@CS.SunySB.EDU's message of "Fri, 29 Aug 1997 18:31:32 -0400"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 29 Aug 1997 15:59:40 -0700
Message-ID: <m2pvqw389v.fsf@altair.xemacs.org>
Lines: 56
X-Mailer: Gnus v5.4.65/XEmacs 20.3(beta19) - "Kiev"

Michael Kifer <kifer@CS.SunySB.EDU> writes:

> lpr.el requires message.el, but this is not found anywhere. It used to be
> in lisp/gnus before.

Somebody please check this, I don't currently have means to test this.

1997-08-29  SL Baur  <steve@altair.xemacs.org>

	* packages/lpr.el: Clone message-flatten-list.

Index: lisp/packages/lpr.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/packages/lpr.el,v
retrieving revision 1.2
diff -u -r1.2 lpr.el
--- lpr.el	1997/04/19 23:21:10	1.2
+++ lpr.el	1997/08/29 22:54:01
@@ -115,8 +115,27 @@
   (print-region-1 start end lpr-switches t))
 
 ;; XEmacs change
-(require 'message)	; Until We can get some sensible autoloads, or
+;; (require 'message)	; Until We can get some sensible autoloads, or
 			; message-flatten-list gets put somewhere decent.
+;; Sigh ...
+;; `ps-flatten-list' is defined here (copied from "message.el" and
+;; enhanced to handle dotted pairs as well) until we can get some
+;; sensible autoloads, or `flatten-list' gets put somewhere decent.
+
+;; (ps-flatten-list '((a . b) c (d . e) (f g h) i . j))
+;; => (a b c d e f g h i j)
+
+(defun lpr-flatten-list (&rest list)
+  (lpr-flatten-list-1 list))
+
+(defun lpr-flatten-list-1 (list)
+  (cond
+    ((null list) (list))
+    ((consp list)
+     (append (lpr-flatten-list-1 (car list))
+	     (lpr-flatten-list-1 (cdr list))))
+    (t (list list))))
+
 (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
@@ -139,7 +158,7 @@
 					 (list lpr-headers-switches)
 				        lpr-headers-switches)
 				     switches))))
-      (setq nswitches (message-flatten-list    ; XEmacs
+      (setq nswitches (lpr-flatten-list    ; XEmacs
 		       (mapcar '(lambda (arg)  ; Dynamic evaluation
 				  (cond ((stringp arg) arg)
 					((functionp arg) (apply arg nil))

