Newsgroups: comp.lang.lisp
From: Pascal Bourguignon <p...@informatimago.com>
Date: Sun, 13 Jan 2008 20:31:18 +0100
Local: Sun, Jan 13 2008 2:31 pm
Subject: Re: Colon commands
Evans Winner <tho...@timbral.net> writes: It is not standard. The role of comma is defined only in the context > Some research seems to indicate that at least OpenMCL, ACL and LispWorks > maybe have some kind of facility that allows the definition of commands > that can be used at the repl that look like-- > :command > --or maybe-- > :command arg1 [arg2 ... argn] > I know at least clisp has something like this at least in the debugger. of backquote. > Sorry if the question is vague; i don't know if there is an established Note that at least in Allegro Common Lisp, the character prefixing > term for this. I can't find a reference in the Hyperspec. In any case, > it might be nice to be able to define commands like that for convenience > at the repl. Can it be done?--or is there a reason it's a bad idea? these commands (both user defined and system provided) is configurable. In the case of clisp, there's no prefix character for user commands. C/USER[23]> (com.informatimago.pjb::define-user-commands (:fecha date user1::dote) For clisp users: To define more easily user commands in clisp, I use these macros: (eval-when (:compile-toplevel :load-toplevel :execute) ;;(setf custom:*user-commands* nil) (defun generate-user-commands () (defmacro define-user-commands (names category docstring &body body) (defun delete-user-command (name) Refer to the Implementation Notes for teh description of custom:*user-commands*. -- Nobody can fix the economy. Nobody can be trusted with their finger You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||