Browse Source

New macro: Evaluate FORM in ENVIRONMENT

* org-macs.el (org-eval-in-environment): New macro. Evaluate FORM in
ENVIRONMENT.
David Maus 13 years ago
parent
commit
5423b329c1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lisp/org-macs.el

+ 4 - 0
lisp/org-macs.el

@@ -380,6 +380,10 @@ The number of levels is controlled by `org-inlinetask-min-level'"
       (format-seconds string seconds)
     (format-time-string string (seconds-to-time seconds))))
 
+(defmacro org-eval-in-environment (environment form)
+  `(eval (list 'let ,environment ',form)))
+(put 'org-eval-in-environment 'lisp-indent-function 1)
+
 (provide 'org-macs)
 
 ;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668