guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core guile-readline/ChangeLog guile...


From: Dirk Herrmann
Subject: guile/guile-core guile-readline/ChangeLog guile...
Date: Fri, 26 Jan 2001 08:58:50 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Dirk Herrmann <address@hidden>  01/01/26 08:58:49

Modified files:
        guile-core/guile-readline: ChangeLog readline.scm 
        guile-core/ice-9: ChangeLog boot-9.scm 

Log message:
        * Make readline run-time options accessible.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/guile-readline/ChangeLog.diff?r1=1.48&r2=1.49
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/guile-readline/readline.scm.diff?r1=1.9&r2=1.10
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/ChangeLog.diff?r1=1.366&r2=1.367
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/boot-9.scm.diff?r1=1.222&r2=1.223

Patches:
Index: guile/guile-core/guile-readline/ChangeLog
diff -u guile/guile-core/guile-readline/ChangeLog:1.48 
guile/guile-core/guile-readline/ChangeLog:1.49
--- guile/guile-core/guile-readline/ChangeLog:1.48      Thu Jan 25 09:57:29 2001
+++ guile/guile-core/guile-readline/ChangeLog   Fri Jan 26 08:58:48 2001
@@ -1,3 +1,15 @@
+2001-01-26  Dirk Herrmann  <address@hidden>
+
+       This patch fixes a problem reported by Martin Grabmueller about
+       the impossibility to access readline's run-time options.
+
+       * readline.scm:  Added a comment about guile's behaviour if one of
+       the ports used by readline are closed.
+
+       (readline-options readline-enable readline-disable,
+       readline-set!):  These are now defined here instead of in
+       boot-9.scm.
+
 2001-01-25  Dirk Herrmann  <address@hidden>
 
        * readline.scm (set-readline-input-port!,
Index: guile/guile-core/guile-readline/readline.scm
diff -u guile/guile-core/guile-readline/readline.scm:1.9 
guile/guile-core/guile-readline/readline.scm:1.10
--- guile/guile-core/guile-readline/readline.scm:1.9    Thu Jan 25 09:57:29 2001
+++ guile/guile-core/guile-readline/readline.scm        Fri Jan 26 08:58:48 2001
@@ -21,11 +21,15 @@
 ;;;; Extensions based upon code by
 ;;;; Andrew Archibald <address@hidden>.
 
+
+
 (define-module (ice-9 readline)
   :use-module (ice-9 session)
   :use-module (ice-9 regex)
   :no-backtrace)
 
+
+
 ;;; Dynamically link the glue code for accessing the readline library,
 ;;; but only when it isn't already present.
 
@@ -39,8 +43,29 @@
               '()
               '()))
 
+
+
+;;; Run-time options
+
+(export
+ readline-options
+ readline-enable
+ readline-disable)
+(export-syntax
+ readline-set!)
+
+(define-option-interface
+  (readline-options-interface
+   (readline-options readline-enable readline-disable)
+   (readline-set!)))
+
+
+
 ;;; MDJ 980513 <address@hidden>:
 ;;; There should probably be low-level support instead of this code.
+
+;;; Dirk:FIXME:: If the-readline-port, input-port or output-port are closed,
+;;; guile will enter an endless loop or crash.
 
 (define prompt "")
 (define prompt2 "")
Index: guile/guile-core/ice-9/ChangeLog
diff -u guile/guile-core/ice-9/ChangeLog:1.366 
guile/guile-core/ice-9/ChangeLog:1.367
--- guile/guile-core/ice-9/ChangeLog:1.366      Wed Jan 24 13:45:09 2001
+++ guile/guile-core/ice-9/ChangeLog    Fri Jan 26 08:58:48 2001
@@ -1,3 +1,14 @@
+2001-01-26  Dirk Herrmann  <address@hidden>
+
+       This patch fixes a problem reported by Martin Grabmueller about
+       the impossibility to access readline's run-time options.
+
+       * boot-9.scm (define-option-interface):  New macro.  Allows to
+       conveniently define a group of option interface functions.
+
+       (readline-options readline-enable readline-disable,
+       readline-set!):  Moved to guile-readline/readline.scm.
+
 2001-01-24  Gary Houston  <address@hidden>
 
        * boot-9.scm: don't import (ice-9 rdelim) here.  it's done
Index: guile/guile-core/ice-9/boot-9.scm
diff -u guile/guile-core/ice-9/boot-9.scm:1.222 
guile/guile-core/ice-9/boot-9.scm:1.223
--- guile/guile-core/ice-9/boot-9.scm:1.222     Wed Jan 24 13:45:09 2001
+++ guile/guile-core/ice-9/boot-9.scm   Fri Jan 26 08:58:48 2001
@@ -2015,97 +2015,96 @@
 
 ;;; {Run-time options}
 
-((let* ((names '((eval-options-interface
-                 (eval-options eval-enable eval-disable)
-                 (eval-set!))
-                
-                (debug-options-interface
-                 (debug-options debug-enable debug-disable)
-                 (debug-set!))
-              
-                (evaluator-traps-interface
-                 (traps trap-enable trap-disable)
-                 (trap-set!))
-               
-                (read-options-interface
-                 (read-options read-enable read-disable)
-                 (read-set!))
-               
-                (print-options-interface
-                 (print-options print-enable print-disable)
-                 (print-set!))
-
-                (readline-options-interface
-                 (readline-options readline-enable readline-disable)
-                 (readline-set!))
-                ))
-       (option-name car)
-       (option-value cadr)
-       (option-documentation caddr)
-
-       (print-option (lambda (option)
-                       (display (option-name option))
-                       (if (< (string-length
-                               (symbol->string (option-name option)))
-                              8)
-                           (display #\tab))
-                       (display #\tab)
-                       (display (option-value option))
-                       (display #\tab)
-                       (display (option-documentation option))
-                       (newline)))
-
-       ;; Below follows the macros defining the run-time option interfaces.
-
-       (make-options (lambda (interface)
-                       `(lambda args
-                          (cond ((null? args) (,interface))
-                                ((list? (car args))
-                                 (,interface (car args)) (,interface))
-                                (else (for-each ,print-option
-                                                (,interface #t)))))))
-
-       (make-enable (lambda (interface)
-                      `(lambda flags
-                         (,interface (append flags (,interface)))
-                         (,interface))))
+(define define-option-interface
+  (let* ((option-name car)
+        (option-value cadr)
+        (option-documentation caddr)
+
+        (print-option (lambda (option)
+                        (display (option-name option))
+                        (if (< (string-length
+                                (symbol->string (option-name option)))
+                               8)
+                            (display #\tab))
+                        (display #\tab)
+                        (display (option-value option))
+                        (display #\tab)
+                        (display (option-documentation option))
+                        (newline)))
+
+        ;; Below follow the macros defining the run-time option interfaces.
+
+        (make-options (lambda (interface)
+                        `(lambda args
+                           (cond ((null? args) (,interface))
+                                 ((list? (car args))
+                                  (,interface (car args)) (,interface))
+                                 (else (for-each ,print-option
+                                                 (,interface #t)))))))
 
-       (make-disable (lambda (interface)
+        (make-enable (lambda (interface)
                        `(lambda flags
-                          (let ((options (,interface)))
-                            (for-each (lambda (flag)
-                                        (set! options (delq! flag options)))
-                                      flags)
-                            (,interface options)
-                            (,interface)))))
-
-       (make-set! (lambda (interface)
-                    `((name exp)
-                      (,'quasiquote
-                       (begin (,interface (append (,interface)
-                                                  (list '(,'unquote name)
-                                                        (,'unquote exp))))
-                              (,interface))))))
-       )
-   (procedure->macro
+                          (,interface (append flags (,interface)))
+                          (,interface))))
+
+        (make-disable (lambda (interface)
+                        `(lambda flags
+                           (let ((options (,interface)))
+                             (for-each (lambda (flag)
+                                         (set! options (delq! flag options)))
+                                       flags)
+                             (,interface options)
+                             (,interface)))))
+
+        (make-set! (lambda (interface)
+                     `((name exp)
+                       (,'quasiquote
+                        (begin (,interface (append (,interface)
+                                                   (list '(,'unquote name)
+                                                         (,'unquote exp))))
+                               (,interface)))))))
+    (procedure->macro
      (lambda (exp env)
        (cons 'begin
-            (apply append
-                   (map (lambda (group)
-                          (let ((interface (car group)))
-                            (append (map (lambda (name constructor)
-                                           `(define ,name
-                                              ,(constructor interface)))
-                                         (cadr group)
-                                         (list make-options
-                                               make-enable
-                                               make-disable))
-                                    (map (lambda (name constructor)
-                                           `(defmacro ,name
-                                              ,@(constructor interface)))
-                                         (caddr group)
-                                         (list make-set!)))))
-                        names)))))))
+            (let* ((option-group (cadr exp))
+                   (interface (car option-group)))
+              (append (map (lambda (name constructor)
+                             `(define ,name
+                                ,(constructor interface)))
+                           (cadr option-group)
+                           (list make-options
+                                 make-enable
+                                 make-disable))
+                      (map (lambda (name constructor)
+                             `(defmacro ,name
+                                ,@(constructor interface)))
+                           (caddr option-group)
+                           (list make-set!)))))))))
+
+(define-option-interface
+  (eval-options-interface
+   (eval-options eval-enable eval-disable)
+   (eval-set!)))
+
+(define-option-interface
+  (debug-options-interface
+   (debug-options debug-enable debug-disable)
+   (debug-set!)))
+
+(define-option-interface
+  (evaluator-traps-interface
+   (traps trap-enable trap-disable)
+   (trap-set!)))
+
+(define-option-interface
+  (read-options-interface
+   (read-options read-enable read-disable)
+   (read-set!)))
+
+(define-option-interface
+  (print-options-interface
+   (print-options print-enable print-disable)
+   (print-set!)))
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]