Open
Description
package-lint warns:
sunrise-loop.el:212:1: error: "read-char" doesn't start with package's prefix "sunrise-loop".
That function looks like this:
(defun sunrise-loop-cmd-loop ()
"Main execution loop for the background Elisp interpreter."
(sunrise-ad-disable "^sunrise-loop-")
(defun read-char nil ?y) ;; Always answer "yes" to any prompt
(let ((command) (signature))
(while t
(setq command (read))
(setq signature (md5 (prin1-to-string command)))
(condition-case description
(progn
(if sunrise-loop-debug
(message "%s" (concat "[[Executing in background: "
(prin1-to-string command) "]]")))
(eval command)
(message "[[Command successfully invoked in background]]"))
(error (message "%s" (concat "[[*ERROR IN BACKGROUND JOB: "
(prin1-to-string description) "*]]"))))
(message "^%s" signature))))
So it seems it's using a Scheme-style defun-within-a-defun to rebind the standard read-char
function to a different for the duration of sunrise-loop-cmd-loop
. Then the standard read-char
binding is restored at the end.
@zonuexe Can we use (let ((read-char (lambda (&rest _ignored) ?y))) ...)
instead?
Metadata
Metadata
Assignees
Labels
No labels