diff options
author | Marius Peter <marius.peter@tutanota.com> | 2021-06-13 09:29:59 -0700 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2021-06-13 09:29:59 -0700 |
commit | a63c4a44da8192dbb29ce0e26cb3d58c60945399 (patch) | |
tree | ead470d0b699d85b7b596dd2b39e9b8ec6de59ca | |
parent | 07867e83f3e2b9e4576ce1c3e2da01453f8963c1 (diff) |
Disabling frame suspending
-rw-r--r-- | smart-documents.org | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/smart-documents.org b/smart-documents.org index d6c4a77..5e63bd4 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -377,12 +377,22 @@ The following bindings lead to more natural window & frame exit behaviors. (global-set-key (kbd "C-q") 'sd-delete-frame-or-kill-emacs) #+END_SRC -*** Disable =C-z= if using a graphical interface +*** Remap =C-z= when using a graphical interface -#+BEGIN_SRC emacs-lisp :tangle yes -(global-unset-key (kbd "C-z")) +By default, =C-z= suspends the editor. This is extremely handy when +the editor is started with the =-nw= option (no window, i.e. launched +in a terminal), because it returns control to the terminal command +line without quitting Emacs---it simply places the Emacs process in +the background. The user may then use the Linux job management tools +to return inside the Emacs process. + +However, when using a graphical display, we have no need for +suspending the frame, so we remap =C-z= to the much more sensible +~undo~ behaviour. -(global-set-key (kbd "C-z C-z") 'suspend-frame) +#+BEGIN_SRC emacs-lisp :tangle yes + (when (display-graphic-p) + (global-set-key (kbd "C-z") 'undo)) #+END_SRC ** Text display |