[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile 2fd5d5b 166/284: Guile: configurable warning
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile 2fd5d5b 166/284: Guile: configurable warning level |
Date: |
Sun, 1 Aug 2021 18:29:38 -0400 (EDT) |
branch: elpa/geiser-guile
commit 2fd5d5bdeb75f452a0a97208e262cc0da8e45c5a
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Guile: configurable warning level
---
elisp/geiser-guile.el | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 15c40cc..55116d3 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -63,6 +63,29 @@ If `t', Geiser will use `next-error' to jump to the error's
location."
:type 'boolean
:group 'geiser-guile)
+(geiser-custom--defcustom geiser-guile-warning-level 'medium
+ "Verbosity of the warnings reported by Guile.
+
+You can choose either one of the predefined warning sets, or
+provide a list of symbols identifying the ones you want. Possible
+choices are arity-mismatch, unbound-variable, unused-variable and
+unused-toplevel. Unrecognised symbols are ignored.
+
+The predefined levels are:
+
+ - Medium: arity-mismatch, unbound-variable
+ - High: arity-mismatch, unbound-variable, unused-variable
+ - None: no warnings
+
+Changes to the value of this variable will automatically take
+effect on new REPLs. For existing ones, use the command
+\\[geiser-guile-update-warning-level]."
+ :type '(choice (const :tag "Medium (arity and unbound vars)" medium)
+ (const :tag "High (also unused vars)" high)
+ (const :tag "No warnings" none)
+ (repeat :tag "Custom" symbol))
+ :group 'geiser-guile)
+
;;; REPL support:
@@ -189,6 +212,14 @@ This function uses `geiser-guile-init-file' if it exists."
;;; REPL startup
+(defun geiser-guile-update-warning-level ()
+ "Update the warning level used by the REPL.
+The new level is set using the value of `geiser-guile-warning-level'."
+ (interactive)
+ (let ((code `(:eval (ge:set-warnings ',geiser-guile-warning-level)
+ (geiser evaluation))))
+ (geiser-eval--send/result code)))
+
(defun geiser-guile--startup ()
(set (make-local-variable 'compilation-error-regexp-alist)
`((,geiser-guile--path-rx geiser-guile--resolve-file-x)
@@ -197,7 +228,8 @@ This function uses `geiser-guile-init-file' if it exists."
(compilation-setup t)
(font-lock-add-keywords nil
`((,geiser-guile--path-rx 1
- compilation-error-face))))
+ compilation-error-face)))
+ (geiser-guile-update-warning-level))
;;; Implementation definition:
- [nongnu] elpa/geiser-guile 0d3b1f8 205/284: Support for implementation-specific font lock keywords, (continued)
- [nongnu] elpa/geiser-guile 0d3b1f8 205/284: Support for implementation-specific font lock keywords, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 92dadf9 206/284: Typo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile e25e31f 208/284: Fix for error in Guile initialisation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 67e9ff2 220/284: Guile: 'format' added to the warning list, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 5ed0541 243/284: Possible fix for scanning problem, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile afa28c8 253/284: Support for guile-2.2, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 60c7b01 260/284: A note on dir-locals and load-path variables, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile b523072 269/284: Use cl-lib instead of cl, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 93ef710 281/284: fix: auto-activate guile implementation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 12a6a2e 089/284: Well, i said that it was better, not that it was perfect., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 2fd5d5b 166/284: Guile: configurable warning level,
Philip Kaludercic <=
- [nongnu] elpa/geiser-guile 57e3009 191/284: Guile: better meta-command args handling, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d2d5f62 192/284: Implementation guessing for scripts with #! ... guile, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 9889d29 196/284: Merge branch 'guile-meta' into meta-reconnection, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile b5f0316 211/284: Guile: logging initialisation process, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 52e8e12 212/284: Guile: fix for connect-to-guile problems, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 4732e10 214/284: Bug fix: don't intern symbols read by scheme reader, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1421a71 225/284: Guile: find module when cursor is before define-module (#33497), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6c9efbc 233/284: Guile: Fix subr argument name retrieval for Guile >= 2.0.9., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 3bf45a4 249/284: Clean up indentation rules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 9d0d38a 237/284: Guile: augmenting %load-compiled-path too, Philip Kaludercic, 2021/08/01