From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thomas Link Newsgroups: gmane.emacs.help Subject: Re: writing an own version of setq? Date: Wed, 09 Oct 2002 15:09:52 +0200 Organization: Vienna University, Austria Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3da42ab1$0$12906$3b214f66@news.univie.ac.at> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1034169426 13276 127.0.0.1 (9 Oct 2002 13:17:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2002 13:17:06 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17zGhz-0003Rj-00 for ; Wed, 09 Oct 2002 15:17:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17zGhA-0007jf-00; Wed, 09 Oct 2002 09:16:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newscore.univie.ac.at!aconews-feed.univie.ac.at!news.univie.ac.at!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910 X-Accept-Language: de, en, fr Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: merlini.StudZent.AKH-Wien.ac.at Original-X-Trace: 1034169009 news.univie.ac.at 12906 149.148.82.2 Original-X-Complaints-To: news-adm@news.univie.ac.at Original-Xref: shelby.stanford.edu gnu.emacs.help:105862 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2409 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2409 > 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.