Skip to content

Commit 627fa5a

Browse files
committed
* lisp/cedet/srecode/insert.el: Use lexical-binding
(srecode-insert-method): No need for lexical-let any more.
1 parent b95a5d1 commit 627fa5a

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

lisp/cedet/srecode/insert.el

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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 -*-
22

33
;; Copyright (C) 2005, 2007-2019 Free Software Foundation, Inc.
44

@@ -26,9 +26,6 @@
2626
;; Manage the insertion process for a template.
2727
;;
2828

29-
(eval-when-compile
30-
(require 'cl)) ;; for `lexical-let'
31-
3229
(require 'srecode/compile)
3330
(require 'srecode/find)
3431
(require 'srecode/dictionary)
@@ -1049,21 +1046,20 @@ template where a ^ inserter occurs."
10491046
;; which implements the wrap insertion behavior in FUNCTION. The
10501047
;; maximum valid nesting depth is just the current depth + 1.
10511048
(let ((srecode-template-inserter-point-override
1052-
(lexical-let ((inserter1 sti))
1053-
(cons
1054-
;; DEPTH
1055-
(+ (length (oref-default 'srecode-template active)) 1)
1056-
;; FUNCTION
1057-
(lambda (dict)
1058-
(let ((srecode-template-inserter-point-override nil))
1059-
(if (srecode-dictionary-lookup-name
1060-
dict (oref inserter1 :object-name))
1061-
;; Insert our sectional part with looping.
1062-
(srecode-insert-method-helper
1063-
inserter1 dict 'template)
1064-
;; Insert our sectional part just once.
1065-
(srecode-insert-subtemplate
1066-
inserter1 dict 'template))))))))
1049+
(cons
1050+
;; DEPTH
1051+
(+ (length (oref-default 'srecode-template active)) 1)
1052+
;; FUNCTION
1053+
(lambda (dict)
1054+
(let ((srecode-template-inserter-point-override nil))
1055+
(if (srecode-dictionary-lookup-name
1056+
dict (oref sti :object-name))
1057+
;; Insert our sectional part with looping.
1058+
(srecode-insert-method-helper
1059+
sti dict 'template)
1060+
;; Insert our sectional part just once.
1061+
(srecode-insert-subtemplate
1062+
sti dict 'template)))))))
10671063
;; Do a regular insertion for an include, but with our override in
10681064
;; place.
10691065
(cl-call-next-method)))

0 commit comments

Comments
 (0)