aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2024-05-26 19:13:58 +1000
committerYuchen Pei <id@ypei.org>2024-05-26 19:13:58 +1000
commit7712bed095945f824d7656c6d6ffa2ab017857dd (patch)
tree94311a3f962ac6197a2ca8d2f14a6cceb46b8316 /emacs
parentb968741db7c1cdc6e3d4489f0991c0c51278aad9 (diff)
[emacs] only cancel c-m / c-i in gui
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init/ycp-editing.el7
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"))