Article View: gnu.emacs.vm.bug
Article #9643Bug in my vm wrapper
From: Tim McDaniel
Date: Thu, 11 Apr 1991 13:23
Date: Thu, 11 Apr 1991 13:23
45 lines
2164 bytes
2164 bytes
I posted a reply to the "keep my window configuration" question. My
technique uses recursive-edit. Turns out that vm takes one optional
argument, but my replacement didn't, and vm-visit-folder (which I
hardly ever use) calls vm with that argument. The fixed code is
below. I haven't evaluated the other suggestions (using save-window-
configuration?) so I can't say whether this idea is better than the
others.
(defun quit-readmail ()
"Exit VM, and then exit a recursive edit."
(interactive)
(vm-quit)
(exit-recursive-edit)
) ; quit-readmail
(if (not (fboundp 'my-old-vm))
(progn
(load "vm")
(fset 'my-old-vm (symbol-function 'vm))
)
)
(defun vm (&optional arg)
"Read mail in a recursive edit in one window, restoring the old
window pattern at the end of the recursive edit. See the description
of my-old-vm for the original vm function. Like old vm, takes one
optional ARG."
(interactive)
(save-window-excursion
(delete-other-windows)
(save-excursion
(end-rec-edit-message "get other windows back")
(my-old-vm arg)
(define-key vm-mode-map "q" 'quit-readmail)
(recursive-edit)
)
)
) ; vm
--
"Of course he has a knife. We all have knives. It's 1183, and we're
all barbarians."
Tim McDaniel Applied Dynamics Int'l.; Ann Arbor, Michigan, USA
Internet: mcdaniel@adi.com UUCP: {uunet,sharkey}!amara!mcdaniel
Technical Details
Message-ID:
<MCDANIEL.91Apr11092336@dolphin.adi.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!caen!umich!sharkey!amara!mcdanielShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,3be5c90a3fe2c6e8,start X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1991-04-11 21:36:13 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!caen!umich!sharkey!amara!mcdaniel From: mcdaniel@adi.com (Tim McDaniel) Newsgroups: gnu.emacs.vm.bug Subject: Bug in my vm wrapper Message-ID: <MCDANIEL.91Apr11092336@dolphin.adi.com> Date: 11 Apr 91 13:23:36 GMT Sender: news@adi.COM Distribution: gnu Organization: Applied Dynamics International, Inc.; Ann Arbor, Michigan, USA Lines: 45