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

Re: Do Again



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*)))