aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2021-04-10 16:58:11 -0400
committerStefan Monnier2021-04-10 16:58:11 -0400
commit5ad3893ebaf8190e1e262caf33bc736e79a0d07b (patch)
tree170b7a6b60e8b84496337318c486fb836efde847
parentcb6b810dfd721894cb8843e8b2a96b93ae4edce4 (diff)
downloademacs-5ad3893ebaf8190e1e262caf33bc736e79a0d07b.tar.gz
emacs-5ad3893ebaf8190e1e262caf33bc736e79a0d07b.zip
* lisp/loadup.el: Use lexical-binding
-rw-r--r--lisp/loadup.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 4a0b8f508c7..d6cfcd6fc81 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -1,4 +1,4 @@
1;;; loadup.el --- load up standardly loaded Lisp files for Emacs 1;;; loadup.el --- load up standardly loaded Lisp files for Emacs -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1985-1986, 1992, 1994, 2001-2021 Free Software 3;; Copyright (C) 1985-1986, 1992, 1994, 2001-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -112,7 +112,7 @@
112 112
113(if (eq t purify-flag) 113(if (eq t purify-flag)
114 ;; Hash consing saved around 11% of pure space in my tests. 114 ;; Hash consing saved around 11% of pure space in my tests.
115 (setq purify-flag (make-hash-table :test 'equal :size 80000))) 115 (setq purify-flag (make-hash-table :test #'equal :size 80000)))
116 116
117(message "Using load-path %s" load-path) 117(message "Using load-path %s" load-path)
118 118
@@ -134,7 +134,7 @@
134 134
135;; Do it after subr, since both after-load-functions and add-hook are 135;; Do it after subr, since both after-load-functions and add-hook are
136;; implemented in subr.el. 136;; implemented in subr.el.
137(add-hook 'after-load-functions (lambda (f) (garbage-collect))) 137(add-hook 'after-load-functions (lambda (_) (garbage-collect)))
138 138
139(load "version") 139(load "version")
140 140
@@ -151,7 +151,7 @@
151;; variable its advertised default value (it starts as nil, see 151;; variable its advertised default value (it starts as nil, see
152;; xdisp.c). 152;; xdisp.c).
153(setq resize-mini-windows 'grow-only) 153(setq resize-mini-windows 'grow-only)
154(setq load-source-file-function 'load-with-code-conversion) 154(setq load-source-file-function #'load-with-code-conversion)
155(load "files") 155(load "files")
156 156
157;; Load-time macro-expansion can only take effect after setting 157;; Load-time macro-expansion can only take effect after setting
@@ -186,7 +186,7 @@
186 ;; In case loaddefs hasn't been generated yet. 186 ;; In case loaddefs hasn't been generated yet.
187 (file-error (load "ldefs-boot.el"))) 187 (file-error (load "ldefs-boot.el")))
188 188
189(let ((new (make-hash-table :test 'equal))) 189(let ((new (make-hash-table :test #'equal)))
190 ;; Now that loaddefs has populated definition-prefixes, purify its contents. 190 ;; Now that loaddefs has populated definition-prefixes, purify its contents.
191 (maphash (lambda (k v) (puthash (purecopy k) (purecopy v) new)) 191 (maphash (lambda (k v) (puthash (purecopy k) (purecopy v) new))
192 definition-prefixes) 192 definition-prefixes)
@@ -399,7 +399,7 @@ lost after dumping")))
399 emacs-repository-branch (ignore-errors (emacs-repository-get-branch))) 399 emacs-repository-branch (ignore-errors (emacs-repository-get-branch)))
400 ;; A constant, so we shouldn't change it with `setq'. 400 ;; A constant, so we shouldn't change it with `setq'.
401 (defconst emacs-build-number 401 (defconst emacs-build-number
402 (if versions (1+ (apply 'max versions)) 1)))) 402 (if versions (1+ (apply #'max versions)) 1))))
403 403
404 404
405(message "Finding pointers to doc strings...") 405(message "Finding pointers to doc strings...")
@@ -429,11 +429,11 @@ lost after dumping")))
429;; We keep the load-history data in PURE space. 429;; We keep the load-history data in PURE space.
430;; Make sure that the spine of the list is not in pure space because it can 430;; Make sure that the spine of the list is not in pure space because it can
431;; be destructively mutated in lread.c:build_load_history. 431;; be destructively mutated in lread.c:build_load_history.
432(setq load-history (mapcar 'purecopy load-history)) 432(setq load-history (mapcar #'purecopy load-history))
433 433
434(set-buffer-modified-p nil) 434(set-buffer-modified-p nil)
435 435
436(remove-hook 'after-load-functions (lambda (f) (garbage-collect))) 436(remove-hook 'after-load-functions (lambda (_) (garbage-collect)))
437 437
438(if (boundp 'load--prefer-newer) 438(if (boundp 'load--prefer-newer)
439 (progn 439 (progn
@@ -540,7 +540,7 @@ lost after dumping")))
540;; Otherwise, it breaks a lot of code which does things like 540;; Otherwise, it breaks a lot of code which does things like
541;; (or load-file-name byte-compile-current-file). 541;; (or load-file-name byte-compile-current-file).
542(setq load-file-name nil) 542(setq load-file-name nil)
543(eval top-level) 543(eval top-level t)
544 544
545 545
546;; Local Variables: 546;; Local Variables: