Remove lexical-let

This commit is contained in:
Lars Tveito 2020-03-19 18:43:19 +01:00
parent 62a249e963
commit 5dc6ad0f7c

View File

@ -141,7 +141,7 @@
number, and restore the default value after initialization. number, and restore the default value after initialization.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(lexical-let ((old-gc-treshold gc-cons-threshold)) (let ((old-gc-treshold gc-cons-threshold))
(setq gc-cons-threshold most-positive-fixnum) (setq gc-cons-threshold most-positive-fixnum)
(add-hook 'after-init-hook (add-hook 'after-init-hook
(lambda () (setq gc-cons-threshold old-gc-treshold)))) (lambda () (setq gc-cons-threshold old-gc-treshold))))
@ -395,7 +395,7 @@
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun cycle-themes () (defun cycle-themes ()
"Returns a function that lets you cycle your themes." "Returns a function that lets you cycle your themes."
(lexical-let ((themes '#1=(doom-one-light doom-one . #1#))) (let ((themes '#1=(doom-one-light doom-one . #1#)))
(lambda () (lambda ()
(interactive) (interactive)
;; Rotates the thme cycle and changes the current theme. ;; Rotates the thme cycle and changes the current theme.
@ -579,7 +579,7 @@
"Changes the ispell dictionary to the first element in "Changes the ispell dictionary to the first element in
ISPELL-LANGUAGES, and returns an interactive function that cycles ISPELL-LANGUAGES, and returns an interactive function that cycles
the languages in ISPELL-LANGUAGES when invoked." the languages in ISPELL-LANGUAGES when invoked."
(lexical-let ((ispell-languages '#1=("american" "norsk" . #1#))) (let ((ispell-languages '#1=("american" "norsk" . #1#)))
(ispell-change-dictionary (car ispell-languages)) (ispell-change-dictionary (car ispell-languages))
(lambda () (lambda ()
(interactive) (interactive)
@ -795,7 +795,7 @@
buffer, including the minibuffer and mode line. buffer, including the minibuffer and mode line.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(lexical-let* ((default (face-attribute 'default :height)) (let* ((default (face-attribute 'default :height))
(size default)) (size default))
(defun global-scale-default () (defun global-scale-default ()