diff options
author | Yuchen Pei <id@ypei.org> | 2024-05-26 19:13:58 +1000 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2024-05-26 19:13:58 +1000 |
commit | 7712bed095945f824d7656c6d6ffa2ab017857dd (patch) | |
tree | 94311a3f962ac6197a2ca8d2f14a6cceb46b8316 | |
parent | b968741db7c1cdc6e3d4489f0991c0c51278aad9 (diff) |
[emacs] only cancel c-m / c-i in gui
-rw-r--r-- | emacs/.emacs.d/init/ycp-editing.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el index 203b185..81a46b1 100644 --- a/emacs/.emacs.d/init/ycp-editing.el +++ b/emacs/.emacs.d/init/ycp-editing.el @@ -38,9 +38,10 @@ (setq window-divider-default-bottom-width 1) (setq line-number-display-limit-width 9999) (setq window-divider-default-places 'bottom-only) -;; don't interpret C-m as RET -(define-key input-decode-map [?\C-m] [C-m]) -(define-key input-decode-map [?\C-i] [C-i]) +;; If run in gui, don't interpret C-m as RET +(when (display-graphic-p) + (define-key input-decode-map [?\C-m] [C-m]) + (define-key input-decode-map [?\C-i] [C-i])) ;; fixme: the line below does not work ;; (define-key input-decode-map [?\C-M-m] [C-M-m]) (setq save-place-file (locate-user-emacs-file "saveplace")) |