外观
Emacs
约 238 字小于 1 分钟
2025-09-16
Happy hacking emacs ~
EIEIO
- https://www.gnu.org/software/emacs/manual/html_node/eieio/
使用 telega
- 编译tdlib: https://tdlib.github.io/td/build.html?language=C
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gperf cmake openssl
git clone https://github.com/tdlib/td.git
cd td
rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..
cmake --build . --target install -j $(nproc)
cd ..
cd ..
ls -l td/tdlib
常用的库
- hash-table: https://github.com/Wilfred/ht.el.git
设置 major mode
(kill-all-local-variables)
(setq major-mode 'geekblog-mode)
(setq mode-name "Geekblog")
(use-local-map geekblog-mode-map)
(run-mode-hooks 'geekblog-mode-hook)
keymap 优先级
- overriding-terminal-local-map
- overriding-local-map
- text property 的 'keymap
- emulation-mode-map-alists
- minor-mode-overriding-map-alist
- minor-mode-map-alist (Minor Mode)
- text property 的 'local-map
- (current-local-map) (Major Mode)
- (current-global-map) (Global Map)
shell
shell-file-name
最主要的变量,指定了默认的 shell 可执行文件路径。
默认值:
- Unix/Linux/macOS:/bin/sh
- Windows:cmdproxy.exe(Emacs 自带的简化命令行)
explicit-shell-file-name
当显式调用 shell 时(如 M-x shell)使用的 shell;如果未设置,则使用 shell-file-name