mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 02:00:26 +02:00
* gds.el: Add requirements: cl, comint, info.
(gds-guile-program): New. (gds-start): When starting or restarting, kill captive if it exists. Use gds-guile-program instead of just "guile". (gds-mode): Use widget minor mode. (gds-client-ref): New optional client arg. (gds-update-buffers): Don't call widget-setup. (gds-heading-face): New. (gds-insert-interaction): Various prettifications. (gds-heading-insert): New. (gds-choose-client): Check that numbers in client and gds-client are still valid. (gds-eval-expression, gds-apropos): Remove text properties from expression to evaluate. (gds-mode-map): Don't set widget-mode-map as parent. (gds-start-captive): Use gds-guile-program instead of just "guile". * gds-client.scm (install-breakpoints): Bugfix: avoid null lists in traversal. (eval-thread, gds-eval): Where expression has multiple parts, modify output to say which part is being evaluated.
This commit is contained in:
parent
2c0334eccd
commit
580987cf4b
3 changed files with 104 additions and 31 deletions
|
@ -523,7 +523,7 @@ decimal IP address where the UI server is running; default is
|
|||
|
||||
(define (install-breakpoints x bpinfo)
|
||||
(define (install-recursive x)
|
||||
(if (list? x)
|
||||
(if (and (list? x) (not (null? x)))
|
||||
(begin
|
||||
;; Check source properties of x itself.
|
||||
(let* ((infokey (cons (source-property x 'line)
|
||||
|
@ -619,12 +619,17 @@ decimal IP address where the UI server is running; default is
|
|||
;; Do the evaluation(s).
|
||||
(let loop2 ((m (cadr work))
|
||||
(exprs (cddr work))
|
||||
(results '()))
|
||||
(results '())
|
||||
(n 1))
|
||||
(if (null? exprs)
|
||||
(write-form `(eval-results ,correlator ,@results))
|
||||
(loop2 m
|
||||
(cdr exprs)
|
||||
(append results (gds-eval (car exprs) m))))))
|
||||
(append results (gds-eval (car exprs) m
|
||||
(if (and (null? (cdr exprs))
|
||||
(= n 1))
|
||||
#f n)))
|
||||
(+ n 1)))))
|
||||
(trc 'eval-thread depth thread-number "work done")
|
||||
;; Tell the subthread that it should now exit.
|
||||
(set! subthread-needed? #f)
|
||||
|
@ -643,7 +648,7 @@ decimal IP address where the UI server is running; default is
|
|||
;; Tell the front end this thread is ready.
|
||||
(write-form `(thread-status eval ,thread-number exiting)))))
|
||||
|
||||
(define (gds-eval x m)
|
||||
(define (gds-eval x m part)
|
||||
;; Consumer to accept possibly multiple values and present them for
|
||||
;; Emacs as a list of strings.
|
||||
(define (value-consumer . values)
|
||||
|
@ -653,10 +658,14 @@ decimal IP address where the UI server is running; default is
|
|||
(with-output-to-string (lambda () (write value))))
|
||||
values)))
|
||||
;; Now do evaluation.
|
||||
(let ((value #f))
|
||||
(let ((intro (if part
|
||||
(format #f ";;; Evaluating subexpression ~A" part)
|
||||
";;; Evaluating"))
|
||||
(value #f))
|
||||
(let* ((do-eval (if m
|
||||
(lambda ()
|
||||
(display "Evaluating in module ")
|
||||
(display intro)
|
||||
(display " in module ")
|
||||
(write (module-name m))
|
||||
(newline)
|
||||
(set! value
|
||||
|
@ -665,7 +674,8 @@ decimal IP address where the UI server is running; default is
|
|||
(eval x m)))
|
||||
value-consumer)))
|
||||
(lambda ()
|
||||
(display "Evaluating in current module ")
|
||||
(display intro)
|
||||
(display " in current module ")
|
||||
(write (module-name (current-module)))
|
||||
(newline)
|
||||
(set! value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue