From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Defaults for set-variable Date: Sat, 05 Nov 2005 11:44:19 +0200 Organization: JURTA Message-ID: <871x1vwhru.fsf@jurta.org> References: <87acgkzrcl.fsf@jurta.org> <858xw4616k.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131188431 21377 80.91.229.2 (5 Nov 2005 11:00:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Nov 2005 11:00:31 +0000 (UTC) Cc: miles@gnu.org, snogglethorpe@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 05 12:00:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EYLm1-0001Rk-7P for ged-emacs-devel@m.gmane.org; Sat, 05 Nov 2005 11:59:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYLm0-0006KA-MZ for ged-emacs-devel@m.gmane.org; Sat, 05 Nov 2005 05:59:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYLaR-0004ub-CQ for emacs-devel@gnu.org; Sat, 05 Nov 2005 05:47:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYLaO-0004tr-Rm for emacs-devel@gnu.org; Sat, 05 Nov 2005 05:47:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYLaO-0004tn-Oz for emacs-devel@gnu.org; Sat, 05 Nov 2005 05:47:48 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EYLaN-0002zn-FK; Sat, 05 Nov 2005 05:47:47 -0500 Original-Received: from mail.neti.ee (80-235-33-80-dsl.mus.estpak.ee [80.235.33.80]) by Relayhost1.neti.ee (Postfix) with ESMTP id 958511A85; Sat, 5 Nov 2005 12:47:59 +0200 (EET) Original-To: David Kastrup In-Reply-To: <858xw4616k.fsf@lola.goethe.zz> (David Kastrup's message of "Fri, 04 Nov 2005 13:35:15 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45442 Archived-At: > Customized variables make only sense where we are talking about a > state that is intended to be preserved across sessions. For example, > buffer-local variables would not make sense to put into customize. I completely agree with the Emacs Lisp manual where it says that programmers should nearly always use `defcustom' instead of `defvar' to define user options. Perhaps Customize should support cases you mentioned (buffer-local user options) with using a special tag in `defcustom', for the sake of marking such variable as user options (instead of the clumsy * in the documentation string), and possibly also providing a special user interface for changing them. In regard to `set-variable', the Emacs manual contains in the node (info "(emacs)Examining"): `C-h v VAR ' Display the value and documentation of variable VAR (`describe-variable'). `M-x set-variable VAR VALUE ' Change the value of variable VAR to VALUE. This clearly indicates that these commands are complementary: `describe-variable' displays the value of any variable, and `set-variable' changes its value. It unambiguously says that it changes a variable, not an user option. The current implementation contradicts the command name `set-variable' and its documentation. I see only one way to avoid this inconsistency - to have two commands: `set-variable' for setting variables, and `set-user-option' for setting user options. -- Juri Linkov http://www.jurta.org/emacs/