Commit 5ad3893e authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/loadup.el: Use lexical-binding

parent cb6b810d
Pipeline #10238 passed with stages
in 9 minutes and 47 seconds
;;; loadup.el --- load up standardly loaded Lisp files for Emacs
;;; loadup.el --- load up standardly loaded Lisp files for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1985-1986, 1992, 1994, 2001-2021 Free Software
;; Foundation, Inc.
......@@ -112,7 +112,7 @@
(if (eq t purify-flag)
;; Hash consing saved around 11% of pure space in my tests.
(setq purify-flag (make-hash-table :test 'equal :size 80000)))
(setq purify-flag (make-hash-table :test #'equal :size 80000)))
(message "Using load-path %s" load-path)
......@@ -134,7 +134,7 @@
;; Do it after subr, since both after-load-functions and add-hook are
;; implemented in subr.el.
(add-hook 'after-load-functions (lambda (f) (garbage-collect)))
(add-hook 'after-load-functions (lambda (_) (garbage-collect)))
(load "version")
......@@ -151,7 +151,7 @@
;; variable its advertised default value (it starts as nil, see
;; xdisp.c).
(setq resize-mini-windows 'grow-only)
(setq load-source-file-function 'load-with-code-conversion)
(setq load-source-file-function #'load-with-code-conversion)
(load "files")
;; Load-time macro-expansion can only take effect after setting
......@@ -186,7 +186,7 @@
;; In case loaddefs hasn't been generated yet.
(file-error (load "ldefs-boot.el")))
(let ((new (make-hash-table :test 'equal)))
(let ((new (make-hash-table :test #'equal)))
;; Now that loaddefs has populated definition-prefixes, purify its contents.
(maphash (lambda (k v) (puthash (purecopy k) (purecopy v) new))
......@@ -399,7 +399,7 @@ lost after dumping")))
emacs-repository-branch (ignore-errors (emacs-repository-get-branch)))
;; A constant, so we shouldn't change it with `setq'.
(defconst emacs-build-number
(if versions (1+ (apply 'max versions)) 1))))
(if versions (1+ (apply #'max versions)) 1))))
(message "Finding pointers to doc strings...")
......@@ -429,11 +429,11 @@ lost after dumping")))
;; We keep the load-history data in PURE space.
;; Make sure that the spine of the list is not in pure space because it can
;; be destructively mutated in lread.c:build_load_history.
(setq load-history (mapcar 'purecopy load-history))
(setq load-history (mapcar #'purecopy load-history))
(set-buffer-modified-p nil)
(remove-hook 'after-load-functions (lambda (f) (garbage-collect)))
(remove-hook 'after-load-functions (lambda (_) (garbage-collect)))
(if (boundp 'load--prefer-newer)
......@@ -540,7 +540,7 @@ lost after dumping")))
;; Otherwise, it breaks a lot of code which does things like
;; (or load-file-name byte-compile-current-file).
(setq load-file-name nil)
(eval top-level)
(eval top-level t)
;; Local Variables:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment