emacs-diffs
[Top][All Lists]
Advanced

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

master 2e907f6df7e 3/5: * lisp/tempo.el: Remove left over uses of the dy


From: Stefan Monnier
Subject: master 2e907f6df7e 3/5: * lisp/tempo.el: Remove left over uses of the dynbind dialect
Date: Fri, 8 Sep 2023 19:44:37 -0400 (EDT)

branch: master
commit 2e907f6df7e27db19589d8f3617668c6f54ed743
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/tempo.el: Remove left over uses of the dynbind dialect
    
    * lisp/tempo.el (tempo-define-template): Use a real closure.
    (tempo-insert, tempo-build-collection): Use lexical scoping.
---
 lisp/tempo.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/lisp/tempo.el b/lisp/tempo.el
index 7e4f5e50e47..7d8d17cfebc 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -271,14 +271,13 @@ The elements in ELEMENTS can be of several types:
                                       name)))
         (command-name template-name))
     (set template-name elements)
-    (fset command-name (list 'lambda (list '&optional 'arg)
-                            (or documentation
-                                (concat "Insert a " name "."))
-                            (list 'interactive "*P")
-                            (list 'tempo-insert-template (list 'quote
-                                                               template-name)
-                                  (list 'if 'tempo-insert-region
-                                        (list 'not 'arg) 'arg))))
+    (fset command-name (lambda (&optional arg)
+                        (:documentation
+                         (or documentation (concat "Insert a " name ".")))
+                        (interactive "*P")
+                        (tempo-insert-template template-name
+                                               (if tempo-insert-region
+                                                   (not arg) arg))))
     (and tag
         (tempo-add-tag tag template-name taglist))
     command-name))
@@ -386,7 +385,7 @@ possible."
                             (open-line 1)))
        ((null element))
        (t (tempo-insert (or (tempo-is-user-element element)
-                            (eval element))
+                            (eval element t))
                         on-region))))
 
 ;;;
@@ -632,7 +631,7 @@ If `tempo-dirty-collection' is nil, the old collection is 
reused."
                                        ; If the format for
                                        ; tempo-local-tags changes,
                                        ; change this
-                                 (eval (car tag-list)))
+                                 (eval (car tag-list) t))
                               tempo-local-tags))))
     (setq tempo-dirty-collection nil)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]