From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Test for `save-abbrevs' improvement Date: Thu, 16 Feb 2006 13:46:38 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1140150892 17613 80.91.229.2 (17 Feb 2006 04:34:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2006 04:34:52 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 17 05:34:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F9xKR-0001X7-Nq for ged-emacs-devel@m.gmane.org; Fri, 17 Feb 2006 05:34:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9xDM-0005YR-22 for ged-emacs-devel@m.gmane.org; Thu, 16 Feb 2006 23:27:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F9q3C-0001HP-6g for emacs-devel@gnu.org; Thu, 16 Feb 2006 15:48:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F9q38-0001Ck-HW for emacs-devel@gnu.org; Thu, 16 Feb 2006 15:48:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9q2f-0000US-EZ for emacs-devel@gnu.org; Thu, 16 Feb 2006 15:47:57 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F9q7r-0008Th-OW for emacs-devel@gnu.org; Thu, 16 Feb 2006 15:53:20 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F9q2F-0001Em-QO for emacs-devel@gnu.org; Thu, 16 Feb 2006 21:47:31 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Feb 2006 21:47:31 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Feb 2006 21:47:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: 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:50637 Archived-At: Juanma Barranquero wrote: > Often it is said here that it is best to check for features, and not > for specific Emacs versions. > > What about changes to allowed values for a variable? > > `save-abbrevs' now accepts the value `silently', but that feature has > neither new variables nor functions to test for. And I don't want to > simply set `save-abbrevs' to `silently' because then, 21.1 asks me > every time about saving the abbreviations. > > What would be the wisest way to check for it? > > (string-match "`silently'" > (documentation-property 'save-abbrevs > 'variable-documentation)) > > seems hardly elegant... How about: (member '(const silently) (custom-variable-type 'save-abbrevs)) -- Kevin Rodgers