From: Eric Hanchrow <offby1@blarg.net>
Subject: Re: What's wrong with this lisp code in my init file?!
Date: Sun, 31 Dec 2006 10:48:48 -0800 [thread overview]
Message-ID: <87vejrx5nz.fsf@offby1.atm01.sea.blarg.net> (raw)
In-Reply-To: 1167581737.951769.216970@k21g2000cwa.googlegroups.com
Try this instead:
(setq printer-name "//BREATH-000/Randy's HP 1200")
(setq ps-printer-name t)
;; must set printer name before issuing print command!
(setq ps-lpr-command
(if (eq window-system 'w32)
"c:/Program Files/Ghostgum/gsview/gsprint.exe"
"/cygdrive/c/Program Files/Ghostgum/gsview/gsprint.exe"))
If that works, as I expect it will, your problem was that you've got
two clauses in your second "if" statement. Clearly you're expecting
them to both get evaluated when window-system is nil. But because of
the way "if" works, only the first gets evaluated; the second gets
evaluated only when window-system is _not_ nil.
If you had used Emacs' lisp indentation on your code, you might have
noticed this yourself, since it will show the two clauses indented
different amounts.
--
ハ ハ
ミ^・^ミ
`~~~´
next prev parent reply other threads:[~2006-12-31 18:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-31 16:15 What's wrong with this lisp code in my init file?! Endless Story
2006-12-31 18:48 ` Eric Hanchrow [this message]
[not found] ` <mailman.2592.1167591202.2155.help-gnu-emacs@gnu.org>
2006-12-31 19:57 ` Endless Story
2006-12-31 21:51 ` Eric Hanchrow
2006-12-31 22:29 ` Drew Adams
[not found] ` <mailman.2595.1167601997.2155.help-gnu-emacs@gnu.org>
2006-12-31 22:16 ` Harald Hanche-Olsen
2006-12-31 22:50 ` Drew Adams
[not found] ` <mailman.2599.1167605423.2155.help-gnu-emacs@gnu.org>
2007-01-01 1:48 ` Endless Story
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vejrx5nz.fsf@offby1.atm01.sea.blarg.net \
--to=offby1@blarg.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.