summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 6410ecc..dbbf9e5 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -293,14 +293,17 @@ implementation-specific entries for font-lock-keywords.")
(defun geiser-syntax--read-from-string (string &optional start end)
(when (stringp string)
- (let* ((start (or start 0))
- (end (or end (length string)))
- (max-lisp-eval-depth (min 20000
- (max max-lisp-eval-depth (- end start))))
- (max-specpdl-size (* 2 max-lisp-eval-depth)))
- (with-temp-buffer
- (save-excursion (insert string))
- (cons (geiser-syntax--read) (point))))))
+ ;; In Emacs 29 this variable doesn't have an effect
+ ;; anymore and `max-lisp-eval-depth' achieves the same.
+ (with-suppressed-warnings ((obsolete max-specpdl-size))
+ (let* ((start (or start 0))
+ (end (or end (length string)))
+ (max-lisp-eval-depth (min 20000
+ (max max-lisp-eval-depth (- end start))))
+ (max-specpdl-size (* 2 max-lisp-eval-depth)))
+ (with-temp-buffer
+ (save-excursion (insert string))
+ (cons (geiser-syntax--read) (point)))))))
(defun geiser-syntax--form-from-string (s)
(car (geiser-syntax--read-from-string s)))