映屿

Recent content on 映屿

马上订阅 映屿 RSS 更新: https://www.yingyu5658.me/atom.xml

初折腾Emacs记录

2025年4月13日 20:15

基础配置

Windows下需要在软件顶部Toolbar的Options中随便更改一个选项,然后再点Save Options,这样就会再C:\Users\Username\appdata\Roaming\下生成.emacs和.emacs.d/

在emacs.d中新建一个文件init.el,填写如下配置

;;; init.el --- Load the full configuration -*- lexical-binding: t -*-
;;; Commentary:

;; This file bootstraps the configuration, which is divided into
;; a number of other files.

;;; Code:

(let ((minver "25.1"))
 (when (version< emacs-version minver)
  (error "Your Emacs is too old -- this config requires v%s or higher" minver)))
(when (version< emacs-version "26.1")
 (message "Your Emacs is old, and some functionality in this config will be disabled. Please upgrade if possible."))

(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) ; 设定源码加载路径
;; (require 'init-benchmarking) ;; Measure startup time

(defconst *spell-check-support-enabled* nil) ;; Enable with t if you prefer
(defconst *is-a-mac* (eq system-type 'darwin))

;; Adjust garbage collection thresholds during startup, and thereafter

(let ((normal-gc-cons-threshold (* 20 1024 1024))
   (init-gc-cons-threshold (* 128 1024 1024)))
 (setq gc-cons-threshold init-gc-cons-threshold)
 (add-hook 'emacs-startup-hook
      (lambda () (setq gc-cons-threshold normal-gc-cons-threshold))))




;; ==========================================================================================================
;; ===========================================日常使用配置===================================================
;; ==========================================================================================================
(setq confirm-kill-emacs #'...

剩余内容已隐藏

查看完整文章以阅读更多