From xemacs-m  Tue Feb  4 11:30:59 1997
Received: from red.cegelec-red.fr (redgw.cegelec-red.fr [192.93.31.114])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA06492;
	Tue, 4 Feb 1997 11:30:57 -0600 (CST)
Received: from dtas0b.cegelec-red.fr (dtas0b.cegelec-red.fr [150.0.240.151]) by red.cegelec-red.fr (8.8.3/8.6.12) with SMTP id SAA09777; Tue, 4 Feb 1997 18:31:40 +0100 (MET)
Received: by dtas0b.cegelec-red.fr (4.1/SMI-4.1)
	id AA00572; Tue, 4 Feb 97 18:32:43 +0100
Date: Tue, 4 Feb 97 18:32:43 +0100
Message-Id: <9702041732.AA00572@dtas0b.cegelec-red.fr>
From: duthen@cegelec-red.fr (Jacques Duthen Prestataire)
To: muenkel@tnt.uni-hannover.de
Cc: jmiller@bay1.bayserve.net, xemacs-beta@xemacs.org, steve@altair.xemacs.org
In-Reply-To: <199702041026.LAA15185@daedalus.tnt.uni-hannover.de> (message
	from Heiko Muenkel on Tue, 4 Feb 1997 11:26:09 +0100)
Subject: Re: Updates to print menu under Options

> Date: Tue, 4 Feb 1997 11:26:09 +0100
> From: Heiko Muenkel <muenkel@tnt.uni-hannover.de>

>>>>> "Jeff" == Jeff Miller <jmiller@bay1.bayserve.net> writes:

    Jeff> Added to XEmacs 20.0 but probably the same for 19.15

    Jeff> Does anybody else think these are useful?  I'd like to see
    Jeff> an option to specify a printer.  I can always hard code
    Jeff> something in but something automagically built from a
    Jeff> printcap file or an alist type thing would really be nice.
    Jeff> That would be a bit more that my lisp abilities can handle
    Jeff> though.

heiko> I've already such a menu, which is build from an
heiko> alist. I've added the code at the end of this mail. Note:
heiko> This is a part of a file which I'm using to install a
heiko> menu with other usefull entries. Therefore I'm not sure,
heiko> if this part is working without the rest of the file. But
heiko> I'll send the whole file if there's any interest. I'm
heiko> also able to develope a patch, if Steven want's to
heiko> integrate it in the Options menu.

heiko> Any interest?

heiko> [code snipped]

Well.  I'm really sorry if you wasted your time!  The last
version of ps-print.el (should be 3.05 for XEmacs) now evaluates
dynamically the ps-lpr-switches.  This is a patch from Steven L
Baur <steve@miranova.com> from whom you can get it.  

So now you just need to do something like this:

(setq hm-current-ps-printer "schiller") ; default printer

(setq ps-lpr-switches '("-P " hm-current-ps-printer))

and only change the contents of `hm-current-ps-printer' from the
menu:

(defun hm-select-new-ps-printer (printer)
  "Selects and sets a new ps printer."
  (interactive (list (completing-read "Name of the printer: "
				      hm-ps-printer-alist
				      nil
				      nil
				      hm-current-ps-printer)))
  (setq hm-current-ps-printer printer))

Ok?							[jack]

