From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: defvar interactively, user-variable-p Date: Sun, 18 Oct 2015 08:35:15 -0700 (PDT) Message-ID: <07bd8d82-eae6-47a1-a60f-37b490c6d58d@default> References: <8737x8o6c5.fsf@mat.ucm.es> <87y4f08kd9.fsf@web.de> <87wpukjp8r.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445182554 18781 80.91.229.3 (18 Oct 2015 15:35:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 15:35:54 +0000 (UTC) To: Uwe Brauer , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 17:35:39 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Znpzl-000222-69 for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 17:35:37 +0200 Original-Received: from localhost ([::1]:34310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znpzk-0003XS-6X for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 11:35:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnpzW-0003XI-Lt for emacs-devel@gnu.org; Sun, 18 Oct 2015 11:35:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnpzR-00038U-Ky for emacs-devel@gnu.org; Sun, 18 Oct 2015 11:35:22 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:48336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnpzR-00038Q-E3 for emacs-devel@gnu.org; Sun, 18 Oct 2015 11:35:17 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t9IFZFtb022357 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 18 Oct 2015 15:35:16 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t9IFZFjm001080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 18 Oct 2015 15:35:15 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t9IFZFCr028049; Sun, 18 Oct 2015 15:35:15 GMT In-Reply-To: <87wpukjp8r.fsf@mat.ucm.es> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191958 Archived-At: > BTW pitty that this functionality is gone. Anyhow Note, though, that you have commands `customize-set-variable' and `customize-set-value', each of which does a part of what `set-variable' does (a prefix arg to `set-variable' gives the buffer-local behavior) - and more. Those commands have the advantage that they not only type-check your input (respecting the defcustom `:type') but they also respect other defcustom keywords, such as `:set'. `set-variable' respects `:type', but unfortunately not `:set': http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6578 http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00867.html http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00839.html My impression is that too few users are aware of `customize-set-variable' and `customize-set-value'. If the (complete) behaviors of those commands were rolled into the single command `set-variable' then users might take more advantage of them. And users who today still use `setq' in their init files to set user options might then take to using that instead, reducing problems due to ignoring `:type', `:set', and `:initialize'. I would also like to see defvar allow keywords `:type' and `:set'. That is, let you optionally specify the types of allowable values and specify a setter function. http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00668.html Not only are defvar variables sometimes set by users, but they can be set by other libraries. Letting the defining library control the allowable types would be a definite benefit, IMO. Use of such keywords would be optional, of course.