You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
It's not going to be that simple because Emacs Lisp is a Lisp-2 with functions and variables in different namespaces, right? And cl-labels may make lexical bindings instead of dynamic bindings, so that may not work either.
This is a hack to answer "yes" to so
ABD0
me prompts, so the cleanest approach would probably be to find which prompts those are, and see if there are official variables to suppress those prompts.
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:
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 ofsunrise-loop-cmd-loop
. Then the standardread-char
binding is restored at the end.@zonuexe Can we use
(let ((read-char (lambda (&rest _ignored) ?y))) ...)
instead?The text was updated successfully, but these errors were encountered: