From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.help Subject: CL compatibility question Date: Thu, 06 May 2004 14:36:09 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1083878250 30026 80.91.224.253 (6 May 2004 21:17:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 May 2004 21:17:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 06 23:17:19 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLqF5-0003II-00 for ; Thu, 06 May 2004 23:17:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLpxg-0006uv-4r for geh-help-gnu-emacs@m.gmane.org; Thu, 06 May 2004 16:59:20 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLpJU-0004G4-Pu for help-gnu-emacs@gnu.org; Thu, 06 May 2004 16:17:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLp0G-0000Ft-Fi for help-gnu-emacs@gnu.org; Thu, 06 May 2004 15:58:27 -0400 Original-Received: from [146.6.139.124] (helo=dell3.ma.utexas.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLofE-0007ZI-6b for help-gnu-emacs@gnu.org; Thu, 06 May 2004 15:36:12 -0400 Original-Received: from linux183.ma.utexas.edu (mail@linux183.ma.utexas.edu [146.6.139.172]) by dell3.ma.utexas.edu (8.11.0.Beta3/8.10.2) with ESMTP id i46Ja9q31646; Thu, 6 May 2004 14:36:09 -0500 Original-Received: from jcorneli by linux183.ma.utexas.edu with local (Exim 3.36 #1 (Debian)) id 1BLofB-0007kA-00; Thu, 06 May 2004 14:36:09 -0500 Original-To: help-gnu-emacs@gnu.org X-all-your-base-are-belong-to-us: You are on the way to destruction. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:18324 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18324 Frode Vatvedt Fjeld suggested (on comp.lang.lisp, 2004-05-06) the following approach to building something like Bash's `$@' in LISP: (defmacro defbashfun (name lambda &body body) `(defun ,name (&rest $@) (apply (lambda ,lambda ,@body) $@))) In CLISP, this works great. (defbashfun taco (beef beans) (car $@)) (taco t nil) ;=> T In ELISP, not so great. (defbashfun taco (beef beans) (car $@)) (taco t nil) ;=> Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (name lambda &body body) (\` (defun (\, name) (&rest $@) (apply (lambda (\, lambda) (\,@ body)) $@)))) 3) (lambda (name lambda &body body) (\` (defun ... ... ...)))(taco (beef beans) (car $@)) (defbashfun taco (beef beans) (car $@)) eval((defbashfun taco (beef beans) (car $@))) eval-last-sexp-1(nil) eval-last-sexp(nil) * call-interactively(eval-last-sexp) Why is this? Are there plans that would change this behavior in the future?