diff --git a/eaf.el b/eaf.el index 3335880..2c6c0ce 100644 --- a/eaf.el +++ b/eaf.el @@ -1133,7 +1133,9 @@ to edit EAF keybindings!" fun fun))) "Similar to `set', but store SYM with VAL in EAF Python side, and return VAL. For convenience, use the Lisp macro `eaf-setq' instead." - (map-put eaf-var-list sym val) + (if (version< emacs-version "27") + (map-put eaf-var-list sym val) + (map-put! eaf-var-list sym val)) (when (process-live-p eaf-process) ;; Update python side variable dynamically. (eaf-call "update_emacs_var_dict" (eaf-serialization-var-list))) @@ -1160,11 +1162,15 @@ KEY is a string representing a sequence of keystrokes and events. EAF-APP-KEYBINDING is one of the `eaf--keybinding' variables, where can be obtained by checking the value of `eaf--buffer-app-name' inside the EAF buffer." - `(map-put ,eaf-app-keybinding ,key + (if (version< emacs-version "27") + `(map-put ,eaf-app-keybinding ,key ,(if (string-match "_" (symbol-name command)) (symbol-name command) - `(quote ,command)) #'equal)) - + `(quote ,command)) #'equal) + `(map-put! ,eaf-app-keybinding ,key + ,(if (string-match "_" (symbol-name command)) + (symbol-name command) + `(quote ,command)) #'equal))) (dbus-register-signal :session "com.lazycat.eaf" "/com/lazycat/eaf"