public inbox for guile-emacs@sourceware.org
 help / color / mirror / Atom feed
* New internal implementation
@ 2000-05-05  6:47 Keisuke Nishida
  2000-05-05  8:21 ` Dynamic binding: lisp-ref and lisp-set! Keisuke Nishida
  2000-05-06  5:37 ` New internal implementation Satoru Takabayashi
  0 siblings, 2 replies; 10+ messages in thread
From: Keisuke Nishida @ 2000-05-05  6:47 UTC (permalink / raw)
  To: guile-emacs

Hello,

I've committed the new internal of Guile Emacs which uses GOOPS.

Now we have three primitive procedures: `%lisp-eval', `%lisp-apply',
and `%lisp->scheme'.  They work like this:

  (%lisp-eval '(current-buffer))
  => #<foreign-object <emacs-buffer> 40457800>

  (eq? (%lisp-eval '(current-buffer)) (%lisp-eval '(current-buffer)))
  => #t

  (define buffer (%lisp-eval '(current-buffer)))
  (define name (%lisp-apply 'buffer-name (list buffer)))
  name
  => #<foreign-object <emacs-string> 403cf4b0>

  (%lisp->scheme name)
  => "*scratch*"

So we are now ready to implement the new Emacs Scheme code that
utilizes GOOPS:

  (define (buffer-string)
    (%lisp-eval '(buffer-string)))

  (define-generic substring)
  (define-method (substring (string <emacs-string>) start end)
    (%lisp-apply 'substring (list string start end)))

  (define-generic eval-string)
  (define-method (eval-string (string <emacs-string>))
    (eval-string (%lisp->scheme string)))

  (eval-string (substring (buffer-string) 0 10))

For now, the old procedures (i.e., lisp-eval, lisp-apply, etc.) still
exist, so this version should not break the existing Scheme code.
After rewriting the code by using the new procedures, I'll remove the
old procedures.  (I'll be busy for more few days, so it will be after
May 10.)

Some additional changes from NEWS:

*** Guile Emacs turns on Guile's debugging features at startup time
if the command line option --debug-init is given.

*** Guile Emacs now displays an error and backtrace in the *Message*
buffer in detail when error-on-debug is non-nil.

*** The Lisp functions `scheme-apply' and `scmref-to-lisp' are removed.

Have fun!

-- Kei

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-05-07  3:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-05  6:47 New internal implementation Keisuke Nishida
2000-05-05  8:21 ` Dynamic binding: lisp-ref and lisp-set! Keisuke Nishida
2000-05-06  5:37 ` New internal implementation Satoru Takabayashi
2000-05-06  6:57   ` Keisuke Nishida
2000-05-06 15:50     ` Satoru Takabayashi
2000-05-06 17:43       ` Keisuke Nishida
2000-05-07  2:27         ` Satoru Takabayashi
2000-05-07  2:58           ` Keisuke Nishida
     [not found]         ` <20000507182914A.satoru-t@is.aist-nara.ac.jp>
     [not found]           ` <m3k8h6r912.fsf@kei.cwru.edu>
2000-05-07  3:14             ` Satoru Takabayashi
2000-05-07  3:41               ` Keisuke Nishida

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).