From fb6be75c2ba3b6064ad69544b409f7e7962fa74d Mon Sep 17 00:00:00 2001 From: Lockywolf Date: Thu, 29 Aug 2019 13:55:24 +0800 Subject: Fix latest chicken. Add debug level logging. Fixed typo. --- elisp/geiser-chicken.el | 8 ++------ elisp/geiser-log.el | 9 +++++++++ elisp/geiser-repl.el | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el index 1af2afa..dff028f 100644 --- a/elisp/geiser-chicken.el +++ b/elisp/geiser-chicken.el @@ -295,12 +295,8 @@ This function uses `geiser-chicken-init-file' if it exists." (geiser-eval--send/wait load-sequence)))) (defun geiser-chicken5-load () - (let ((source (expand-file-name "chicken/geiser/chicken5.scm" geiser-scheme-dir)) - (suppression-prefix - "(define geiser-stdout (current-output-port))(current-output-port (make-output-port (lambda a #f) (lambda a #f)))") - (suppression-postfix - "(current-output-port geiser-stdout)")) - (geiser-eval--send/wait (format "%s (load \"%s\") (import geiser) %s" suppression-prefix source suppression-postfix)))) + (let ((source (expand-file-name "chicken/geiser/chicken5.scm" geiser-scheme-dir))) + (geiser-eval--send/wait (format "(display '((result . t) (output . f))) (load \"%s\") (import geiser)" source)))) (defun geiser-chicken--startup (remote) (compilation-setup t) diff --git a/elisp/geiser-log.el b/elisp/geiser-log.el index a252144..e004831 100644 --- a/elisp/geiser-log.el +++ b/elisp/geiser-log.el @@ -39,6 +39,10 @@ (defvar geiser-log-verbose-p nil "Log purely informational messages. Useful for debugging.") +(defvar geiser-log-verbose-debug-p nil + "Log very verbose informational messages. Useful only for debugging.") + + (defvar geiser-log--inhibit-p nil "Set this to t to inhibit all log messages") @@ -54,6 +58,7 @@ (when (> b geiser-log--max-buffer-size) (delete-region (point-min) b)))) nil t) + ;; Maybe this feature would better be implemented as a revert-buffer function? (add-hook 'after-change-functions '(lambda (b e len) (when geiser-log-autoscroll-buffer-p @@ -85,6 +90,10 @@ (when geiser-log-verbose-p (apply 'geiser-log--msg 'INFO args) "")) +(defsubst geiser-log--debug (&rest args) + (when geiser-log-verbose-debug-p + (apply 'geiser-log--msg 'DEBUG args) "")) + ;;; User commands: diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index c589ab3..89226d2 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -484,7 +484,7 @@ module command as a string") (error "Geiser requires %s version %s but detected %s" impl r v))))) (defun geiser-repl--start-repl (impl address) - (message "Starting Geiser REPL for %s ..." impl) + (message "Starting Geiser REPL ...") (when (not address) (geiser-repl--check-version impl)) (geiser-repl--to-repl-buffer impl) (sit-for 0) -- cgit v1.2.3