branch: elpa/devil
commit f6ddd7cac1efad6c23c9a6839996edf894f1a633
Author: Susam Pal <su...@susam.net>
Commit: Susam Pal <su...@susam.net>

    Fix undefined error for RET, <f10>, etc.
    
    When the translated key sequence contains multiple letters for the
    non-modifier part, e.g., "RET", "<f10>", the translation is considered
    undefined and it is ignored. This change fixes this issue and now
    supports such translations.
---
 devil.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devil.el b/devil.el
index 24c20a4cec..a50b503e19 100644
--- a/devil.el
+++ b/devil.el
@@ -281,6 +281,7 @@ sequences should be read from the user."
              (devil--set-transient-map (substring described-key -1) binding))
            t)
           (t
+           (devil--log "Undefined key: %s => %s" described-key translated-key)
            (message "Devil: %s is undefined" translated-key)
            t))))
 
@@ -376,7 +377,7 @@ this-command: %s; last-command: %s; 
last-repeatable-command: %s"
   (catch 'break
     (dolist (chunk (split-string translated-key " "))
       (when (or (string= chunk "")
-                (not (string-match-p "^\\(?:[ACHMSs]-\\)*[^ ]?$" chunk))
+                (not (string-match-p "^\\(?:[ACHMSs]-\\)*[^ ]*$" chunk))
                 (string-match-p "\\([ACHMSs]-\\)[^ ]*\\1" chunk))
         (throw 'break t)))))
 

Reply via email to