changeset 4313:87472f1eb031

(iconify-or-deiconify-frame): New function. Use it for C-z.
author Richard M. Stallman <rms@gnu.org>
date Tue, 27 Jul 1993 21:58:54 +0000
parents 4faf8d99ef4a
children 59aa39575936
files lisp/term/x-win.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/x-win.el	Tue Jul 27 20:21:14 1993 +0000
+++ b/lisp/term/x-win.el	Tue Jul 27 21:58:54 1993 +0000
@@ -459,7 +459,15 @@
 
 ;;;; Function keys
 
-(substitute-key-definition 'suspend-emacs 'iconify-frame global-map)
+(defun iconify-or-deiconify-frame ()
+  "Iconify the selected frame, or deiconify if it's currently an icon."
+  (interactive)
+  (if (eq (cdr (assq 'visibility (frame-parameters))) t)
+      (iconify-frame)
+    (make-frame-visible)))
+
+(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
+			   global-map)
 
 ;; Map certain keypad keys into ASCII characters
 ;; that people usually expect.