Agreed. I was calling
ps-print-buffer-with-faces() interactively, and naively expecting somehow to
have the hook called interactively. Kevin Rodgers pointed out that a piece
of advised code, here would be the correct way to implement this.
Thanks, Jeff
----- Original Message -----
Sent: Monday, September 16, 2002 3:20
PM
Subject: Re: [h-e-w] Adding to
ps-print-hook problems
On Monday, September 16, "Jeff Rancier" <address@hidden>
wrote: >Hi all. I wanted to create a simple function to prompt me
for the n-up >number of pages to print when I run the
function, >ps-print-buffer-with-faces. Here's what I came up
with:
>(defun jbr-ps-print-n-up-hook (number-of-pages) >
(interactive "nN-up number of pages: ") > (setq ps-n-up-printing
number-of-pages))
>(add-hook 'ps-print-hook
'jbr-ps-print-n-up-hook)
I think the problem is that you are _not_
invoking it interactively, so the interaction does not work right. I'd
suggest dropping the call to "interactive", using the "message" function
for the prompt, and explicitly reading input. You could also write
your own function to substitute for (whichever) ps-print and it could
be interactive.
Regard, David
V.
|