🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2179

delete-screen & auto-map-event-handler

#2179
From: snicoud
Date: Wed, 13 Mar 1991 07:03
35 lines
2060 bytes
While experimenting with Kenneth C. Laprade's auto-map-event-handler
(16 Jan 91) I noticed that when a screen is deleted (like when
server-edit is executed (C-xC-#)), a map event is not generated, so
the minibuffer is left mapped.  I've mucked up a version of
'delete-screen' from epoch.el which seems to handle this case.
Perhaps there is a "right way" to do it without having to modify an
existing function.

;;; -----------------------------------------------------------------
;;;	Deleting a Screen
;;;
;;; 3/12/91 (Stephen L Nicoud)
;;;
;;; Screens deleted do not go through unmapping (like when
;;; 'server-edit' is called), so this is a modified version of
;;; delete-screen (as lifted from epoch.el) which will, if no other
;;; Edit screens are mapped, unmap the minibuffer.
;;;
;;; -----------------------------------------------------------------
(defun delete-screen (&optional scr)
  (interactive)
  (let ((the-scr (or scr (current-screen))))
    (mapcar (symbol-function 'remove-screen-from-buffer) (buffer-list)))
  (multiple-value-prog1
      (epoch::delete-screen scr)
    (when (and (not (eq scr (minibuf-screen)))
	       (screen-mapped-p (minibuf-screen))
	       (not (screen-list)))
      (unmap-screen (minibuf-screen)))))

Stephen
--
Stephen L Nicoud  <snicoud@atc.boeing.com>  uw-beaver!bcsaic!snicoud
Boeing Advanced Technology Center for Computer Sciences
Bellevue, Washington  USA
Technical Details
Message-ID: <9103130703.AA03131@moclips.boeing.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,53093d888454df78,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-03-13 14:11:01 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage
From: snicoud@ATC.BOEING.COM
Newsgroups: gnu.epoch.misc
Subject: delete-screen & auto-map-event-handler
Message-ID: <9103130703.AA03131@moclips.boeing.com>
Date: 13 Mar 91 07:03:16 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 35