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: New internal implementation
Date: Fri, 05 May 2000 06:47:00 -0000	[thread overview]
Message-ID: <m3pur1nm6x.fsf@kei.cwru.edu> (raw)

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

             reply	other threads:[~2000-05-05  6:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-05  6:47 Keisuke Nishida [this message]
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

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