Config: add lexical-binding: t to all files.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
;;; early-init.el --- early-init.el -*- lexical-binding: t -*-
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
(setq inhibit-startup-screen t) ; 禁用开始菜单
|
(setq inhibit-startup-screen t) ; 禁用开始菜单
|
||||||
@@ -14,3 +20,5 @@
|
|||||||
(add-to-list 'initial-frame-alist '(fullscreen . maximized))
|
(add-to-list 'initial-frame-alist '(fullscreen . maximized))
|
||||||
;; 之后新建的窗口也默认最大化
|
;; 之后新建的窗口也默认最大化
|
||||||
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
||||||
|
|
||||||
|
;;; early-init.el ends here
|
||||||
|
|||||||
10
init.el
10
init.el
@@ -1,5 +1,9 @@
|
|||||||
;;; init.el
|
;;; init.el --- init.el -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
;; trogloxene's Emacs
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(add-to-list 'load-path
|
(add-to-list 'load-path
|
||||||
(expand-file-name (concat user-emacs-directory "lisp")))
|
(expand-file-name (concat user-emacs-directory "lisp")))
|
||||||
@@ -19,3 +23,5 @@
|
|||||||
(require 'init-kbd)
|
(require 'init-kbd)
|
||||||
(require 'init-ui)
|
(require 'init-ui)
|
||||||
(require 'init-segmentation)
|
(require 'init-segmentation)
|
||||||
|
|
||||||
|
;;; init.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-completion.el
|
;;; init-completion.el --- completion config -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; eglot
|
;; eglot
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
@@ -68,3 +71,5 @@
|
|||||||
(setq treesit-font-lock-level 4))
|
(setq treesit-font-lock-level 4))
|
||||||
|
|
||||||
(provide 'init-completion)
|
(provide 'init-completion)
|
||||||
|
|
||||||
|
;;; init-completion.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-const.el
|
;;; init-const.el --- constant and system stuff -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; 识别操作系统
|
;; 识别操作系统
|
||||||
(defconst *is-mac* (eq system-type 'darwin))
|
(defconst *is-mac* (eq system-type 'darwin))
|
||||||
@@ -33,3 +36,5 @@
|
|||||||
(setq w32-system-coding-system 'utf-8))
|
(setq w32-system-coding-system 'utf-8))
|
||||||
|
|
||||||
(provide 'init-const)
|
(provide 'init-const)
|
||||||
|
|
||||||
|
;;; init-const.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-elpa.el
|
;;; init-elpa.el --- elpa config -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; Clash 代理配置
|
;; Clash 代理配置
|
||||||
(setq url-proxy-services
|
(setq url-proxy-services
|
||||||
@@ -47,3 +50,5 @@
|
|||||||
:hook (after-init . benchmark-init/deactivate))
|
:hook (after-init . benchmark-init/deactivate))
|
||||||
|
|
||||||
(provide 'init-elpa)
|
(provide 'init-elpa)
|
||||||
|
|
||||||
|
;;; init-elpa.el ends here
|
||||||
|
|||||||
@@ -77,4 +77,5 @@
|
|||||||
:state (consult--jump-state)))
|
:state (consult--jump-state)))
|
||||||
|
|
||||||
(provide 'init-jinx)
|
(provide 'init-jinx)
|
||||||
|
|
||||||
;;; init-jinx.el ends here
|
;;; init-jinx.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-kbd.el
|
;;; init-kbd.el --- keybindings -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; 修改mac键位
|
;; 修改mac键位
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
@@ -337,3 +340,5 @@ Disable jinx-mode if it's enable and global-jinx-mode is disable , otherwise tog
|
|||||||
|
|
||||||
|
|
||||||
(provide 'init-kbd)
|
(provide 'init-kbd)
|
||||||
|
|
||||||
|
;;; init-kbd.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-org.el
|
;;; init-org.el --- org-mode config -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(use-package org)
|
(use-package org)
|
||||||
|
|
||||||
@@ -263,7 +266,7 @@ See `org-capture-templates' for more information."
|
|||||||
|
|
||||||
;; 快速部署
|
;; 快速部署
|
||||||
(defun my-blog-publish ()
|
(defun my-blog-publish ()
|
||||||
"publish blog , git add/commit/push , generate commit message"
|
"Publish blog , git add/commit/push , generate commit message."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((blog-dir "d:/emacs/hugo/this-is-my-blog/")
|
(let* ((blog-dir "d:/emacs/hugo/this-is-my-blog/")
|
||||||
(timestamp (format-time-string "%Y-%m-%d %H:%M:%S"))
|
(timestamp (format-time-string "%Y-%m-%d %H:%M:%S"))
|
||||||
@@ -291,11 +294,12 @@ See `org-capture-templates' for more information."
|
|||||||
|
|
||||||
;; 预览博客
|
;; 预览博客
|
||||||
(defun my-blog-preview ()
|
(defun my-blog-preview ()
|
||||||
|
"Save and preview blog."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(let ((default-directory "d:/emacs/hugo/this-is-my-blog/"))
|
(let ((default-directory "d:/emacs/hugo/this-is-my-blog/"))
|
||||||
;; 启动 Hugo server
|
;; 启动 Hugo server
|
||||||
(start-process "hugo-server" "*hugo-server*"
|
(start-process "hugo-server" "*hugo-server*"
|
||||||
"hugo" "server" "-D" "--bind" "0.0.0.0" "--port" "1313")
|
"hugo" "server" "-D" "--bind" "0.0.0.0" "--port" "1313")
|
||||||
;; 等待服务器启动
|
;; 等待服务器启动
|
||||||
(sleep-for 2)
|
(sleep-for 2)
|
||||||
@@ -305,3 +309,5 @@ See `org-capture-templates' for more information."
|
|||||||
(global-set-key (kbd "C-c o v") 'my-blog-preview)
|
(global-set-key (kbd "C-c o v") 'my-blog-preview)
|
||||||
|
|
||||||
(provide 'init-org)
|
(provide 'init-org)
|
||||||
|
|
||||||
|
;;; init-org.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-package.el
|
;;; init-package.el --- major packages -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(setopt use-package-enable-imenu-support t)
|
(setopt use-package-enable-imenu-support t)
|
||||||
|
|
||||||
@@ -207,7 +210,7 @@
|
|||||||
;; 模式行设置
|
;; 模式行设置
|
||||||
(require 'emms-mode-line)
|
(require 'emms-mode-line)
|
||||||
(emms-mode-line-mode 1)
|
(emms-mode-line-mode 1)
|
||||||
(emms-mode-line-blank) ; 初始为空
|
(emms-mode-line-blank) ; 初始为空
|
||||||
|
|
||||||
;; 自定义模式行格式
|
;; 自定义模式行格式
|
||||||
(setq emms-mode-line-format " [%s] ")
|
(setq emms-mode-line-format " [%s] ")
|
||||||
@@ -307,3 +310,5 @@
|
|||||||
(use-package vterm))
|
(use-package vterm))
|
||||||
|
|
||||||
(provide 'init-package)
|
(provide 'init-package)
|
||||||
|
|
||||||
|
;;; init-package.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-segmentation.el
|
;;; init-segmentation.el --- Chinese segmentation config -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; emacs-chinese-word-segmentation 配置
|
;; emacs-chinese-word-segmentation 配置
|
||||||
(when *is-windows*
|
(when *is-windows*
|
||||||
@@ -40,3 +43,5 @@
|
|||||||
(define-key cns-mode-map (kbd "C-<backspace>") nil))
|
(define-key cns-mode-map (kbd "C-<backspace>") nil))
|
||||||
|
|
||||||
(provide 'init-segmentation)
|
(provide 'init-segmentation)
|
||||||
|
|
||||||
|
;;; init-segmentation.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-startup.el
|
;;; init-startup.el --- startup settings -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; mac自动全屏
|
;; mac自动全屏
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
@@ -66,3 +69,5 @@
|
|||||||
(add-hook 'org-mode-hook 'electric-pair-mode)
|
(add-hook 'org-mode-hook 'electric-pair-mode)
|
||||||
|
|
||||||
(provide 'init-startup)
|
(provide 'init-startup)
|
||||||
|
|
||||||
|
;;; init-startup.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-ui.el
|
;;; init-ui.el --- ui and other style customization cofig -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
;; 设置系统编码
|
;; 设置系统编码
|
||||||
(when (fboundp 'set-charset-priority)
|
(when (fboundp 'set-charset-priority)
|
||||||
@@ -120,3 +123,5 @@
|
|||||||
(cnfonts--select-profile "profile1"))
|
(cnfonts--select-profile "profile1"))
|
||||||
|
|
||||||
(provide 'init-ui)
|
(provide 'init-ui)
|
||||||
|
|
||||||
|
;;; init-ui.el ends here
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
;;; init-window.el
|
;;; init-window.el --- windows manage packages -*- lexical-binding: t -*-
|
||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
(use-package popper
|
(use-package popper
|
||||||
:defines popper-echo-dispatch-actions
|
:defines popper-echo-dispatch-actions
|
||||||
@@ -102,3 +105,5 @@
|
|||||||
(use-package es-windows)
|
(use-package es-windows)
|
||||||
|
|
||||||
(provide 'init-window)
|
(provide 'init-window)
|
||||||
|
|
||||||
|
;;; init-window.el ends here
|
||||||
|
|||||||
Reference in New Issue
Block a user