unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thomas Link <esendepe@yahoo.de>
Subject: Re: writing an own version of setq?
Date: Wed, 09 Oct 2002 15:09:52 +0200	[thread overview]
Message-ID: <3da42ab1$0$12906$3b214f66@news.univie.ac.at> (raw)
In-Reply-To: uofa3c34r.fsf@sdm.de

> OK, calls like (setq-save 'klaus (+ 1 2)) work fine but I'm not really
> satisfied because i want to write (setq-save klaus (+ 1 2)). Note the missing
> quote! How can i achieve this?

You could possibly replace ,option with (quote ,option) like in:

(defmacro setq-save (option value)
   "Sets OPTION to VALUE if and only if OPTION is not already saved by
  customize."
   `(and (not (custom-saved-p ,option))
	(set (quote ,option) ,value)))

(setq-save x 1)

Setting the variable with setq or defvar is ok for you?

Cheers,
Thomas.

  reply	other threads:[~2002-10-09 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-09 10:34 writing an own version of setq? Klaus Berndl
2002-10-09 13:09 ` Thomas Link [this message]
2002-10-09 13:48   ` Klaus Berndl
2002-10-09 14:20     ` Thomas Link
2002-10-09 14:44       ` Klaus Berndl
2002-10-10 11:53 ` Dave Pearson

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3da42ab1$0$12906$3b214f66@news.univie.ac.at' \
    --to=esendepe@yahoo.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).