[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: An elisp question
From: |
Drew Adams |
Subject: |
RE: An elisp question |
Date: |
Tue, 16 Sep 2008 13:09:59 -0700 |
> I have a set of `setq' conditions that I wish to group into a
> function and put inside another function:
>
> (defun my-test ()
> (interactive)
> (if (equal (y-or-n-p "Yes or no? ") t)
> (setq ps-print-footer t
> ps-print-footer-frame nil
> ps-top-margin 18
> ps-bottom-margin 5
> ps-left-margin 9
> ps-right-margin 7
> ps-print-header nil
> ps-show-n-of-n nil
> ps-print-footer-frame nil
> ps-footer-lines 1
> ps-left-footer (quote ( ))
> ps-footer-offset 0
> )
> (message "hallo")))
>
> How can I group all those `setq' conditions into a function
> and put that function name in place of them in `my-test'
> definition?
(defun foo ()
(setq ps-print-footer t
ps-print-footer-frame nil
ps-top-margin 18
ps-bottom-margin 5
ps-left-margin 9
ps-right-margin 7
ps-print-header nil
ps-show-n-of-n nil
ps-print-footer-frame nil
ps-footer-lines 1
ps-left-footer (quote ( ))
ps-footer-offset 0))
(defun my-test ()
(interactive)
(if (equal (y-or-n-p "Yes or no? ") t)
(foo)
(message "hallo")))
Is this some kind of homework assignment? ;-)
- An elisp question, Rodolfo Medina, 2008/09/16
- RE: An elisp question,
Drew Adams <=
- Message not available
- Re: An elisp question, Joost Kremers, 2008/09/16
- RE: An elisp question, Drew Adams, 2008/09/16
- Message not available
- Re: An elisp question, Oleksandr Gavenko, 2008/09/17
- Re: An elisp question, Joost Kremers, 2008/09/17
- Re: An elisp question, Bastien, 2008/09/18
- Re: An elisp question, Nikolaj Schumacher, 2008/09/19
- Message not available
- Re: An elisp question, Oleksandr Gavenko, 2008/09/19