userapps:emacs
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| userapps:emacs [2025/02/26 19:00] – [macOS] seirios | userapps:emacs [2026/01/28 08:31] (現在) – [macOS] seirios | ||
|---|---|---|---|
| 行 52: | 行 52: | ||
| < | < | ||
| + | $ mkdir ~/ | ||
| + | $ vi ~/ | ||
| + | icon: modern-pen | ||
| + | patches: | ||
| + | - aggressive-read-buffering | ||
| + | - frame-transparency | ||
| + | - mac-font-use-typo-metrics | ||
| $ brew tap d12frosted/ | $ brew tap d12frosted/ | ||
| $ brew edit emacs-plus@31 # | $ brew edit emacs-plus@31 # | ||
| 行 59: | 行 66: | ||
| # | # | ||
| - | opoo "The option --with-no-frame-refocus | + | opoo "The option --with-imagemagick |
| - | local_patch " | + | local_patch " |
| - | local_patch " | + | local_patch " |
| - | local_patch " | + | # Added by seirios |
| patch do | patch do | ||
| url " | url " | ||
| end | end | ||
| + | |||
| + | # | ||
| + | # Install | ||
| + | # | ||
| .... configuration .... | .... configuration .... | ||
| - | $ brew install emacs-plus@31 --with-dbus --with-imagemagick --with-ctags --with-c9rgreen-sonoma-icon | + | $ brew install |
| - | $ osascript -e 'tell application " | + | $ osascript -e 'tell application " |
| - | $ sudo codesign --force --deep --sign - /usr/local/ | + | $ sudo codesign --force --deep --sign - /opt/homebrew/ |
| $ brew services start d12frosted/ | $ brew services start d12frosted/ | ||
| </ | </ | ||
| ここまでを実行すると、 | ここまでを実行すると、 | ||
| - | * / | + | * / |
| * LaunchPad にEmacsアイコンが追加され、 | * LaunchPad にEmacsアイコンが追加され、 | ||
| * 起動項目にemacsが追加され、 | * 起動項目にemacsが追加され、 | ||
| 行 105: | 行 116: | ||
| <WRAP info round> | <WRAP info round> | ||
| '' | '' | ||
| - | '' | + | <del>'' |
| </ | </ | ||
| 行 143: | 行 154: | ||
| このinit.elは、byte-compileするとgo-translate関連の変数が未定義扱いになる。 | このinit.elは、byte-compileするとgo-translate関連の変数が未定義扱いになる。 | ||
| 本来は'': | 本来は'': | ||
| + | <code lisp early-init.el> | ||
| + | ;;; -*- lexical-binding: | ||
| + | ;;; ~/ | ||
| + | ;;; | ||
| + | ;;; last updated: 2026/01/02 | ||
| + | ;;; Author: HEO SeonMeyong < | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ;;; log | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ;;; 2026/ | ||
| + | |||
| + | ;; 起動直後は GC を後ろ倒し(起動後に元へ戻す) | ||
| + | (setq gc-cons-threshold most-positive-fixnum) | ||
| + | (add-hook ' | ||
| + | |||
| + | ;; package.el は自動では有効化しない(init.el側で initialize) | ||
| + | (setq package-enable-at-startup nil) | ||
| + | |||
| + | ;; フレームの暗黙のリサイズ抑制(ちらつき防止) | ||
| + | (setq frame-inhibit-implied-resize t) | ||
| + | |||
| + | ;; 早期に不要なUIをオフ | ||
| + | (push ' | ||
| + | (push ' | ||
| + | (push ' | ||
| + | |||
| + | (provide ' | ||
| + | ;;; early-init.el ends here | ||
| + | </ | ||
| <code lisp init.el> | <code lisp init.el> | ||
| - | ;;;; .emacs.d/ | + | ;;; -*- lexical-binding: |
| - | ;;;; | + | ;;; ~/ |
| - | ;;;; last updated: | + | ;;; |
| - | ;;;; Author: HEO SeonMeyong < | + | ;;; last updated: |
| + | ;;; Author: HEO SeonMeyong < | ||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 行 167: | 行 208: | ||
| ;;; コメント定義 | ;;; コメント定義 | ||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | ;; セミコロン 4 つはファイルヘッダのコメント | ||
| ;; セミコロン 3 つは段落コメント | ;; セミコロン 3 つは段落コメント | ||
| ;; セミコロン 2 つはコードブロックコメント | ;; セミコロン 2 つはコードブロックコメント | ||
| 行 181: | 行 221: | ||
| ;; https:// | ;; https:// | ||
| ;; https:// | ;; https:// | ||
| - | + | ;; https://www.gnu.org/software/emacs/manual/ | |
| - | ;;;; PATH settings | + | ;; https://github.com/purcell/exec-path-from-shell ; Macでshellから環境変数を取り込む |
| - | ;; elispのload-path | + | |
| - | (setq load-path | + | |
| - | (append | + | |
| - | | + | |
| - | (expand-file-name "/usr/local/share/emacs/site-lisp" | + | |
| - | (expand-file-name "~/.emacs.d/elisp/" | + | |
| - | ) | + | |
| - | load-path)) | + | |
| - | ;; Infoのload-path | + | |
| - | (add-to-list ' | + | |
| - | + | ||
| - | ;; Magic File Nameを一時的に無効化 | + | |
| - | (defconst my:saved-file-name-handler-alist file-name-handler-alist) | + | |
| - | (setq file-name-handler-alist nil) | + | |
| - | (add-hook ' | + | |
| - | (lambda () | + | |
| - | (setq file-name-handler-alist my: | + | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | ;;; Package Management system | + | ;;; log |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ;;; 2026/ | ||
| - | ;; Package initialization ; 2024/08/15 | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;; ; 2024/ | + | ;;; Path & package bootstrap |
| - | (eval-and-compile | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | | + | ;; 追加の elisp を load-path に加える(存在チェック付き) |
| - | '(package-archives | + | (let ((extra-paths ' |
| - | (" | + | |
| - | ("org" | + | (dolist |
| - | | + | (let ((abs (expand-file-name |
| - | ' | + | (when (file-directory-p abs) |
| - | (package-initialize) | + | (add-to-list ' |
| - | ;; leaf initialization ; | + | |
| - | (unless | + | |
| - | (package-refresh-contents) | + | |
| - | (package-install 'leaf t)) | + | |
| - | | + | |
| - | :ensure t | + | |
| - | ;; :init | + | |
| - | ;; (leaf blackout :ensure t) | + | |
| - | ;; (leaf hydra :ensure t) | + | |
| - | ;; (leaf el-get | + | |
| - | :config | + | |
| - | (leaf-keywords-init) | + | |
| - | ) | + | |
| - | (setq custom-file | + | |
| - | | + | |
| - | ;(eval-when-compile | + | |
| - | ; | + | |
| - | ; | + | |
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | + | ;; Info の追加ディレクトリ(Homebrew等) |
| - | ;;;; Emacs settings for Emacs base | + | (dolist (info-dir ' |
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | + | (when (file-directory-p info-dir) |
| + | (add-to-list ' | ||
| - | ;;; Start-up settings | + | ;; package.el の初期化(early-init.el で package-enable-at-startup を nil にしている前提) |
| - | ;;; EmacsのC言語部分で定義されている変数をcustomで扱えるようにまとめる | + | (require ' |
| - | ;;; 2024/ | + | (custom-set-variables |
| + | ' | ||
| + | (" | ||
| + | (" | ||
| + | ' | ||
| + | (package-initialize) | ||
| + | |||
| + | ;; leaf を未導入なら取得 | ||
| + | (unless (package-installed-p ' | ||
| + | (package-refresh-contents) | ||
| + | (package-install ' | ||
| + | |||
| + | (leaf leaf-keywords | ||
| + | :ensure t | ||
| + | :config (leaf-keywords-init)) | ||
| + | |||
| + | ;; customize | ||
| + | (setq custom-file (expand-file-name " | ||
| + | (when (file-exists-p custom-file) | ||
| + | (load custom-file)) | ||
| + | |||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ;;; macOS: シェルの環境変数を取り込む(GUI起動でも PATH 等を揃える) | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | (leaf exec-path-from-shell | ||
| + | :ensure t | ||
| + | :require t | ||
| + | :when (memq window-system '(mac ns x)) | ||
| + | :config | ||
| + | (dolist (var ' | ||
| + | (add-to-list ' | ||
| + | (exec-path-from-shell-initialize)) | ||
| + | |||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ;;; 基本設定(UI/ | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| (leaf cus-start | (leaf cus-start | ||
| - | :doc "define customization properties of builtins" | + | :doc "Builtins のカスタマイズをまとめる" |
| - | :tag " | + | :bind ((" |
| - | :bind ((" | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;; | + | ;; |
| - | | + | |
| - | ;; Tab Control like Mac Window and tab control | + | ;; Tab-bar 操作(mac風) |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;; Search Dictionary from Dictionaly App on macOS | + | :hook ((minibuffer-setup-hook . shrink-window-if-larger-than-buffer)) |
| - | | + | :custom ' |
| - | (lambda () (interactive) | + | (debug-on-error . t) |
| - | (let ((url (concat " | + | |
| - | (browse-url url)))) ; 辞書検索(カーソルのある位置の単語) | + | |
| - | | + | |
| - | (lambda (key) (interactive " | + | |
| - | (let ((url (concat " | + | |
| - | (browse-url url)))) ; 辞書検索(指定) | + | |
| - | ) | + | |
| - | :hook ((minibuffer-setup-hook . shrink-window-if-larger-than-buffer) ; mini-buffer resized to contents. | + | |
| - | ) | + | |
| - | :custom ' | + | |
| - | (debug-on-error . t) ; Error時、Debuggerを起動し、backtraceを表示する | + | |
| (frame-resize-pixelwise . t) | (frame-resize-pixelwise . t) | ||
| (enable-recursive-minibuffers . t) | (enable-recursive-minibuffers . t) | ||
| 行 280: | 行 311: | ||
| (history-delete-duplicates . t) | (history-delete-duplicates . t) | ||
| (scroll-preserve-screen-position . t) | (scroll-preserve-screen-position . t) | ||
| - | (scroll-conservatively . 101) ; 一気にscrollした場合の挙動変更(カーソルをCentralizeしない) | + | (scroll-conservatively . 10000) |
| + | (scroll-step . 1) | ||
| + | | ||
| (visible-bell . t) | (visible-bell . t) | ||
| - | ;; | ||
| (text-quoting-style . ' | (text-quoting-style . ' | ||
| - | (truncate-lines . t) | + | (truncate-lines . nil) ; 折り返し表示 |
| - | (tab-width . 8) ; TAB幅を8文字にする | + | (tab-width . 8) |
| - | (line-number-display-limit-width . 10000) ; 行番号を10000行まで表示する | + | (line-number-display-limit-width . 10000) |
| - | (resize-mini-windows . t) ; mini-buffer auto-resize | + | (resize-mini-windows . t) |
| - | (max-mini-window-height . 0.1) ; mini-buffer max height to 10% | + | (max-mini-window-height . 0.1) |
| - | (indicate-empty-lines . t) ; 空行を表示する | + | (indicate-empty-lines . t) |
| - | (indicate-buffer-boundaries . ' | + | (indicate-buffer-boundaries . 'left) |
| - | (scroll-step . 1) ; scrollする際のscroll行数 | + | |
| - | (scroll-conservatively . 1) ; scrollさせる条件 | + | |
| - | (create-lockfiles . nil) ; Lock fileを作成しない | + | |
| (gc-cons-percentage . 0.2) | (gc-cons-percentage . 0.2) | ||
| - | (gc-cons-threshold . 134217728) ; GC実行条件(Memory使用量)を変更する(default: | + | (gc-cons-threshold . 134217728) |
| - | ;; (use-dialog-box . nil) | + | (menu-bar-mode . t) |
| - | ;; (use-file-dialog . nil) | + | (tool-bar-mode . nil) |
| - | (menu-bar-mode . t) ; menu-barを表示(Macの場合、MacのMenu-barに表示される) | + | (scroll-bar-mode . nil) |
| - | (tool-bar-mode . nil) ; tool-barを非表示 | + | (indent-tabs-mode . nil) |
| - | (scroll-bar-mode . nil) ; scroll-barを非表示 | + | (transient-mark-mode . t) |
| - | (indent-tabs-mode . nil) ; IndentにTabを利用しない | + | (tab-bar-mode . t)) |
| - | (linum-mode . t) ; 行数を表示する | + | |
| - | (transient-mark-mode . t) ; マーク領域を色付け | + | |
| - | (tab-bar-mode . t) ; Tab-barを表示 | + | |
| - | | + | |
| :config | :config | ||
| - | | + | |
| (defalias ' | (defalias ' | ||
| - | (set-display-table-slot standard-display-table 0 ?\ ) ; 文字が画面から飛び出る時にでる$マークを表示させない。 | + | |
| - | (set-display-table-slot standard-display-table 'wrap ?\ ) ; 改行の時にバックスラッシュを表示させない | + | |
| + | (set-display-table-slot standard-display-table 'wrap ?\ ) | ||
| + | | ||
| (leaf cus-start-mac | (leaf cus-start-mac | ||
| - | :when (eq system-type ' | + | :when (eq system-type ' |
| - | :custom | + | : |
| - | | + | |
| - | (ns-use-srgb-colorspace . t) ; Use sRGB | + | ;; Frame Transparency (for emacs-plus@31) |
| - | )) | + | ;; (set-frame-parameter nil ' |
| + | | ||
| + | ;; Choose elements: | ||
| + | ;; - Full list: ns-alpha-default (default face/ | ||
| + | ;; | ||
| + | ;; | ||
| + | ;; | ||
| + | ;; | ||
| + | ;; | ||
| + | | ||
| + | ' | ||
| + | | ||
| + | | ||
| + | ) | ||
| - | (leaf dired | + | ;; dired のショートカット |
| - | | + | (leaf dired :bind ((: |
| - | (" | + | |
| - | | + | |
| - | ;;; language/ | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; 多言語環境における基本コマンド | + | ;;; 多言語環境(mule) |
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| (leaf mule | (leaf mule | ||
| - | :doc "basic commands for multilingual environment" | ||
| - | :tag " | ||
| :config | :config | ||
| - | (set-language-environment ' | + | (set-language-environment ' |
| - | ;; Set coding systems to UTF-8 ; Coding systemをUTF-8にする | + | |
| (set-terminal-coding-system ' | (set-terminal-coding-system ' | ||
| (set-keyboard-coding-system ' | (set-keyboard-coding-system ' | ||
| 行 337: | 行 373: | ||
| (set-clipboard-coding-system ' | (set-clipboard-coding-system ' | ||
| (prefer-coding-system ' | (prefer-coding-system ' | ||
| - | (set-default buffer-file-coding-system ' | ||
| (set-default-coding-systems ' | (set-default-coding-systems ' | ||
| - | (leaf language-mac | + | (when (eq system-type ' |
| - | :when (eq system-type ' | + | (customize-set-variable 'default-input-method " |
| - | :custom | + | |
| - | (default-input-method | + | |
| - | | + | |
| - | ;;; GUI Settings ; 2024/08/23 | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; Window systemを利用している場合の設定 | + | ;;; GUI/フォント |
| - | (when (memq window-system '(x mac ns)) ; X11/ | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;; frame settings | + | (when (memq window-system '(x mac ns)) |
| - | (defvar my-frame-parameters ; frame設定 | + | (defvar my-frame-parameters |
| - | ' | + | ' |
| - | | + | (top . 20) (left . 20) |
| - | (top | + | (line-spacing . 0) |
| - | | + | (left-fringe . 12) (right-fringe . 12) |
| - | (line-spacing | + | (cursor-type . box) |
| - | (left-fringe | + | (alpha . 95) |
| - | | + | (foreground-color . "# |
| - | (cursor-type | + | (background-color . "# |
| - | (alpha | + | (cursor-color . "# |
| - | (foreground-color . "# | + | (mouse-color . "# |
| - | (background-color . "# | + | |
| - | (cursor-color | + | |
| - | (mouse-color | + | |
| - | | + | |
| (setq default-frame-alist my-frame-parameters) | (setq default-frame-alist my-frame-parameters) | ||
| (setq frame-title-format ' | (setq frame-title-format ' | ||
| - | | + | (setq blink-cursor-mode t) |
| - | | + | (setq frame-inherited-parameters '(font tool-bar-lines)) |
| - | (setq frame-inherited-parameters '(font tool-bar-lines)) ; C-x 5 2 で新フレームを作ったときに同じフォントを使う | + | (setq ns-pop-up-frames nil) |
| - | + | ;; mac/ns フォント | |
| - | ;; ns-win.el | + | |
| - | ;; lisp side of interface with NeXT/ | + | |
| - | (setq ns-pop-up-frames nil) ; 複数ウィンドウを禁止する | + | |
| - | + | ||
| - | ;; face settings | + | |
| (when (memq window-system '(mac ns)) | (when (memq window-system '(mac ns)) | ||
| (global-set-key [s-mouse-1] ' | (global-set-key [s-mouse-1] ' | ||
| (let* ((size 16) | (let* ((size 16) | ||
| - | | + | |
| - | ;; (jpfont " | + | |
| - | ;; (jpfont "UD Digi Kyokasho N-R" | + | |
| - | ;; (jpfont " | + | |
| - | | + | |
| - | ;; (asciifont " | + | |
| - | ;; (asciifont "UD Digi Kyokasho N-R" | + | |
| - | ;; (asciifont " | + | |
| (h (* size 10))) | (h (* size 10))) | ||
| (set-face-attribute ' | (set-face-attribute ' | ||
| 行 394: | 行 411: | ||
| (set-fontset-font t ' | (set-fontset-font t ' | ||
| (set-fontset-font t ' | (set-fontset-font t ' | ||
| - | ;; Rescale the font face | ||
| (setq face-font-rescale-alist | (setq face-font-rescale-alist | ||
| ' | ' | ||
| 行 403: | 行 419: | ||
| (" | (" | ||
| (" | (" | ||
| - | (" | + | (" |
| - | ;; Check font | + | ;; マウス設定 |
| - | ;; 1lIi / Oo0 | + | (setq mouse-drag-copy-region t) |
| - | ;; | + | (setq mouse-wheel-scroll-amount '(1 ((shift) . 2) ((control)))) |
| + | (setq mouse-wheel-progressive-speed nil)) | ||
| - | | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | | + | ;;; Builtins: modeline/time 等 |
| - | (setq mouse-drag-copy-region t) ; mouseでのDrag and Dropを許可 | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;; mwheel.el 2024/08/24 | + | (leaf which-function : |
| - | (setq | + | |
| - | mouse-wheel-scroll-amount | + | |
| - | ; 1行, s[whl] 2行, C[whl] Page | + | |
| - | mouse-wheel-progressive-speed nil) ; wheel速度を無視 | + | |
| - | | + | |
| - | | + | |
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | ;;; Built-in eLisp | ||
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | |||
| - | ;;; which-func.el 2024/ | ||
| - | ;;; modelineに現在行の関数名を表示 | ||
| - | (leaf which-function | ||
| - | :doc "print current function in mode line" | ||
| - | :tag " | ||
| - | :custom ((which-function-mode . 1) ; 現在ポイントがある関数名をモードラインに表示 | ||
| - | )) | ||
| - | |||
| - | ;;; time 2024/ | ||
| - | ;;; modelineに時刻を表示する | ||
| (leaf time | (leaf time | ||
| - | :doc " | ||
| - | :tag " | ||
| :hook (emacs-startup-hook . display-time-mode) | :hook (emacs-startup-hook . display-time-mode) | ||
| - | :custom ((display-time-interval . 1) ; 時刻を1秒毎に更新(default: | + | : |
| - | | + | (display-time-string-forms ' |
| - | ; 時刻表示のフォーマット指定 | + | (display-time-day-and-date . t))) |
| - | (display-time-day-and-date . t) ; 時刻表示を許可 | + | |
| - | )) | + | |
| - | ;;; browse-url.el 2024/ | ||
| - | ;;; Cursor位置のURLをSystem Browserで表示する | ||
| (leaf browse-url | (leaf browse-url | ||
| - | | + | : |
| - | :tag " | + | |
| - | | + | |
| - | ) | + | |
| :config | :config | ||
| - | (leaf browse-url-mac | + | (when (eq system-type ' |
| - | :when (eq system-type ' | + | (customize-set-variable 'browse-url-generic-program " |
| - | | + | |
| - | ))) | + | |
| - | ;;; time-stamp 2024/ | ||
| - | ;;; 2024/ | ||
| - | ;;; Last Updateを更新する | ||
| (leaf time-stamp | (leaf time-stamp | ||
| - | :doc " | ||
| - | :tag " | ||
| :hook (before-save-hook . time-stamp) | :hook (before-save-hook . time-stamp) | ||
| - | :custom ((time-stamp-active . t) ; timestampを利用する | + | : |
| - | | + | (time-stamp-start . "last updated: ") |
| - | | + | (time-stamp-format . " |
| - | | + | (time-stamp-end . " \n$"))) |
| - | )) | + | |
| - | ;;; Completion / ido-mode 2024/ | + | ;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; 2024/ | + | ;;; 表示/編集補助 |
| - | ;;; ファイル名補完など | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;; (leaf ido | + | |
| - | ;; :doc " | + | |
| - | ;; :tag " | + | |
| - | ;; :init | + | |
| - | ;; (ido-mode t) ; バッファやファイルの移動時に部分一致での検索を行えるようにする | + | |
| - | ;; :custom ((ido-enable-flex-matching . t) ; 中間/あいまい一致 | + | |
| - | ;; )) | + | |
| - | ;;; Emacs EasyPG Assistant | + | (setq-default display-line-numbers nil) ;; |
| - | ;;; 2024/ | + | (global-display-line-numbers-mode -1) ;; ← nil ではなく |
| - | ;;; 2024/ | + | (setq column-number-mode t) |
| - | ;;; Support GPG encryptiom & decryption | + | (setq size-indication-mode t) |
| - | (leaf epa-file | + | |
| - | :doc "the EasyPG Assistant, transparent file encryption" | + | |
| - | :tag " | + | |
| - | :require t | + | |
| - | :config | + | |
| - | (epa-file-enable) | + | |
| - | (leaf epg-config.el | + | |
| - | :doc " | + | |
| - | :tag " | + | |
| - | :custom ((vepg-pinentry-mode . ' | + | |
| - | | + | |
| - | ))) | + | |
| - | ;;; Whitespace-mode (minor-mode) 2024/ | ||
| - | ;;; 2024/ | ||
| - | ;;; White spaceのHandling | ||
| (leaf whitespace | (leaf whitespace | ||
| - | :doc "minor mode to visualize TAB, (HARD) SPACE, NEWLINE" | ||
| - | :tag " | ||
| :require t | :require t | ||
| - | :hook (find-file-hook . (lambda () (whitespace-mode | + | :hook (find-file-hook . (lambda () (whitespace-mode |
| - | :custom ((whitespace-style . ' | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;; | + | |
| - | ;; | + | |
| - | )) | + | |
| - | | + | |
| - | ) | + | |
| :config | :config | ||
| - | (set-face-foreground ' | + | (setq whitespace-style '(face trailing tabs empty spaces) |
| - | | + | ;; 全角スペースのみ可視化 |
| + | | ||
| + | ;; フェイスは一度だけ設定 | ||
| (set-face-attribute ' | (set-face-attribute ' | ||
| - | | + | |
| - | | + | |
| - | | + | |
| (set-face-attribute ' | (set-face-attribute ' | ||
| - | | + | |
| - | | + | |
| - | | + | |
| (set-face-attribute ' | (set-face-attribute ' | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| (set-face-attribute ' | (set-face-attribute ' | ||
| - | | + | |
| - | | + | (global-whitespace-mode t)) |
| - | | + | |
| - | (global-whitespace-mode t) ; Whitespace-modeを全てのmodeで有効化 | + | |
| - | | + | |
| - | ;;; paren 2024/ | ||
| - | ;;; highlight matching paren | ||
| (leaf paren | (leaf paren | ||
| - | :doc " | ||
| - | :tag " | ||
| :hook (emacs-startup-hook . show-paren-mode) | :hook (emacs-startup-hook . show-paren-mode) | ||
| - | :custom ((show-paren-delay . 0) ; 範囲表示の遅延を0秒にする(default: | + | : |
| - | | + | (show-paren-style . ' |
| - | )) | + | |
| - | ;;; simple 2024/ | ||
| - | ;;; 基本的な編集コマンド | ||
| (leaf simple | (leaf simple | ||
| - | | + | : |
| - | :tag " | + | (kill-read-only-ok . t) |
| - | | + | (kill-whole-line . nil) |
| - | | + | (eval-expression-print-length . nil) |
| - | | + | (eval-expression-print-level . nil) |
| - | | + | (indent-tabs-mode . nil) |
| - | | + | (mail-user-agent . ' |
| - | | + | |
| - | (size-indication-mode . t) ; File Sizeを表示する | + | |
| - | | + | |
| - | (mail-user-agent . ' | + | |
| - | )) | + | |
| - | ;;; files 2024/ | ||
| - | ;;; file操作関連・特にbackup関連設定 | ||
| (leaf files | (leaf files | ||
| - | | + | : |
| - | :tag " | + | (backup-by-copying . t) |
| - | | + | (version-control . t) |
| - | (make-backup-files . t) ; バックアップファイルを作成させる | + | (kept-new-versions . 2) |
| - | | + | (kept-old-versions . 2) |
| - | | + | (delete-old-versions . t) |
| - | | + | (auto-save-timeout . 15) |
| - | | + | (auto-save-interval . 60) |
| - | | + | (delete-auto-save-files . t))) |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;; (auto-save-file-name-transforms . ' | + | |
| - | ;; (backup-directory-alist . ' | + | |
| - | ;; | + | |
| - | ; backupとauto-saveファイルは.emacs/ | + | |
| - | )) | + | |
| - | ;;; startup 2024/ | ||
| (leaf startup | (leaf startup | ||
| - | :doc " | + | :config |
| - | | + | (setq init-file-debug t |
| - | :custom `((init-file-debug | + | auto-save-list-file-prefix (locate-user-emacs-file " |
| - | (auto-save-list-file-prefix | + | inhibit-startup-screen t |
| - | ; auto-save listの設定をする(files参照) | + | inhibit-startup-message t |
| - | (inhibit-startup-screen | + | inhibit-startup-echo-area-message t |
| - | (inhibit-startup-message | + | initial-scratch-message "" |
| - | (inhibit-startup-echo-area-message | + | |
| - | (initial-scratch-message | + | |
| - | )) | + | |
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | ;;; Additional Packages | ||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| - | + | ;;; 補完: | |
| - | ;;; company-mode 2024/ | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; 2024/ | + | |
| (leaf company | (leaf company | ||
| - | :doc " | ||
| - | :req " | ||
| - | :tag " | ||
| - | :url " | ||
| - | :emacs>= 24.3 | ||
| :ensure t | :ensure t | ||
| - | ;; :blackout t | ||
| - | :leaf-defer nil | ||
| :bind ((" | :bind ((" | ||
| - | | + | (:company-active-map |
| - | (" | + | |
| - | (" | + | |
| - | (" | + | |
| - | (" | + | |
| - | (" | + | |
| - | (" | + | |
| - | (" | + | |
| - | ("< | + | |
| - | ) | + | |
| - | | + | |
| (" | (" | ||
| (" | (" | ||
| - | )) | + | |
| - | ;; :hook (emacs-lisp-mode-hook . company-mode) ; Elisp-modeで有効 | + | (" |
| - | :custom ((company-idle-delay . 0.3) ; companyが動作するまでのタイムラグ | + | ("C-S-h" . company-show-doc-buffer) |
| - | | + | ("< |
| - | | + | |
| - | ; (company-transformers . ' | + | (" |
| - | (company-auto-expand . t) ; 全Bufferで有効 | + | (" |
| - | | + | : |
| - | | + | (company-minimum-prefix-length . 2) |
| - | | + | (company-transformers . ' |
| - | | + | (company-auto-expand . t) |
| - | ) | + | (company-selection-wrap-around . t) |
| - | ;; : | + | (completion-ignore-case . t) |
| - | : | + | (company-dabbrev-downcase . nil) |
| - | (company-tooltip | + | (company-show-numbers . t))) |
| - | `((t :foreground "# | + | |
| - | (company-tooltip-common | + | |
| - | `((t :foreground " | + | |
| - | (company-tooltip-selection | + | |
| - | `((t :foreground "# | + | |
| - | (company-tooltip-common-selection | + | |
| - | `((t :foreground " | + | |
| - | (company-scrollbar-fg | + | |
| - | `((t :background "# | + | |
| - | (company-scrollbar-bg | + | |
| - | `((t :background "# | + | |
| - | | + | |
| - | ;;; lua-mode 2024/ | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; 2024/ | + | ;;; 言語モード |
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| (leaf lua-mode | (leaf lua-mode | ||
| :ensure t | :ensure t | ||
| :mode (" | :mode (" | ||
| : | : | ||
| - | :custom ((lua-indent-level . 2) ; Indent offset | + | : |
| - | | + | (lua-indent-string-contents . nil) |
| - | | + | (lua-indent-nested-block-content-align . t) |
| - | | + | (lua-indent-close-paren-align . t) |
| - | | + | (lua-default-application . "/ |
| - | | + | (lua-default-command-switches . " |
| - | | + | (lua-always-show . t)) |
| - | :config | + | :config (add-hook ' |
| - | (leaf company-lua | + | |
| - | :ensure t | + | |
| - | :hook (add-hook ' | + | |
| - | | + | |
| - | ;;; caddyfile-mode (cnfiguration mode) 2024/ | ||
| - | ;;; 2024/ | ||
| (leaf caddyfile-mode | (leaf caddyfile-mode | ||
| :ensure t | :ensure t | ||
| :mode ((" | :mode ((" | ||
| | | ||
| - | :hook (caddyfile-mode-hook . my-caddyfile-hook) | + | :hook (caddyfile-mode-hook . (lambda |
| - | :config | + | |
| - | | + | |
| - | " | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;;; nginx mode 2024/ | ||
| - | ;;; 2024/ | ||
| (leaf nginx-mode | (leaf nginx-mode | ||
| :ensure t | :ensure t | ||
| - | :mode (" | + | :mode ((" |
| - | :hook (nginx-mode-hook . company-mode) ; company-modeを起動 | + | :hook (nginx-mode-hook . company-mode)) |
| - | :config | + | |
| - | (leaf company-nginx | + | |
| - | :ensure t | + | |
| - | :hook (add-hook ' | + | |
| - | | + | |
| - | ;;; w3m 2024/ | ||
| - | ;;; Emacs W3m browser support. | ||
| (leaf w3m | (leaf w3m | ||
| :ensure t | :ensure t | ||
| - | ) | + | |
| - | ;;; vc-fossil 2024/ | ||
| - | ;;; Fossil vc backend. | ||
| (leaf vc-fossil | (leaf vc-fossil | ||
| :ensure t | :ensure t | ||
| - | :init (add-to-list ' | + | :init (add-to-list ' |
| - | | + | |
| - | ;;; go-translate 2024/ | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; Text translator for Emacs. | + | ;;; 翻訳: go-translate |
| - | ;;; https:// | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| (leaf go-translate | (leaf go-translate | ||
| :ensure t | :ensure t | ||
| - | :bind ("C-c t" . gt-do-translate) | + | :bind (("C-c t" . gt-do-translate)) |
| + | :custom ' | ||
| :config | :config | ||
| - | (setq gt-langs '(en ja)) | + | |
| - | (setq gt-default-translator | + | |
| - | (gt-translator | + | (setq gt-default-translator |
| - | | + | (gt-translator |
| - | | + | |
| - | ;; (gt-bing-engine) ; | + | |
| - | | + | |
| - | (gt-deepl-engine :key "DeepLAPI-KeyX-xxxx-xxxx-secret:XX" :pro nil) | + | |
| - | ; DeepL Translator | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;;; my: | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;; Deepl translation on web page(Web経由) | + | ;;; EasyPG |
| - | (leaf my:deepl-traqslate | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | :bind ("C-c T" . my: | + | (leaf epa-file |
| - | :preface | + | :require t |
| - | (defun my:deepl-translate (& | + | :config |
| - | (interactive) | + | (epa-file-enable) |
| - | (setq string | + | ;; pinentry-mode は epg-config の変数 |
| - | (cond ((stringp string) string) | + | (with-eval-after-load 'epg-config |
| - | ((use-region-p) | + | (setq epg-pinentry-mode ' |
| - | (buffer-substring (region-beginning) (region-end))) | + | |
| - | (t | + | |
| - | (save-excursion | + | |
| - | (let (s) | + | |
| - | | + | |
| - | | + | |
| - | (setq s (point)) | + | |
| - | | + | |
| - | | + | |
| - | (run-at-time 0.1 nil 'deactivate-mark) | + | |
| - | (browse-url | + | |
| - | | + | |
| - | " | + | |
| - | (url-hexify-string string) | + | |
| - | )))) | + | |
| - | ;;; Specific Configuration | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| - | ;;; for mu4e | + | ;;; mu4e 設定を分離ロード |
| - | (load " | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| + | (load (expand-file-name | ||
| (provide 'init) | (provide 'init) | ||
| - | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | + | ;;; init.el ends here |
| - | ;;;; init.el ends here | + | |
| - | + | ||
| - | ;; Local Variables: | + | |
| - | ;; coding: utf-8 | + | |
| - | ;; comment-column: | + | |
| - | ;; version-control: | + | |
| - | ;; kept-old-versions: | + | |
| - | ;; kept-new-versions: | + | |
| - | ;; End: | + | |
| </ | </ | ||
userapps/emacs.1740564040.txt.gz · 最終更新: by seirios
