home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!opl.com!hri.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!usc!howland.reston.ans.net!spool.mu.edu!agate!apple!goofy!cambridge.apple.com!bill@cambridge.apple.com
- From: bill@cambridge.apple.com (Bill St. Clair)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: Do Again
- Message-ID: <9301261937.AA19387@cambridge.apple.com>
- Date: 26 Jan 93 20:38:49 GMT
- Sender: owner-info-mcl@cambridge.apple.com
- Lines: 16
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
-
- At 18:25 1/25/93 -0600, lynch@ils.nwu.edu wrote:
- >I'm interested in providing a "Do Again" menu-item which will re-issue the
- >most recent menu command...
- >
- >Any suggestions how?
-
- (defvar *last-selected-menu* nil)
-
- (advise menu-item-action
- (setq *last-selected-menu* (car arglist))
- :when :after
- :name *last-selected-menu*)
-
- (defun redo-last-menu-item-action ()
- (when *last-selected-menu*
- (menu-item-action *last-selected-menu*)))
-