susam / devil

Emacs minor mode that intercepts and translates keystrokes to provide a modifier-free non-modal editing experience
https://susam.github.io/devil/
Other
167 stars 9 forks source link

The latest version will report an error when entering undefined key #8

Closed zy9306 closed 1 year ago

zy9306 commented 1 year ago
 Debugger entered--Lisp error: (wrong-type-argument commandp nil)
  call-interactively(nil)
  (let ((described-key (key-description key))) (devil--update-command-loop-info key binding) (devil--log-command-loop-info) (if devil-logging (progn (message (concat "Devil: " "Executing command: %s => %s") described-key binding))) (call-interactively binding) (if (devil--repeatable-key-p described-key) (progn (devil--set-transient-map (vector (aref key (1- (length key)))) binding))))
  devil--execute-command([106 99 116] nil)
  (if (eq binding 'devil--undefined) (message "Devil: %s is undefined" translated-key) (devil--execute-command key binding))
  (let* ((result (devil--read-key devil-prompt (this-command-keys))) (key (devil--aget 'key result)) (translated-key (devil--aget 'translated-key result)) (binding (devil--aget 'binding result))) (if devil-logging (progn (message (concat "Devil: " "Read key: %s => %s => %s => %s") key (key-description key) translated-key binding))) (if (eq binding 'devil--undefined) (message "Devil: %s is undefined" translated-key) (devil--execute-command key binding)))
  devil()
  funcall-interactively(devil)
  call-interactively(devil nil nil)
  command-execute(devil)
susam commented 1 year ago

@zy9306 Sorry about this issue which appeared in a recent version of Devil. This looks like an issue introduced in commit e9d2024. I believe commit 4729fb4 should fix this issue.

What does C-h v devil-version RET say on your Emacs? If you are on version 0.5.0-beta3 or older, then could you please upgrade to the latest version, i.e., 0.5.0-beta4 and see if this issue disappears?

zy9306 commented 1 year ago

The latest version is ok now,thanks~