[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mac OS X lacks iconify-or-deiconify-frame

From: Sudish Joseph
Subject: Mac OS X lacks iconify-or-deiconify-frame
Date: Thu, 27 Mar 2003 16:35:42 -0500

In GNU Emacs (powerpc-apple-darwin6.4)
 of 2003-03-27 on futiliti.eng.atl.earthlink.net
configured using `configure '--without-x' '--prefix=/usr/local''

(Code pulled from cvs on March 27th; built using mac/make-package -sc.)

The function iconify-or-deiconify-frame isn't defined under Mac OS X,
but is defined under X Windows and Windows.  This causes packages
that use this routine (such as viper) to fail.  The patch below adds
this routine to mac-win.el, mirroring other windowing systems.

This routine is quite generic, as are the versions for the other
window systems.  It might be best to move its definition out of
windowing-system-specific files and into a more platform-independent

Patch follows.


--- mac-win.el  Fri Oct  4 11:03:02 2002
+++ mac-win.el  Fri Dec  6 22:44:26 2002
@@ -171,6 +171,13 @@
          '(lambda ()
             (defvar mac-ready-for-drag-n-drop t)))
+(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)))
 ; Define constant values to be set to mac-keyboard-text-encoding
 (defconst kTextEncodingMacRoman 0)
 (defconst kTextEncodingISOLatin1 513 "0x201")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]