APPROVE COMMIT
NOTE: This patch has been committed.
I’ve noticed this for a few years; it was a comp.emacs.xemacs posting that
prompted me to look into it more closely. Unfortunately, when resuming a
gnuclient TTY frame, you still need to press C-c to get it to redisplay.
lisp/ChangeLog addition:
2006-08-07 Aidan Kehoe <kehoea(a)parhasard.net>
* frame.el (suspend-or-iconify-emacs):
* frame.el (suspend-emacs-or-iconify-frame):
Elaborate on what the functions do, hopefully preventing
misunderstandings in the future.
* keydefs.el (global-tty-map):
"\C-z" is suspend-or-iconify-emacs on the TTY, not
suspend-emacs. Fixes problems that arose where pressing C-z in a
gnuclient fram suspended the whole process.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/keydefs.el
===================================================================
RCS lisp/frame.el
===================================================================
RCS
Index: lisp/frame.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/frame.el,v
retrieving revision 1.25
diff -u -u -r1.25 frame.el
--- lisp/frame.el 2005/11/13 07:39:28 1.25
+++ lisp/frame.el 2006/08/06 22:09:24
@@ -1548,7 +1548,12 @@
(setq iconification-data (cdr iconification-data))))
(defun suspend-or-iconify-emacs ()
- "Call iconify-emacs if using a window system, otherwise suspend Emacs."
+ "Call iconify-emacs if using a window system, otherwise suspend.
+
+`suspend' here can mean different things; if the current TTY console was
+created by gnuclient, that console is suspended, and the related devices and
+frames are removed from the display. Otherwise the Emacs process as a whole
+is suspended--that is, the traditional Unix suspend takes place. "
(interactive)
(cond ((device-on-window-system-p)
(iconify-emacs))
@@ -1564,7 +1569,12 @@
;; different things depending on window-system. We can't do the same,
;; because we allow simultaneous X and TTY consoles.
(defun suspend-emacs-or-iconify-frame ()
- "Iconify the selected frame if using a window system, otherwise suspend
Emacs."
+ "Iconify the selected frame if using a window system, otherwise suspend.
+
+`suspend' here can mean different things; if the current TTY console was
+created by gnuclient, the console is suspended, and the related devices and
+frames are removed from the display. Otherwise the Emacs process as a whole
+is suspended--that is, the traditional Unix suspend takes place. "
(interactive)
(cond ((device-on-window-system-p)
(iconify-frame))
Index: lisp/keydefs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/keydefs.el,v
retrieving revision 1.18
diff -u -u -r1.18 keydefs.el
--- lisp/keydefs.el 2003/04/28 16:18:23 1.18
+++ lisp/keydefs.el 2006/08/06 22:09:24
@@ -183,7 +183,7 @@
;; FSFmacs keyboard.c
-(define-key global-tty-map "\C-z" 'suspend-emacs)
+(define-key global-tty-map "\C-z" 'suspend-or-iconify-emacs)
(define-key global-window-system-map "\C-z" 'zap-up-to-char)
(define-key global-window-system-map '(control Z) 'iconify-frame)
(define-key global-map "\C-x\C-z" 'suspend-or-iconify-emacs)
--
Santa Maradona, priez pour moi!
Show replies by date