Skip to content

Commit 9d2906c

Browse files
committed
fix: lexical-binding warnings at startup on 30+
A check was added on some recent commit of Emacs 30, where a warning popup is emitted on any file lacking a lexical-binding setting in the file's mode line, like these files.
1 parent b672e69 commit 9d2906c

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

Diff for: c++-mode/.yas-setup.el

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
;; -*- lexical-binding: t -*-
2+
13
(defun doom-snippets-c++-using-std-p ()
24
"Return non-nil if 'using namespace std' is found at the top of this file."
35
(save-excursion

Diff for: doom-snippets.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; doom-snippets.el --- A collection of yasnippet snippets
1+
;;; doom-snippets.el --- A collection of yasnippet snippets -*- lexical-binding: t -*-
22
;;
33
;; Copyright (C) 2017-2024 Henrik Lissner
44
;;

Diff for: emacs-lisp-mode/.yas-setup.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; emacs-lisp-mode/.yas-setup.el
1+
;;; emacs-lisp-mode/.yas-setup.el -*- no-byte-compile: t; lexical-binding: t -*-
22

33
(defvar doom-modules-dir)
44

Diff for: fundamental-mode/.yas-setup.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
;; -*- no-byte-compile: t; -*-
1+
;; -*- no-byte-compile: t; lexical-binding: t; -*-
22
(require 'doom-snippets-lib)

Diff for: prog-mode/.yas-setup.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;; -*- no-byte-compile: t; -*-
1+
;; -*- no-byte-compile: t; lexical-binding: t; -*-
22

33
(require 'yasnippet)
44

@@ -34,4 +34,4 @@
3434
Otherwise the reversed output of function `yas-trimmed-comment-start' is returned."
3535
(if (eq (length comment-end) 0)
3636
(yas-string-reverse (yas-trimmed-comment-start))
37-
(yas-s-trim comment-end)))
37+
(yas-s-trim comment-end)))

Diff for: python-mode/.yas-setup.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;; -*- no-byte-compile: t; -*-
1+
;; -*- no-byte-compile: t; lexical-binding: t -*-
22

33
(defun python-split-args (arg-string)
44
"Split a python argument string into ((name, default)..) tuples"

0 commit comments

Comments
 (0)