This is the mail archive of the guile-emacs@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

import-lisp-macro


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]