Function: verb--eval-string

verb--eval-string is a natively compiled function defined in verb.el.

Signature

(verb--eval-string S &optional CONTEXT)

Documentation

Eval S as Lisp code and return the result.

When evaluating the code, use buffer CONTEXT as the current buffer. If CONTEXT is nil, use the already current buffer as context. As a special case, if S is the empty string, return the empty string.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb--eval-string (s &optional context)
  "Eval S as Lisp code and return the result.
When evaluating the code, use buffer CONTEXT as the current buffer.
If CONTEXT is nil, use the already current buffer as context.  As a
special case, if S is the empty string, return the empty string."
  (if (string-empty-p s)
      ""
    (save-mark-and-excursion
      (save-match-data
        (with-current-buffer (or context (current-buffer))
          (eval (car (read-from-string (format "(progn %s)" s))) t))))))