diff options
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-base.el | 4 | ||||
-rw-r--r-- | elisp/geiser-connection.el | 17 | ||||
-rw-r--r-- | elisp/geiser-edit.el | 16 | ||||
-rw-r--r-- | elisp/geiser.el | 3 |
4 files changed, 29 insertions, 11 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index 6d6277f..5436224 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -1,6 +1,6 @@ ;;; geiser-base.el --- shared bits -*- lexical-binding: t -*- -;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016, 2019 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016, 2019, 2024 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -71,7 +71,7 @@ (let ((msg (make-symbol "msg"))) `(let ((,msg (current-message))) ,@body - (message ,msg)))) + (message "%s" ,msg)))) (put 'geiser--save-msg 'lisp-indent-function 0) diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el index b7d312e..2b3c4b9 100644 --- a/elisp/geiser-connection.el +++ b/elisp/geiser-connection.el @@ -87,7 +87,7 @@ (unwind-protect (funcall (tq-queue-head-fn tq) (tq-queue-head-closure tq) - (buffer-substring (point-min) (point))) + (buffer-substring (point-min) (match-beginning 0))) (delete-region (point-min) (point-max)) (tq-queue-pop tq))))))) @@ -202,7 +202,20 @@ (debugging (geiser-con--has-entered-debugger con answer))) (condition-case err (let ((start (string-match "((\\(?:result)?\\|error\\) " answer))) - (or (and start (car (read-from-string answer start))) + (or (and start + (progn + (let ((extra-output (substring answer 0 start))) + (unless (string-blank-p extra-output) + (geiser-log--warn "Extra output (before): %s" + (string-trim extra-output)))) + (let* ((ret (read-from-string answer start)) + (extra-output (substring answer (cdr ret)))) + (unless (string-blank-p extra-output) + ;; Usually, the extra output is just the return value + ;; being echoed by the REPL, and not worth noting. + (geiser-log--debug "Extra output (after): %s" + (string-trim extra-output))) + (car ret)))) `((error (key . retort-syntax)) (output . ,answer) (debug . ,debugging)))) diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el index df4231c..1954062 100644 --- a/elisp/geiser-edit.el +++ b/elisp/geiser-edit.el @@ -1,6 +1,6 @@ ;;; geiser-edit.el -- scheme edit locations -*- lexical-binding: t; -*- -;; Copyright (C) 2009, 2010, 2012, 2013, 2019-2023 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013, 2019-2024 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -36,8 +36,16 @@ "How the new buffer is opened when invoking \\[geiser-edit-symbol-at-point] or following links in error buffers.") +(defgroup geiser-edit nil + "Customizations for scheme buffers and information about them." + :group 'geiser) + (geiser-custom--defface error-link - 'link geiser-debug "links in error buffers") + 'link geiser-edit "links in error buffers") + +(geiser-custom--defcustom geiser-insert-actual-lambda t + "Whether geiser-insert-lambda should insert \"λ\" or \"lambda\"." + :type 'boolean) ;;; Auxiliary functions: @@ -298,10 +306,6 @@ With prefix, asks for the symbol to locate." (when marker (xref-push-marker-stack marker)) t))) -(geiser-custom--defcustom geiser-insert-actual-lambda t - "Whether geiser-insert-lambda should insert \"λ\" or \"lambda\"." - :type 'boolean) - (defun geiser-insert-lambda (&optional full) "Insert λ or lambda at point. With prefix, inserts (λ ()) or (lambda ()). diff --git a/elisp/geiser.el b/elisp/geiser.el index 837a9d5..b89148a 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -13,7 +13,7 @@ ;; Homepage: https://gitlab.com/emacs-geiser/ ;; Package-Requires: ((emacs "27.1") (project "0.8.1")) ;; SPDX-License-Identifier: BSD-3-Clause -;; Version: 0.30 +;; Version: 0.31 ;;; Commentary: @@ -108,6 +108,7 @@ (custom-add-load group (symbol-name group)) (custom-add-load 'geiser (symbol-name group))) '(geiser + geiser-edit geiser-repl geiser-autodoc geiser-doc |