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:
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(setq gc-cons-threshold (* 128 1024 1024)) ;; 128MiB Increase garbage collection threshold for performance (default 800000)
|
(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
|
;; Increase amount of data read from processes, default 4k
|
||||||
(when (version<= "27.0" emacs-version)
|
(when (version<= "27.0" emacs-version)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package diminish)
|
(use-package diminish)
|
||||||
|
|
||||||
;; Eglot recommends pulling the latest of the standard libraries it
|
;; Eglot recommends pulling the latest of the standard libraries it
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
;; ========== Function to reload current file =================
|
;; ========== Function to reload current file =================
|
||||||
|
|
||||||
(defun reload-file ()
|
(defun reload-file ()
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
;; Add your keys here, as such
|
;; Add your keys here, as such
|
||||||
|
|
||||||
;; Disable the suspend frame hotkeys
|
;; Disable the suspend frame hotkeys
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
;; Set theme
|
;; Set theme
|
||||||
(load-theme 'tango-dark t)
|
(load-theme 'tango-dark t)
|
||||||
(set-face-attribute 'default nil :background "black")
|
(set-face-attribute 'default nil :background "black")
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(package-initialize)
|
(package-initialize)
|
||||||
(use-package use-package
|
(use-package use-package
|
||||||
:custom
|
:custom
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
;; This is an emacs built-in but we're pulling the latest version
|
;; This is an emacs built-in but we're pulling the latest version
|
||||||
:pin gnu
|
:pin gnu
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
(use-package bash-ts-mode
|
(use-package bash-ts-mode
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
|
|
||||||
(use-package cmake-mode
|
(use-package cmake-mode
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(defun d2-format-buffer ()
|
(defun d2-format-buffer ()
|
||||||
"Run prettier."
|
"Run prettier."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package dockerfile-ts-mode
|
(use-package dockerfile-ts-mode
|
||||||
:pin manual
|
:pin manual
|
||||||
:mode (
|
:mode (
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(defun lua-format-buffer ()
|
(defun lua-format-buffer ()
|
||||||
"Run stylua."
|
"Run stylua."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (markdown-mode gfm-mode)
|
:commands (markdown-mode gfm-mode)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package nftables-mode
|
(use-package nftables-mode
|
||||||
:commands nftables-mode
|
:commands nftables-mode
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'color)
|
(require 'color)
|
||||||
(let ((bg (face-attribute 'default :background)))
|
(let ((bg (face-attribute 'default :background)))
|
||||||
(use-package org
|
(use-package org
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(require 'util-tree-sitter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(defun xml-fmt ()
|
(defun xml-fmt ()
|
||||||
"Run xmllint --format."
|
"Run xmllint --format."
|
||||||
(run-command-on-buffer "xmllint" "--format" "-")
|
(run-command-on-buffer "xmllint" "--format" "-")
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(defun yaml-format-buffer ()
|
(defun yaml-format-buffer ()
|
||||||
"Run prettier."
|
"Run prettier."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package flymake
|
(use-package flymake
|
||||||
:pin manual
|
:pin manual
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
|
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
|
||||||
|
|
||||||
(use-package treesit
|
(use-package treesit
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(defun my/minibuffer-delete (arg)
|
(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."
|
"When looking for files, go up an entire directory with the backspace button if theres no text after the directory."
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
|
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
|
||||||
|
|
||||||
(require 'base)
|
(require 'base)
|
||||||
|
|||||||
Reference in New Issue
Block a user