From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Documentation not clear for the Lisp function set-variable Date: Wed, 29 Jun 2005 04:32:39 +0200 Message-ID: References: <87slz6nr3h.fsf@jurta.org> <200506271609.j5RG9i020638@raven.dms.auburn.edu> <87vf3ztg62.fsf@jurta.org> Reply-To: Juanma Barranquero NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1120014175 5738 80.91.229.2 (29 Jun 2005 03:02:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2005 03:02:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 29 05:02:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnSqT-0004Ci-Af for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2005 05:02:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnSyQ-00035X-ON for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 23:10:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DnSrT-0006YL-Li for emacs-devel@gnu.org; Tue, 28 Jun 2005 23:03:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DnSrP-0006Xd-DM for emacs-devel@gnu.org; Tue, 28 Jun 2005 23:03:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnSmT-0003dd-SH for emacs-devel@gnu.org; Tue, 28 Jun 2005 22:58:29 -0400 Original-Received: from [64.233.182.198] (helo=nproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnSS4-0001qM-Tv for emacs-devel@gnu.org; Tue, 28 Jun 2005 22:37:25 -0400 Original-Received: by nproxy.gmail.com with SMTP id i2so245189nfe for ; Tue, 28 Jun 2005 19:32:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GfsV4HJgmdKIvCk7V+DbzyJyiLX+gA1uh96OJ91eITXD9d440TGgUW0r3NeMUScjOwuWjQjm2IB5XVDolgunpd0DVO6dRUDQEJCUcfQyHMZeJQfFnoZ8MfR3MOFDo7DC5kDzLPZI1Qt2YJZoikVMI4X4il4j15o+HhRERrRhr/Q= Original-Received: by 10.48.144.8 with SMTP id r8mr165848nfd; Tue, 28 Jun 2005 19:32:39 -0700 (PDT) Original-Received: by 10.48.250.5 with HTTP; Tue, 28 Jun 2005 19:32:39 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: Content-Disposition: inline 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:39845 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39845 On 6/28/05, Richard M. Stallman wrote: > I don't like that idea. The command should accept *all* names, > whether obsolete or not. But it would be nice to inform the user in > the echo area that the name is obsolete, and give the new name if any. With the installed changes for `user-variable-p' and the attached patch, `set-variable' now: - allows setting aliases of user options - does *not* filter out obsolete variables - shows a 3-seconds warning when the variable (alias or not) being set is obsolete; the warning includes the CURRENT-NAME information from `make-variable-obsolete' - does not show a warning for aliases (I don't think it's necessary to single out aliases if they aren't obsolete, and when they are, they already produce a warni= ng) --=20 /L/e/k/t/u Index: lisp/simple.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v retrieving revision 1.734 diff -c -2 -b -r1.734 simple.el *** lisp/simple.el=0924 Jun 2005 21:11:58 -0000=091.734 --- lisp/simple.el=0929 Jun 2005 00:50:03 -0000 *************** *** 4539,4550 **** =09 (minibuffer-help-form '(describe-variable var)) =09 (prop (get var 'variable-interactive)) ! =09 (prompt (format "Set %s%s to value: " var =09=09=09 (cond ((local-variable-p var) ! =09=09=09=09 " (buffer-local)") =09=09=09=09((or current-prefix-arg =09=09=09=09 (local-variable-if-set-p var)) ! =09=09=09=09 " buffer-locally") ! =09=09=09=09(t " globally")))) ! =09 (val (if prop =09=09 ;; Use VAR's `variable-interactive' property =09=09 ;; as an interactive spec for prompting. --- 4539,4557 ---- =09 (minibuffer-help-form '(describe-variable var)) =09 (prop (get var 'variable-interactive)) ! (obsolete (car (get var 'byte-obsolete-variable))) ! =09 (prompt (format "Set %s %s to value: " var =09=09=09 (cond ((local-variable-p var) ! =09=09=09=09 "(buffer-local)") =09=09=09=09((or current-prefix-arg =09=09=09=09 (local-variable-if-set-p var)) ! =09=09=09=09 "buffer-locally") ! =09=09=09=09(t "globally")))) ! =09 (val (progn ! (when obsolete ! (message (concat "`%S' is obsolete; " ! (if (symbolp obsolete) "use `%S' instead" "%s")) ! var obsolete) ! (sit-for 3)) ! (if prop ;; Use VAR's `variable-interactive' property ;; as an interactive spec for prompting. *************** *** 4554,4558 **** =09=09 (read =09=09 (read-string prompt nil ! =09=09=09 'set-variable-value-history))))) (list var val current-prefix-arg))) =20 --- 4561,4565 ---- (read (read-string prompt nil ! 'set-variable-value-history)))))) (list var val current-prefix-arg)))