From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.help Subject: Lisp: Functions for multiple comparisons Date: Wed, 20 Nov 2002 13:14:16 -0800 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: main.gmane.org 1037827198 29777 80.91.224.249 (20 Nov 2002 21:19:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 21:19:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EcGK-0007k0-00 for ; Wed, 20 Nov 2002 22:19:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EcHc-0000F2-00; Wed, 20 Nov 2002 16:21:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EcGl-0007lO-00 for help-gnu-emacs@gnu.org; Wed, 20 Nov 2002 16:20:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EcAy-0004q6-00 for help-gnu-emacs@gnu.org; Wed, 20 Nov 2002 16:14:28 -0500 Original-Received: from renfield.synergymicro.com ([153.105.4.30] helo=synergymicro.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EcAw-0004mg-00 for help-gnu-emacs@gnu.org; Wed, 20 Nov 2002 16:14:23 -0500 Original-Received: from synergy.synergy.encinitas.ca.us ([153.105.4.29]) by synergymicro.com (8.9.3/8.9.3) with ESMTP id NAA31714 for ; Wed, 20 Nov 2002 13:16:14 -0800 Original-Received: from [198.17.100.22] (G-Hill-Mac [198.17.100.22]) by synergy.synergy.encinitas.ca.us (8.9.3/8.8.7) with ESMTP id NAA18127 for ; Wed, 20 Nov 2002 13:19:07 -0800 X-Sender: ghill@synergy (Unverified) In-Reply-To: Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3814 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3814 I am aware of the built-in functions memq and member. But what I really want is a pair of special forms that work more like 'or and 'and. The first argument would be compared against all of the rest using either 'eq or 'equal, returning 't if any match was found. For example, a special form using an 'eq comarison might be named 'meq and be called like: (meq (char-syntax (following-char)) ?w ?_) instead of using (memq (char-syntax (following-char) '(?w ?_))) or (or (eq (char-syntax (following-char)) ?w) (eq (char-syntax (following-char)) ?_)) or (let ((syntax (char-syntax (following-char)))) (or (eq syntax ?w) (eq syntax ?_))) Is there already something like that that I simply am not yet aware of? If not, am I wrong in thinking that the kind of special forms I am imagining would be computationally more efficient than any of the alternatives shown above? --Greg