aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2019-05-22 23:29:17 -0400
committerStefan Monnier2019-05-22 23:29:17 -0400
commit627fa5a0cb8aa57b9c419d3bc0ae749cd573fd52 (patch)
treeb496e833f3726e3ab4ddff6cab4911d8d776e7b9 /lisp
parentb95a5d194b21254a6e41561621498be9f29cf08f (diff)
downloademacs-627fa5a0cb8aa57b9c419d3bc0ae749cd573fd52.tar.gz
emacs-627fa5a0cb8aa57b9c419d3bc0ae749cd573fd52.zip
* lisp/cedet/srecode/insert.el: Use lexical-binding
(srecode-insert-method): No need for lexical-let any more.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/srecode/insert.el34
1 files changed, 15 insertions, 19 deletions
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index 26af2ffe2ef..a7445ea401a 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -1,4 +1,4 @@
1;;; srecode/insert.el --- Insert srecode templates to an output stream. 1;;; srecode/insert.el --- Insert srecode templates to an output stream -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 2005, 2007-2019 Free Software Foundation, Inc. 3;; Copyright (C) 2005, 2007-2019 Free Software Foundation, Inc.
4 4
@@ -26,9 +26,6 @@
26;; Manage the insertion process for a template. 26;; Manage the insertion process for a template.
27;; 27;;
28 28
29(eval-when-compile
30 (require 'cl)) ;; for `lexical-let'
31
32(require 'srecode/compile) 29(require 'srecode/compile)
33(require 'srecode/find) 30(require 'srecode/find)
34(require 'srecode/dictionary) 31(require 'srecode/dictionary)
@@ -1049,21 +1046,20 @@ template where a ^ inserter occurs."
1049 ;; which implements the wrap insertion behavior in FUNCTION. The 1046 ;; which implements the wrap insertion behavior in FUNCTION. The
1050 ;; maximum valid nesting depth is just the current depth + 1. 1047 ;; maximum valid nesting depth is just the current depth + 1.
1051 (let ((srecode-template-inserter-point-override 1048 (let ((srecode-template-inserter-point-override
1052 (lexical-let ((inserter1 sti)) 1049 (cons
1053 (cons 1050 ;; DEPTH
1054 ;; DEPTH 1051 (+ (length (oref-default 'srecode-template active)) 1)
1055 (+ (length (oref-default 'srecode-template active)) 1) 1052 ;; FUNCTION
1056 ;; FUNCTION 1053 (lambda (dict)
1057 (lambda (dict) 1054 (let ((srecode-template-inserter-point-override nil))
1058 (let ((srecode-template-inserter-point-override nil)) 1055 (if (srecode-dictionary-lookup-name
1059 (if (srecode-dictionary-lookup-name 1056 dict (oref sti :object-name))
1060 dict (oref inserter1 :object-name)) 1057 ;; Insert our sectional part with looping.
1061 ;; Insert our sectional part with looping. 1058 (srecode-insert-method-helper
1062 (srecode-insert-method-helper 1059 sti dict 'template)
1063 inserter1 dict 'template) 1060 ;; Insert our sectional part just once.
1064 ;; Insert our sectional part just once. 1061 (srecode-insert-subtemplate
1065 (srecode-insert-subtemplate 1062 sti dict 'template)))))))
1066 inserter1 dict 'template))))))))
1067 ;; Do a regular insertion for an include, but with our override in 1063 ;; Do a regular insertion for an include, but with our override in
1068 ;; place. 1064 ;; place.
1069 (cl-call-next-method))) 1065 (cl-call-next-method)))