Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun my-eval-string (str)
- "Read and evaluate all forms in str.
- Return the results of all forms as a list."
- (let ((next 0)
- ret)
- (condition-case err
- (while t
- (setq ret (cons (funcall (lambda (ret)
- (setq next (cdr ret))
- (eval (car ret)))
- (read-from-string str next))
- ret)))
- (end-of-file))
- (nreverse ret)))
- (car (my-eval-string (format "%S" '(xr "\\.\\(?:txt\\|tex\\|el\\)\\'"))))
Advertisement