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: Documentation not clear for the Lisp function set-variable Date: Mon, 27 Jun 2005 02:23:38 +0300 Organization: JURTA Message-ID: <87slz6nr3h.fsf@jurta.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119831921 26921 80.91.229.2 (27 Jun 2005 00:25:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2005 00:25:21 +0000 (UTC) Cc: yonirabkin@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 02:25:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DmhQn-0002QG-Qk for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2005 02:24:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmhYK-0008B8-Ii for ged-emacs-devel@m.gmane.org; Sun, 26 Jun 2005 20:32:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DmhS7-0003he-Em for emacs-devel@gnu.org; Sun, 26 Jun 2005 20:26:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DmhRx-0003bQ-FZ for emacs-devel@gnu.org; Sun, 26 Jun 2005 20:26:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DmhRw-0003WH-88 for emacs-devel@gnu.org; Sun, 26 Jun 2005 20:26:08 -0400 Original-Received: from [194.126.101.116] (helo=HOT-Bounce1.hot.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DmhFW-0005A2-Iq; Sun, 26 Jun 2005 20:13:18 -0400 Original-Received: from mail.neti.ee (Relay8 [192.168.1.27]) by HOT-Bounce1.hot.ee (Postfix) with ESMTP id 1D6401490DD; Mon, 27 Jun 2005 02:55:50 +0300 (EEST) Original-Received: from mail.neti.ee (80-235-42-72-dsl.mus.estpak.ee [80.235.42.72]) by Relayhost1.neti.ee (Postfix) with ESMTP id 1F8222737; Mon, 27 Jun 2005 03:08:33 +0300 (EEST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 19 Jun 2005 23:50:26 -0400") 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:39597 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39597 > How about this doc string? > > (defun set-variable (var val &optional make-local) > "Set VARIABLE to VALUE. VALUE is a Lisp object. > VARIABLE should be a user option variable name, a Lisp variable > meant to be customized by users. You should enter VALUE in Lisp syntax, > so if you want VALUE to be a string, you must surround it with doublequotes. > VALUE is used literally, not evaluated. > > If VARIABLE has a `variable-interactive' property, that is used as if > it were the arg to `interactive' (which see) to interactively read VALUE. > > If VARIABLE has been defined with `defcustom', then the type information > in the definition is used to check that VALUE is valid. > > With a prefix argument, set VARIABLE to VALUE buffer-locally." There is one problem with `set-variable'. When called interactively it doesn't accept aliased user options. For example, M-x set-variable RET messages-buffer-max-lines RET reports that there are no matches, whereas `messages-buffer-max-lines' is a valid alias for `message-log-max'. IMO, `set-variable' should accept an alias when it is not marked as obsolete. -- Juri Linkov http://www.jurta.org/emacs/