Emacs プラグイン setup.el は、安全・爆速な設定ファイルを書くためのマク ロ集です。
ここでいう「安全」とは、「セットアップの途中でエラーが出て、ほとんどデ フォルトの Emacs が立ち上がる」ような悲劇が起きないことをいいます。
setup.el を使って書かれた設定ファイルがどれくらい爆速かというと、 5000 行以上の設定が入った Emacs が 0.29 秒でセットアップできるくらい爆速です。
| ;; Usage: | |
| ;; (require 'indent-guide2) | |
| ;; (indent-guide2-global-mode) | |
| (require 'cl-lib) | |
| (defvar indent-guide2-line-color "#303030") | |
| (defvar indent-guide2-line-dash-length nil) | |
| (defvar indent-guide2-line-char ?\|) | |
| (defvar indent-guide2-line-enable-xpm t) |
bound to <f11> and M-<f10>, respectively.
あれっ、これでいいじゃん
windows and frames. The new option `temp-buffer-max-width’ allows you to control the width of temporary buffer windows. Moreover, if the new
| ;; Usage: M-x genshify-region | |
| (defun genshify-string (str) | |
| (let ((res (shell-command-to-string | |
| (concat "echo " (shell-quote-argument str) "| /usr/local/bin/mecab")))) | |
| (mapconcat 'identity | |
| (delq nil | |
| (mapcar (lambda (line) | |
| (cond ((string-match "助詞\\|接頭詞\\|非自立\\|^\\(EOS\\)?$" line) nil) | |
| ((string-match "*$" line) (car (split-string line))) |
| { | |
| "title": "ビール雑学", | |
| "shuffle": true, | |
| "author": { | |
| "text": "zk-phi", | |
| "url": "https://zk-phi.github.io/" | |
| }, | |
| "problems": [ | |
| { | |
| "body": "1994年の酒税法改正後初めてビール醸造に参入し、地ビール第1号となった新潟のビールブランドといえば、その地域のかつての行政区分から「何ビール」という?", |
| { | |
| "title": "IIDX カルトクイズ", | |
| "description": "マイナー曲名などを答えるクイズです。曲名は綴りまで正確に入力してください (スペース、大文字小文字の区別は不要です)。", | |
| "shuffle": true, | |
| "author": { | |
| "text": "zk-phi", | |
| "url": "https://zk-phi.github.io/" | |
| }, | |
| "problems": [ | |
| { |
| (require 'macroexp) | |
| (defun read-and-macroexpand-all (stream) | |
| (ignore-errors | |
| (cons (macroexpand-all (read stream)) | |
| (read-and-macroexpand-all stream)))) | |
| (defun macroexpand-file (src dest) | |
| "ファイル SRC 内のすべてのフォームをマクロ展開して、ファイル DEST に保存する" | |
| (let ((forms (with-temp-buffer |
| #!emacs --script | |
| ;; Compare two directory recursively to find updated/outdated files. | |
| ;; | |
| ;; Dependencies: | |
| ;; - brew install --cask emacs | |
| ;; - brew install xxh | |
| ;; | |
| ;; Usage: | |
| ;; - ./comparator.el /path/to/directory/A /path/to/directory/B > output |