public inbox for guile-emacs@sourceware.org
 help / color / mirror / Atom feed
From: Keisuke Nishida <kxn30@po.cwru.edu>
To: guile-emacs@sourceware.cygnus.com
Subject: import-lisp-macro
Date: Fri, 17 Mar 2000 09:40:00 -0000	[thread overview]
Message-ID: <m33dppijgl.fsf@kei.cwru.edu> (raw)

Hello,

OK, I did it.  Now we can import some lisp macros like this:

  (import-lisp-macro save-excursion)

This works only for (NAME BODY...) style macros for now.
The new version is available from CVS:

  http://sourceforge.net/cvs/?group_id=3545

It seems this version has some GC-related bugs, and the code is not
very clean.  I'll rewrite them before long.

An important change has been made.  All imported lisp functions now
returns a kind of pointer to a lisp value.  The new scheme code looks
like this:

  ;; Call a lisp function with a return value from a lisp function
  (let ((str (buffer-substring start end)))
    (insert str))

  ;; Call a scheme function with a return value from a lisp function
  (let ((str (buffer-substring start end)))
    (eval-string (str)))

  ;; Another way of writing
  (eval-string ((buffer-substring start end)))

The difference is additional parentheses around the return value.
It actually converts a lisp value to a scheme value.  I think this
is a necessary but a confusing feature.  We shouldn't write too many
code in this manner.

Now we are almost ready to write Emacs Scheme programs.  I'd like to
write some more experimental programs and to think about a better way
of writing scheme programs.

Since I'm going to be busy from this weekend, I am not sure if I can
work a lot for a while...

-- Kei

             reply	other threads:[~2000-03-17  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17  9:40 Keisuke Nishida [this message]
2000-03-18  3:59 ` import-lisp-macro Kalle Olavi Niemitalo
2000-03-18 10:08   ` import-lisp-macro Keisuke Nishida
2000-03-18 10:47     ` import-lisp-macro Keisuke Nishida
2000-03-18 11:00     ` import-lisp-macro Keisuke Nishida
2000-03-20  7:50 ` import-lisp-macro Kalle Olavi Niemitalo
2000-03-20 16:04   ` import-lisp-macro Keisuke Nishida
2000-03-21 11:05     ` import-lisp-macro Kalle Olavi Niemitalo

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33dppijgl.fsf@kei.cwru.edu \
    --to=kxn30@po.cwru.edu \
    --cc=guile-emacs@sourceware.cygnus.com \
    /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).