home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0280.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  497 b   |  15 lines

  1. Oh, the shame etc.  Here's eval-in-window, it should have been in event-loc.el:
  2.  
  3.  (defmacro eval-in-window (window &rest forms)
  4.    "Switch to WINDOW, evaluate FORMS, return to original window."
  5.    (` (let ((OriginallySelectedWindow (selected-window)))
  6.     (unwind-protect
  7.         (progn
  8.           (select-window (, window))
  9.           (,@ forms))
  10.       (select-window OriginallySelectedWindow)))))
  11.  (put 'eval-in-window 'lisp-indent-hook 1)
  12.  
  13. Sorry for any confusion.  Thanks to Kit Powell for pointing this out.
  14.  
  15.