diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2022-12-05 15:17:55 +0100 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2022-12-05 15:17:55 +0100 |
commit | a60efa80cdb8c72dacb1e16729a801206a4e80bf (patch) | |
tree | 67e7edf51c5eb0133d669e67ab00d3b83788c428 /elisp/geiser-syntax.el | |
parent | 47bb86d6829ffa81ec021ee6217379b216d95bfc (diff) | |
download | geiser-a60efa80cdb8c72dacb1e16729a801206a4e80bf.tar.gz geiser-a60efa80cdb8c72dacb1e16729a801206a4e80bf.tar.bz2 |
Take the byte-compilers advice into account
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 19 |
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))) |