From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.help Subject: Re: Calling different kinds of functions, which finish the same job Date: Wed, 12 Apr 2006 08:50:46 +0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1144803070 17471 80.91.229.2 (12 Apr 2006 00:51:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2006 00:51:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 12 02:51:08 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTTZa-0008KL-Oe for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Apr 2006 02:51:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTTZa-0000Kn-6p for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Apr 2006 20:51:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTTZK-0000I6-Sq for help-gnu-emacs@gnu.org; Tue, 11 Apr 2006 20:50:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTTZJ-0000GQ-Jr for help-gnu-emacs@gnu.org; Tue, 11 Apr 2006 20:50:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTTZJ-0000Fu-Cl for help-gnu-emacs@gnu.org; Tue, 11 Apr 2006 20:50:49 -0400 Original-Received: from [64.4.26.14] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTTeH-0000H4-Ly for help-gnu-emacs@gnu.org; Tue, 11 Apr 2006 20:55:57 -0400 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 11 Apr 2006 17:50:47 -0700 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 12 Apr 2006 00:50:46 GMT X-Originating-IP: [221.220.62.162] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: Original-To: ihs_4664@yahoo.com X-OriginalArrivalTime: 12 Apr 2006 00:50:47.0815 (UTC) FILETIME=[2345A970:01C65DCB] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34323 Archived-At: >From: Kevin Rodgers >To: help-gnu-emacs@gnu.org >Subject: Re: Calling different kinds of functions, which finish the same >job >Date: Tue, 11 Apr 2006 12:36:55 -0600 > >No you can't, because your macros call > >(f1) >(f1 1) >(f2) >(f2 indent) >(f3) >(f3 1) >(f3 indent) Sorry for the unclear description. I may set f by (setq f (key-binding " ")) So, f can be only one of f1, f2, f3. Suppose f is f3, then my macro will call (f3) (f3 1) (f3 'indent) (f3 1 'indent) The last one will be the one actually executed. This macro only (with help from Lisp interpreter) checks the correctness of arguments of functions, which is often insufficient, since a call may fail even if arguments are right. So I wonder if there are better sulotions. Regards, Guanpeng Xu _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/