From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: custom-set-variables considered harmful Date: Mon, 06 Nov 2017 08:36:09 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509986311 27951 195.159.176.226 (6 Nov 2017 16:38:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Nov 2017 16:38:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Stefan Monnier , Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 06 17:38:26 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBkPp-0006yu-Fx for ged-emacs-devel@m.gmane.org; Mon, 06 Nov 2017 17:38:25 +0100 Original-Received: from localhost ([::1]:49096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBkPv-0005Ou-BO for ged-emacs-devel@m.gmane.org; Mon, 06 Nov 2017 11:38:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBkNq-0004Wc-9m for emacs-devel@gnu.org; Mon, 06 Nov 2017 11:36:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBkNn-0001g6-2u for emacs-devel@gnu.org; Mon, 06 Nov 2017 11:36:22 -0500 Original-Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:48373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBkNm-0001fG-U4 for emacs-devel@gnu.org; Mon, 06 Nov 2017 11:36:19 -0500 Original-Received: by mail-it0-x234.google.com with SMTP id c3so6043741itc.3 for ; Mon, 06 Nov 2017 08:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=re9UiW43iASJG5PlOMcBfj+g5ItRU83+UJM8mu7d5wg=; b=Bu5LfzPWyeo1E/oBv9/LHY8W8lUW8RfTtoVW2TIItKHGJqSjL+CNeA9LWHGRO1ybYz Fyffq6v32C4lbLi16lXzzys0xCMNCjdyrifiGG3RdtOdpUfs4af4RTEvIsfteMd86jxo IHn+JHlWbF2XkZW2fwhh9jGKKXUwMOgpBsd8RjIYQZIkyNq7gx74YGfUuCrHbMWiCo6L lJEmTYpSibqvPLLZB/zS2lKosBg3ZHNneHo3+/HO2AIlHuJ1GOkYgd/r2qndfdRzpvDQ K6ldM4Nx3jLYEkuX0cPVnBc5X5LEkz0/ftIbwBSt2WMdW4nZoz8hoOCD43vSH6HwhrJB KPMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=re9UiW43iASJG5PlOMcBfj+g5ItRU83+UJM8mu7d5wg=; b=niutOjne/a0pExpp/IZM0AwLRODRJd0IS5bwyRwpyKP+8QWl71psvL9EiS1QzZzOfe qDlysqF/xOc+VQ703ksxhj44suvuWwrbJJqfb31EkW9Z2KOYwli+rTb1F0kI4sANElCl IzJV8lMGI2Hqu6eQ48wUB7W6NGj/q6HIN3tEVwQdetOoc/wcn3EXxFlJeTF9sIv7D0My U8EMHYIt7t5vDamZ0efuQrklQ7P6xINMDZ63OjKRWSuYoUJATg16BHKIS46eWbPguA6x vUNjDkJVaj+eEYW5ep4oKyBi8Gl2z8K18pRqf5RsqKtMlmcyvlXj/CE7x8amAUWBLywZ uefA== X-Gm-Message-State: AJaThX4e6n/WilHzTRlhjBRkR8GNQWT/qBVI2z8YpbRBJ9MD5HmynKvG EyyI1I7cz2Dkl58wdlw27D4DWQOukVA= X-Google-Smtp-Source: ABhQp+TcCLDDVt+/9EeayvJq/vohpUyAC2kJsUmFfAJ5Y0ax8cI0s5KQGPzRSwrmvhmZ2en6ci+IuA== X-Received: by 10.36.178.85 with SMTP id h21mr10914769iti.118.1509986176876; Mon, 06 Nov 2017 08:36:16 -0800 (PST) Original-Received: from raman-glaptop2 ([107.84.156.214]) by smtp.gmail.com with ESMTPSA id o71sm4556201itc.30.2017.11.06.08.36.14 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 06 Nov 2017 08:36:15 -0800 (PST) In-Reply-To: (Philippe Vaucher's message of "Mon, 6 Nov 2017 10:02:29 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219952 Archived-At: Here i a useful defmacro that helps with setting things that are customized via custom without having to think about it: (defmacro c-setq (variable value) "Exactly like setq, but handles custom." `(funcall (or (get ',variable 'custom-set) 'set-default) ',variable ,value)) --