Use lexical binding in elisp files.

This silences a warning for each of these files. Lexical binding will become the default in a future version of emacs.
This commit is contained in:
Tom Alexander
2026-09-12 21:00:26 -04:00
parent 450478cff4
commit 4a6cbfad67
28 changed files with 29 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(setq gc-cons-threshold (* 128 1024 1024)) ;; 128MiB Increase garbage collection threshold for performance (default 800000)
;; Increase amount of data read from processes, default 4k
(when (version<= "27.0" emacs-version)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package diminish)
;; Eglot recommends pulling the latest of the standard libraries it

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
;; ========== Function to reload current file =================
(defun reload-file ()

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
;; Add your keys here, as such
;; Disable the suspend frame hotkeys

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
;; Set theme
(load-theme 'tango-dark t)
(set-face-attribute 'default nil :background "black")

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(package-initialize)
(use-package use-package
:custom

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package eglot
;; This is an emacs built-in but we're pulling the latest version
:pin gnu

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'util-tree-sitter)
(use-package bash-ts-mode

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(use-package cmake-mode

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defun d2-format-buffer ()
"Run prettier."
(interactive)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package dockerfile-ts-mode
:pin manual
:mode (

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defun lua-format-buffer ()
"Run stylua."
(interactive)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package markdown-mode
:ensure t
:commands (markdown-mode gfm-mode)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package nftables-mode
:commands nftables-mode
)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'color)
(let ((bg (face-attribute 'default :background)))
(use-package org

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(require 'common-lsp)
(require 'util-tree-sitter)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defun xml-fmt ()
"Run xmllint --format."
(run-command-on-buffer "xmllint" "--format" "-")

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defun yaml-format-buffer ()
"Run prettier."
(interactive)

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(use-package flymake
:pin manual
:ensure nil

View File

@@ -1,3 +1,5 @@
;; -*- lexical-binding: t; -*-
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
(use-package treesit

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defun my/minibuffer-delete (arg)
"When looking for files, go up an entire directory with the backspace button if theres no text after the directory."
(interactive "p")

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
(require 'base)