home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / mcl / 2105 < prev    next >
Encoding:
Text File  |  1993-01-27  |  942 b   |  27 lines

  1. 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
  2. From: bill@cambridge.apple.com (Bill St. Clair)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: Do Again
  5. Message-ID: <9301261937.AA19387@cambridge.apple.com>
  6. Date: 26 Jan 93 20:38:49 GMT
  7. Sender: owner-info-mcl@cambridge.apple.com
  8. Lines: 16
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. At 18:25 1/25/93 -0600, lynch@ils.nwu.edu wrote:
  12. >I'm interested in providing a "Do Again" menu-item which will re-issue the
  13. >most recent menu command...
  14. >
  15. >Any suggestions how?
  16.  
  17. (defvar *last-selected-menu* nil)
  18.  
  19. (advise menu-item-action
  20.         (setq *last-selected-menu* (car arglist))
  21.         :when :after
  22.         :name *last-selected-menu*)
  23.  
  24. (defun redo-last-menu-item-action ()
  25.   (when *last-selected-menu*
  26.     (menu-item-action *last-selected-menu*)))
  27.