summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fidler <matthew.fidler@gmail.com>2023-01-09 13:04:34 -0600
committerMatthew Fidler <matthew.fidler@gmail.com>2023-01-09 13:04:34 -0600
commit65d9779b914fe487011890c06d3a38ffb43d7b2d (patch)
tree7074996d88ab39cd82070c16973310870c5e519a
parent99d8eb99e8f697472b18aa4ddd3cb0ac977f5aca (diff)
More emacs 24 backward changes
-rw-r--r--ergoemacs-advice.el2
-rw-r--r--ergoemacs-mode.el6
2 files changed, 5 insertions, 3 deletions
diff --git a/ergoemacs-advice.el b/ergoemacs-advice.el
index de7756f..08e54e7 100644
--- a/ergoemacs-advice.el
+++ b/ergoemacs-advice.el
@@ -55,7 +55,7 @@
(declare-function ergoemacs-key-description "ergoemacs-key-description")
(defun ergoemacs-advice-substitute-command-keys (orig-fun &rest args)
- "Use `ergoemacs-substitute-command-keys' when `ergoemacs-mode' is enabled"
+ "Use `ergoemacs-substitute-command-keys' when `ergoemacs-mode' is enabled."
(if ergoemacs-mode
(ergoemacs-key-description--substitute-command-keys (nth 0 args))
(funcall orig-fun args)))
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 24b0704..da187df 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -471,8 +471,10 @@ after initializing ergoemacs-mode.
(ergoemacs-mode-regular . ,ergoemacs-keymap)
(ergoemacs-mode-send-emacs-keys . ,ergoemacs--send-emacs-keys-map)))
(add-hook 'emulation-mode-map-alists ergoemacs-override-alist)
- (advice-add 'undefined :around #'ergoemacs-advice-undefined)
- (advice-add 'read-key :around #'ergoemacs-read-key))
+ (unwind-protect
+ (progn
+ (advice-add 'undefined :around #'ergoemacs-advice-undefined)
+ (advice-add 'read-key :around #'ergoemacs-read-key))))
(defun ergoemacs-remove-override-keymap ()
"Remove `ergoemacs-mode' keymaps."