summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/generic.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-01-28 14:42:21 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-01-28 14:42:21 -0500
commit991c8946b6e9c87403dc2691100566cb98577de1 (patch)
tree9f354a1b985021300b731427166c4ca0899e5046 /lisp/emacs-lisp/generic.el
parentc8c4d65d6510724acd40527a9af67e21e3cf4d5e (diff)
downloademacs-991c8946b6e9c87403dc2691100566cb98577de1.tar.gz
Use lexical-binding in all of `lisp/emacs-lisp`
* lisp/emacs-lisp/bindat.el: Use lexical-binding. (bindat--unpack-group, bindat--length-group, bindat--pack-group): Declare `last` and `tag` as dyn-scoped. (bindat-unpack, bindat-pack): Bind `bindat-raw` and `bindat-idx` via `let` rather than via the formal arglist. * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/generic.el: * lisp/emacs-lisp/eieio-opt.el: * lisp/emacs-lisp/derived.el: * lisp/emacs-lisp/crm.el: Use lexical-binding. * lisp/emacs-lisp/helper.el: Use lexical-binding. (Helper-help-map): Move initialization into declaration. * lisp/emacs-lisp/regi.el: Use lexical-binding. (regi-interpret): Remove unused var `tstart`. Declare `curframe`, `curentry` and `curline` as dyn-scoped. * lisp/emacs-lisp/shadow.el: Use lexical-binding. (load-path-shadows-find): Remove unused var `file`. Tighten a regexp, use `push`. * lisp/emacs-lisp/tcover-ses.el: Use lexical-binding. Require `ses`. Remove correspondingly redundant declarations. (ses--curcell-overlay): Declare. (ses-exercise): Use `dlet` and use a properly-prefixed var name. Fix name of `curcell-overlay` variable. * lisp/emacs-lisp/unsafep.el: Use lexical-binding. (unsafep): Bind `unsafep-vars` via `let` rather than via the formal arglist.
Diffstat (limited to 'lisp/emacs-lisp/generic.el')
-rw-r--r--lisp/emacs-lisp/generic.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index 93f780eac2f..6db1bbbb224 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -1,4 +1,4 @@
-;;; generic.el --- defining simple major modes with comment and font-lock
+;;; generic.el --- defining simple major modes with comment and font-lock -*- lexical-binding: t; -*-
;;
;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc.
;;
@@ -245,7 +245,6 @@ Some generic modes are defined in `generic-x.el'."
"Set up comment functionality for generic mode."
(let ((chars nil)
(comstyles)
- (comstyle "")
(comment-start nil))
;; Go through all the comments.
@@ -269,14 +268,16 @@ Some generic modes are defined in `generic-x.el'."
;; Store the relevant info but don't update yet.
(push (cons c0 (concat (cdr (assoc c0 chars)) "1")) chars)
(push (cons c1 (concat (cdr (assoc c1 chars))
- (concat "2" comstyle))) chars)))
+ (concat "2" comstyle)))
+ chars)))
(if (= (length end) 1)
(modify-syntax-entry (aref end 0)
(concat ">" comstyle) st)
(let ((c0 (aref end 0)) (c1 (aref end 1)))
;; Store the relevant info but don't update yet.
(push (cons c0 (concat (cdr (assoc c0 chars))
- (concat "3" comstyle))) chars)
+ (concat "3" comstyle)))
+ chars)
(push (cons c1 (concat (cdr (assoc c1 chars)) "4")) chars)))))
;; Process the chars that were part of a 2-char comment marker