From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Question about Elisp language abilities (evaluating expr on time of func definition and ability to construct function).
Date: Fri, 30 Sep 2011 01:45:47 +0300 [thread overview]
Message-ID: <j62sf0$n92$1@dough.gmane.org> (raw)
In-Reply-To: <j62qkh$c92$1@dough.gmane.org>
30.09.2011 1:14, Oleksandr Gavenko пишет:
> 30.09.2011 0:33, Oleksandr Gavenko пишет:
>> Is there any Elisp special form which evaluate args when 'defun' parsed
>> (like words which defined with IMMEDIATE marker in Forth prog lang)?
>>
>> (defun f (x)
>> (IMMEDIATE (message "hello!"))
>> (1+ x)
>> )
>>
I have understood that difference between Elisp and Forth
syntax (on evaluation)!
In Forth word definition IMMEDIATE like word placed into definition:
: abs dup <0 if neg then ;
'if' and 'then' such word. On other corner in Elisp you wrap
whole definition with powerful macro construction:
> (defmacro my-defun-rename-symb-tree (name doc func)
> "Travel by TREE and applies FUNC to each symbol."
> `(defun ,name (tree)
prev parent reply other threads:[~2011-09-29 22:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 21:33 Question about Elisp language abilities (evaluating expr on time of func definition and ability to construct function) Oleksandr Gavenko
2011-09-29 22:14 ` Oleksandr Gavenko
2011-09-29 22:45 ` Oleksandr Gavenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j62sf0$n92$1@dough.gmane.org' \
--to=gavenkoa@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).