転載・引用について

ユーザ用ツール

サイト用ツール


userapps:emacs

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
userapps:emacs [2026/01/06 03:17] – [macOS] seiriosuserapps:emacs [2026/01/28 08:31] (現在) – [macOS] seirios
行 54: 行 54:
 $ mkdir ~/.config/emacs-plus $ mkdir ~/.config/emacs-plus
 $ vi ~/.config/emacs-plus/build.yml $ vi ~/.config/emacs-plus/build.yml
-.... configuration .... 
 icon: modern-pen icon: modern-pen
-.... configuration ....+patches: 
 +  - aggressive-read-buffering 
 +  - frame-transparency 
 +  - mac-font-use-typo-metrics
 $ brew tap d12frosted/emacs-plus # Emacs-plusのtapを追加 brew tapで取り込んでいるTapを確認できる $ brew tap d12frosted/emacs-plus # Emacs-plusのtapを追加 brew tapで取り込んでいるTapを確認できる
 $ brew edit emacs-plus@31 # Emacs-plus@30 (2024年8月現在のHead) のConfigを修正 $ brew edit emacs-plus@31 # Emacs-plus@30 (2024年8月現在のHead) のConfigを修正
行 64: 行 66:
   #   #
  
-  opoo "The option --with-no-frame-refocus is not required anymore in emacs-plus@31." if build.with? "no-frame-refocus"+  opoo "The option --with-imagemagick is deprecated and will be removed in a future version. Modern Emacs has native support for most image formats (SVG via librsvg, WebP, PNG, JPEG, GIF). If you rely on ImageMagick, please open an issue describing your use case." if build.with? "imagemagick"
   local_patch "system-appearance", sha: "53283503db5ed2887e9d733baaaf80f2c810e668e782e988bda5855a0b1ebeb4"   local_patch "system-appearance", sha: "53283503db5ed2887e9d733baaaf80f2c810e668e782e988bda5855a0b1ebeb4"
   local_patch "round-undecorated-frame", sha: "26947b6724fc29fadd44889808c5cf0b4ce6278cf04f46086a21df50c8c4151d"   local_patch "round-undecorated-frame", sha: "26947b6724fc29fadd44889808c5cf0b4ce6278cf04f46086a21df50c8c4151d"
-  local_patch "mac-font-use-typo-metrics", sha: "318395d3869d3479da4593360bcb11a5df08b494b995287074d0d744ec562c17" 
   # Added by seirios   # Added by seirios
   patch do   patch do
     url "https://raw.githubusercontent.com/takaxp/ns-inline-patch/master/emacs-head-inline.patch"     url "https://raw.githubusercontent.com/takaxp/ns-inline-patch/master/emacs-head-inline.patch"
   end   end
 +
 +  #
 +  # Install
 +  #
 .... configuration .... .... configuration ....
 $ brew install --formula d12frosted/emacs-plus/emacs-plus@31 --with-mailutils $ brew install --formula d12frosted/emacs-plus/emacs-plus@31 --with-mailutils
-$ osascript -e 'tell application "Finder" to make alias file to posix file "/usr/local/opt/emacs-plus@31/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}' +$ osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@31/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}' 
-$ sudo codesign --force --deep --sign - /usr/local/opt/emacs-plus@31/Emacs.app+$ sudo codesign --force --deep --sign - /opt/homebrew/opt/emacs-plus@31/Emacs.app
 $ brew services start d12frosted/emacs-plus/emacs-plus@31 $ brew services start d12frosted/emacs-plus/emacs-plus@31
 </code> </code>
行 149: 行 154:
 このinit.elは、byte-compileするとgo-translate関連の変数が未定義扱いになる。 このinit.elは、byte-compileするとgo-translate関連の変数が未定義扱いになる。
 本来は'':custom''で設定すべきなんだろうと思うがうまく行かなかったので、とりあえずは'':config''で逃げてある。 本来は'':custom''で設定すべきなんだろうと思うがうまく行かなかったので、とりあえずは'':config''で逃げてある。
 +<code lisp early-init.el>
 +;;; -*- lexical-binding: t; -*-
 +;;; ~/.config/emacs/early-init.el --- Early initialization
 +;;;
 +;;; last updated: 2026/01/02
 +;;; Author: HEO SeonMeyong <seirios@seirios.org>
  
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 +;;; log
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 +;;; 2026/01/02 Refactoring by Microsoft Copilot.
 +
 +;; 起動直後は GC を後ろ倒し(起動後に元へ戻す)
 +(setq gc-cons-threshold most-positive-fixnum)
 +(add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold 134217728)))
 +
 +;; package.el は自動では有効化しない(init.el側で initialize)
 +(setq package-enable-at-startup nil)
 +
 +;; フレームの暗黙のリサイズ抑制(ちらつき防止)
 +(setq frame-inhibit-implied-resize t)
 +
 +;; 早期に不要なUIをオフ
 +(push '(tool-bar-lines . 0)   default-frame-alist)
 +(push '(menu-bar-lines . 1)   default-frame-alist)
 +(push '(vertical-scroll-bars) default-frame-alist)
 +
 +(provide 'early-init)
 +;;; early-init.el ends here
 +</code>
 <code lisp init.el> <code lisp init.el>
-;;;; .emacs.d/init.el --- My init.el  -*- lexical-binding: t; -*- +;;; -*- lexical-binding: t; -*- 
-;;;; +;;; ~/.config/emacs/init.el --- Refactored init.el (Intel macOS) 
-;;;; last updated: 2024/08/26 +;;; 
-;;;; Author: HEO SeonMeyong <seirios@seirios.org>+;;; last updated: 2026/01/02 
 +;;; Author: HEO SeonMeyong <seirios@seirios.org>
  
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
行 173: 行 208:
 ;;; コメント定義 ;;; コメント定義
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; セミコロン 4 つはファイルヘッダのコメント 
 ;; セミコロン 3 つは段落コメント ;; セミコロン 3 つは段落コメント
 ;; セミコロン 2 つはコードブロックコメント ;; セミコロン 2 つはコードブロックコメント
行 187: 行 221:
 ;; https://uwabami.github.io/cc-env/Emacs.html ; Emacs の設定 ;; https://uwabami.github.io/cc-env/Emacs.html ; Emacs の設定
 ;; https://zenn.dev/zenwerk/scraps/b1280f66c8d11a ; Emacs設定記 2021 ;; https://zenn.dev/zenwerk/scraps/b1280f66c8d11a ; Emacs設定記 2021
- +;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html ; Emacs Manual 
-;;;; PATH settings +;; https://github.com/purcell/exec-path-from-shell ; Macでshellから環境変数を取り込む
-;; elispのload-path +
-(setq load-path +
-      (append +
-       (list +
-        (expand-file-name "/usr/local/share/emacs/site-lisp"+
-        (expand-file-name "~/.emacs.d/elisp/"+
-       ) +
-       load-path)) +
-;; Infoのload-path +
-(add-to-list 'Info-default-directory-list "/usr/local/share/info/"+
- +
-;; Magic File Nameを一時的に無効化 +
-(defconst my:saved-file-name-handler-alist file-name-handler-alist) +
-(setq file-name-handler-alist nil) +
-(add-hook 'emacs-startup-hook +
-          (lambda () +
-            (setq file-name-handler-alist my:saved-file-name-handler-alist)))+
  
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Package Management system+;;; log
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 +;;; 2026/01/02 Refactoring by Microsoft Copilot.
  
-;; Package initialization 2024/08/15 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;; 2024/08/26 Modified for leaf +;;; Path & package bootstrap 
-(eval-and-compile +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-  (custom-set-variables +;; 追加の elisp を load-path に加える(存在チェック付き) 
-   '(package-archives '(("gnu  . "https://elpa.gnu.org/packages/") +(let ((extra-paths '("/usr/local/share/emacs/site-lisp
-                        ("melpa" . "https://melpa.org/packages/") +                     "~/.config/emacs/elisp/"))) 
-                        ("org"   "https://orgmode.org/elpa/") +  (dolist (p extra-paths
-                        )) +    (let ((abs (expand-file-name p))) 
-   '(package-gnupghome-dir (expand-file-name ".gnupg" (getenv "HOME")))) +      (when (file-directory-p abs) 
-  (package-initialize) +        (add-to-list 'load-path abs)))))
-  ;; leaf initialization ; 2024/08/26 +
-  (unless (package-installed-'leaf) +
-    (package-refresh-contents+
-    (package-install 'leaf t)) +
-  (leaf leaf-keywords +
-    :ensure t +
-    ;; :init +
-    ;; (leaf blackout :ensure t) +
-    ;; (leaf hydra    :ensure t) +
-    ;; (leaf el-get   :ensure t) +
-    :config +
-    (leaf-keywords-init) +
-    ) +
-  (setq custom-file (expand-file-name "~/.emacs.d/custom.el")) +
-  +
-;(eval-when-compile +
-;  (package-refresh-contents) +
-;  )+
  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Info の追加ディレクトリ(Homebrew等) 
-;;;; Emacs settings for Emacs base +(dolist (info-dir '("/usr/local/share/info/")) 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+  (when (file-directory-p info-dir) 
 +    (add-to-list 'Info-default-directory-list info-dir)))
  
-;;; Start-up settings +;; package.el の初期化(early-init.el で package-enable-at-startup を nil にしている前提) 
-;;; EmacsC言語部で定義されている変数をcustomえるようにまとめる +(require 'package) 
-;;;  2024/08/22 ; leaf対応+(custom-set-variables 
 + '(package-archives '(("gnu"   . "https://elpa.gnu.org/packages/"
 +                      ("melpa" . "https://melpa.org/packages/"
 +                      ("org"   . "https://orgmode.org/elpa/"))) 
 + '(package-gnupghome-dir (expand-file-name ".gnupg" (getenv "HOME")))) 
 +(package-initialize) 
 + 
 +;; leaf を未導入なら取得 
 +(unless (package-installed-p 'leaf) 
 +  (package-refresh-contents) 
 +  (package-install 'leaf)) 
 + 
 +(leaf leaf-keywords 
 +  :ensure t 
 +  :config (leaf-keywords-init)) 
 + 
 +;; customize 書き込み先を離 
 +(setq custom-file (expand-file-name "~/.config/emacs/custom.el")) 
 +(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 '("PATH" "MANPATH" "LD_LIBRARY_PATH" "LIBRARY_PATH")) 
 +    (add-to-list 'exec-path-from-shell-variables var)) 
 +  (exec-path-from-shell-initialize)) 
 + 
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
 +;;; 基本設定(UI/操作系) 
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (leaf cus-start (leaf cus-start
-  :doc "define customization properties of builtins" +  :doc "Builtins のカスタマイズをまとめる
-  :tag "builtin" "internal+  :bind (("M-%"      . replace-regexp) 
-  :bind (("M-%"     'replace-regexp) ; 正規表現置換 +         ("C-c M-%"  . query-replace-regexp) 
-         ("C-c M-%" . 'query-replace-regexp) ; 正規表現置換(確認+         ("C-%"      . replace-string) 
-         ("C-%"     'replace-string) ; 置換 +         ("C-c C-%"  . query-replace) 
-         ("C-c C-%" . 'query-replace) ; 置換(確認+         ("C-z"      . undo) 
-         ("C-z"     'undo) ; Ctrl-zをminimizeからundoにremap +         ("C-x c"    . browse-url-at-point) 
-         ("C-x c"   'browse-url-at-point) ; カーソルのある地点のURLをBrowser表示 +         ("C-h"      . delete-backward-char) 
-         ("C-h"     'delete-backward-char) ; ^h をBackspaceに設定する +         ("C-c C-l"  . toggle-truncate-lines) 
-         ("C-c C-l" . 'toggle-truncate-lines) ; 折り返し表示ON/OFF +         ("C-c /"    . comment-or-uncomment-region) 
-         ("C-c /"   'comment-or-uncomment-region) ; 選択範囲をコメントアウト・コメントインする +         ("C-c l"    . display-line-numbers-mode) 
-         ("C-c l"   'display-line-numbers-mode) ; 左側に行番号を表示する +         ("C-s"      . isearch-forward) 
-         ;; Mail process +         ;; mu4e ランチャー 
-         ("C-x m"   'mu4e) ; Mailerとしてmu4eを起動 +         ("C-x m"    . mu4e) 
-         ;; Tab Control like Mac Window and tab control +         ;; Tab-bar 操作(mac風) 
-         ("s-}"     'tab-bar-switch-to-next-tab) ; 次(右)のTabに移動 +         ("s-}"      . tab-bar-switch-to-next-tab) 
-         ("s-{"     'tab-bar-switch-to-prev-tab) ; 前(左)のTabに移動 +         ("s-{"      . tab-bar-switch-to-prev-tab) 
-         ("s-T"     'tab-new) ; 新規Tabを開く +         ("s-T"      . tab-new) 
-         ("s-w"     'tab-close) ; 現在のTabを閉じる +         ("s-w"      . tab-close)) 
-         ;; Search Dictionary from Dictionaly App on macOS +  :hook ((minibuffer-setup-hook . shrink-window-if-larger-than-buffer)) 
-         ("C-c w o" . +  :custom '((create-lockfiles . nil)                 lockfile を作ない 
-          (lambda () (interactive) +            (debug-on-error . t)                     エラー時 backtrace
-            (let ((url (concat "dict://" (read-from-minibuffer "" (current-word))))) +
-              (browse-url url)))) ; 辞書検索(カーソルのある位置の単語) +
-         ("C-c w s" . +
-          (lambda (key) (interactive "MSearch: ") +
-            (let ((url (concat "dict://" key))) +
-              (browse-url url)))) ; 辞書検索(指定) +
-         +
-  :hook ((minibuffer-setup-hook . shrink-window-if-larger-than-buffer) ; mini-buffer resized to contents. +
-         +
-  :custom '((create-lockfiles . nil) Lockfileを作成しない +
-            (debug-on-error . t) Error、Debuggerを起動し、backtraceを表示する+
             (frame-resize-pixelwise . t)             (frame-resize-pixelwise . t)
             (enable-recursive-minibuffers . t)             (enable-recursive-minibuffers . t)
行 286: 行 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) 
 +            (scroll-margin . 2)
             (visible-bell . t)             (visible-bell . t)
-            ;;(ring-bell-function . 'ignore) 
             (text-quoting-style . 'straight)             (text-quoting-style . 'straight)
-            (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 . 'left) ; 空行表示を左側フリンジに表示 +            (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: 800000), 128*1024*1024 +            (gc-cons-threshold . 134217728)         128MB 
-            ;; (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
-  (add-function :after after-focus-change-function #'garbage-collect) ; focusが外れたらGC実行する+  ;; yes-or-no を y/n に短縮
   (defalias 'yes-or-no-p 'y-or-n-p)   (defalias 'yes-or-no-p 'y-or-n-p)
-  (set-display-table-slot standard-display-table 0 ?\ ) ; 文字が画面から飛び出る時にでる$マークを表示させない。 +  ;; 改行のバックスラッシュを非表示 
-  (set-display-table-slot standard-display-table 'wrap ?\ ) 改行の時にバックスラッシュを表示させない+  (set-display-table-slot standard-display-table 0 ?\ ) 
 +  (set-display-table-slot standard-display-table 'wrap ?\ ) 
 +  ;; macOS 固有
   (leaf cus-start-mac   (leaf cus-start-mac
-    :when (eq system-type 'darwin) ; for macOS +    :when (eq system-type 'darwin) 
-    :custom +    :custom ((ns-alternate-modifier . 'meta) 
-    (ns-alternate-modifier . 'meta) ; Macのoptionをメタキーにする +             (ns-use-srgb-colorspace . t))) 
-    (ns-use-srgb-colorspace . t) Use sRGB +             ;; Frame Transparency (for emacs-plus@31) 
-    ))+             ;; (set-frame-parameter nil 'ns-alpha-elements nil) ; Not use Transparency 
 +             (set-frame-parameter nil 'ns-alpha-elements '(ns-alpha-all)) 
 +             ;; Choose elements: 
 +             ;; - Full list: ns-alpha-default (default face/background) 
 +             ;;              ns-alpha-fringe (fringes + internal border clears) 
 +             ;;              ns-alpha-box (boxed face outlines) 
 +             ;;              ns-alpha-stipple (stipple mask background clears) 
 +             ;;              ns-alpha-relief (3D relief/shadow lines) 
 +             ;;              ns-alpha-glyphs (glyph background fills like hl-line/region) 
 +             (set-frame-parameter nil 'ns-alpha-elements 
 +                 '(ns-alpha-default ns-alpha-fringe ns-alpha-glyphs)) 
 +             (set-frame-parameter nil 'alpha-background 0.8) 
 +             (set-frame-parameter nil 'ns-background-blur 20) 
 +)
  
-(leaf dired +;; dired のショートカット 
-  :bind (:dired-mode-map +(leaf dired :bind ((:dired-mode-map ("u" . dired-up-directory))))
-         ("u" . dired-up-directory)) +
-  )+
  
-;;; language/mule 2024/08/21 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;; 多言語環境における基本コマンド+;;; 多言語環境(mule) 
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (leaf mule (leaf mule
-  :doc "basic commands for multilingual environment" 
-  :tag "mule" "multilingual" "character set" "coding system" 
   :config   :config
-  (set-language-environment 'Japanese) ; 言語設定を日本語に +  (set-language-environment 'Japanese)
-  ;; Set coding systems to UTF-8 ; Coding systemをUTF-8にする+
   (set-terminal-coding-system 'utf-8)   (set-terminal-coding-system 'utf-8)
   (set-keyboard-coding-system 'utf-8)   (set-keyboard-coding-system 'utf-8)
行 343: 行 373:
   (set-clipboard-coding-system 'utf-8)   (set-clipboard-coding-system 'utf-8)
   (prefer-coding-system 'utf-8)   (prefer-coding-system 'utf-8)
-  (set-default buffer-file-coding-system 'utf-8) 
   (set-default-coding-systems 'utf-8)   (set-default-coding-systems 'utf-8)
-  (leaf language-mac +  (when (eq system-type 'darwin) 
-    :when (eq system-type 'darwin) ; for macOS +    (customize-set-variable 'default-input-method "macOS")))
-    :custom +
-    (default-input-method "macOS") ; IMをOS-X形式にする +
-    ))+
  
-;;; GUI Settings 2024/08/23 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;; Window systemを利用している場合の設定 +;;; GUI/フォント 
-(when (memq window-system '(x mac ns)) ; X11/macOS/nsの場合、frame設定を適用 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-  ;; frame settings +(when (memq window-system '(x mac ns)) 
-  (defvar my-frame-parameters ; frame設定 +  (defvar my-frame-parameters 
-    '((height         45) ; Size of Frame Height(Characters) +    '((height . 45) (width . 188
-      (width         180) ; Size of Frame Width(Characters+      (top . 20) (left . 20) 
-      (top            20) ; Position of Top(Y axis) +      (line-spacing . 0) 
-      (left           20) ; Position of left(X axis+      (left-fringe . 12) (right-fringe . 12) 
-      (line-spacing    0) ; 文字間隔 +      (cursor-type . box) 
-      (left-fringe    12) ; 左側フリンジ幅 +      (alpha . 95) 
-      (right-fringe   12) ; 右側フリンジ幅 +      (foreground-color . "#F2F2F2"
-      (cursor-type   . box) ; カーソル種別 +      (background-color . "#000040"
-      (alpha          95) ; 不透明度 +      (cursor-color . "#C0C000"
-      (foreground-color . "#F2F2F2") ; 文字色 +      (mouse-color . "#8D8D8D")))
-      (background-color . "#000040") ; 背景色 +
-      (cursor-color     . "#C0C000") ; カーソルの色 +
-      (mouse-color      . "#8D8D8D") ; マウスカーソルの色 +
-      ))+
   (setq default-frame-alist my-frame-parameters)   (setq default-frame-alist my-frame-parameters)
   (setq frame-title-format '(multiple-frames "%b" ("" invocation-name)))   (setq frame-title-format '(multiple-frames "%b" ("" invocation-name)))
-  ;; frame.el +  (setq blink-cursor-mode t) 
-  (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/Open/GNUstep/macOS window system +
-  (setq ns-pop-up-frames nil) ; 複数ウィンドウを禁止する +
- +
-  ;; face settings FontFace settings for mac+
   (when (memq window-system '(mac ns))   (when (memq window-system '(mac ns))
     (global-set-key [s-mouse-1] 'browse-url-at-mouse)     (global-set-key [s-mouse-1] 'browse-url-at-mouse)
     (let* ((size 16)     (let* ((size 16)
-           (jpfont "PlemolJP") ; from HomeBrew/16 +           (jpfont "PlemolJP"
-           ;; (jpfont "Cica") ; from HomeBrew/18 +           (asciifont "PlemolJP")
-           ;; (jpfont "UD Digi Kyokasho N-R"+
-           ;; (jpfont "MigMix 2M") +
-           (asciifont "PlemolJP") ; from HomeBrew/16 +
-           ;; (asciifont "Cica") ; from HomeBrew/18 +
-           ;; (asciifont "UD Digi Kyokasho N-R"+
-           ;; (asciifont "MigMix 2M")+
            (h (* size 10)))            (h (* size 10)))
       (set-face-attribute 'default nil :family asciifont :height h)       (set-face-attribute 'default nil :family asciifont :height h)
行 400: 行 411:
       (set-fontset-font t 'japanese-jisx0213-2 jpfont)       (set-fontset-font t 'japanese-jisx0213-2 jpfont)
       (set-fontset-font t '(#x0080 . #x024F) asciifont))       (set-fontset-font t '(#x0080 . #x024F) asciifont))
-    ;; Rescale the font face 
     (setq face-font-rescale-alist     (setq face-font-rescale-alist
           '(("^-apple-hiragino.*" . 1.2)           '(("^-apple-hiragino.*" . 1.2)
行 409: 行 419:
             (".*monaco cy-bold-.*-mac-cyrillic" . 0.9)             (".*monaco cy-bold-.*-mac-cyrillic" . 0.9)
             (".*monaco-bold-.*-mac-roman" . 0.9)             (".*monaco-bold-.*-mac-roman" . 0.9)
-            ("-cdac$" . 1.3))) +            ("-cdac$" . 1.3)))) 
-    ;; 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))
  
-    ;; mouse.el, mwheel.el 2024/08/21 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-    ;; マウス制御 +;;; Builtins: modeline/time 等 
-    (setq mouse-drag-copy-region t) ; mouseでのDrag and Dropを許可 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-    ;; mwheel.el 2024/08/24 +(leaf which-function :custom '((which-function-mode . t)))
-    (setq +
-     mouse-wheel-scroll-amount '(1 ((shift) . 2) ((control))) ; ホイールでスクロールする行数を設定 +
- ; 1行, s[whl] 2行, C[whl] Page +
-     mouse-wheel-progressive-speed nil) ; wheel速度を無視 +
-    ) +
-  ) +
- +
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +
-;;; Built-in eLisp +
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+
- +
-;;; which-func.el 2024/08/21 +
-;;; modelineに現在行の関数名を表示 +
-(leaf which-function +
-  :doc "print current function in mode line" +
-  :tag "mode-line" "imenu" "tools" +
-  :custom ((which-function-mode . 1) ; 現在ポイントがある関数名をモードラインに表示 +
-           ))+
  
-;;; time 2024/08/21 
-;;; modelineに時刻を表示する 
 (leaf time (leaf time
-  :doc "display time, load and mail indicator in mode line of Emacs" 
-  :tag "mode-line" ; not defined by time.rl 
   :hook (emacs-startup-hook . display-time-mode)   :hook (emacs-startup-hook . display-time-mode)
-  :custom ((display-time-interval . 1) ; 時刻を1秒毎に更新(default:60s+  :custom '((display-time-interval . 1) 
-           (display-time-string-forms '((format "%s:%s:%s" 24-hours minutes seconds))) +            (display-time-string-forms '((format "%s:%s:%s" 24-hours minutes seconds))) 
-                                                                        ; 時刻表示のフォーマット指定 +            (display-time-day-and-date . t)))
-           (display-time-day-and-date . t) ; 時刻表示を許可 +
-           ))+
  
-;;; browse-url.el 2024/08/21 
-;;; Cursor位置のURLをSystem Browserで表示する 
 (leaf browse-url (leaf browse-url
-  :doc "pass a URL to a web browser" +  :custom '((browse-url-browser-function . 'browse-url-generic))
-  :tag "hypertext" "hypermedia" "mouse" +
-  :custom ((browse-url-browser-function . 'browse-url-generic) +
-           )+
   :config   :config
-  (leaf browse-url-mac +  (when (eq system-type 'darwin) 
-    :when (eq system-type 'darwin) ; for macOS +    (customize-set-variable 'browse-url-generic-program "open")))
-    :custom ((browse-url-generic-program "open") ; System Browser Open command +
-             )))+
  
-;;; time-stamp 2024/08/20 
-;;; 2024/08/21 ; leaf対応 
-;;; Last Updateを更新する 
 (leaf time-stamp (leaf time-stamp
-  :doc "Maintain last change time stamps in files edited by Emacs" 
-  :tag "tools" 
   :hook (before-save-hook . time-stamp)   :hook (before-save-hook . time-stamp)
-  :custom ((time-stamp-active . t)  ; timestampを利用する +  :custom '((time-stamp-active . t) 
-           (time-stamp-start . "last updated: ") ; timestamp開始文字 +            (time-stamp-start . "last updated: ") 
-           (time-stamp-format . "%Y/%02m/%02d" ; timestampのフォーマット +            (time-stamp-format . "%Y/%02m/%02d"
-           (time-stamp-end . " \\|$") ; timestamp終了文字 (コメントアウト) +            (time-stamp-end . " \n$")))
-           ))+
  
-;;; Completion / ido-mode 2024/08/17 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;;  2024/08/20 leaf対応 +;;; 表示/編集補助 
-;;; ファイル名補完など +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; (leaf ido +
-;;   :doc "interactively do things with buffers and files" +
-;;   :tag "extensions" "convenience" +
-;;   :init +
-;;   (ido-mode t) バッファやファイルの移動時に部分一致での検索を行えるようにする +
-;;   :custom ((ido-enable-flex-matching . t) 中間/あいまい一致 +
-;;            ))+
  
-;;; Emacs EasyPG Assistant (EPA) 2024/06/30 +(setq-default display-line-numbers nil) ;; 行番号は基本オフ(必要なら C-c l で局所的にトグル) 
-;;; 2024/08/20 leaf対応 +(global-display-line-numbers-mode -1) ;; ← nil ではなく -1 で確実に OFF 
-;;; 2024/08/21 ; pinentry対応(gpg-agent設定が必要+(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 "PGP" "GnuPG" +
-  :require t +
-  :config +
-  (epa-file-enable) +
-  (leaf epg-config.el +
-    :doc "configuration of the EasyPG Library" +
-    :tag "PGP" "GnuPG" +
-    :custom ((vepg-pinentry-mode . 'loopback) ; GPGのpinentryモードをloopbackに設定 +
-             (auth-source-forget-all-cached) ; すべてのキャッシュされた認証情報を忘れる +
-             )))+
  
-;;; Whitespace-mode (minor-mode) 2024/07/02 
-;;; 2024/08/21 ; leaf対応 
-;;; White spaceのHandling 
 (leaf whitespace (leaf whitespace
-  :doc "minor mode to visualize TAB, (HARD) SPACE, NEWLINE" 
-  :tag "data" "text" 
   :require t   :require t
-  :hook (find-file-hook . (lambda () (whitespace-mode t))) ; ファイルを開いた時にwhitespace-modeを設定する +  :hook (find-file-hook . (lambda () (whitespace-mode 1)))
-  :custom ((whitespace-style . '(face ; faceで可視化 +
-                                 trailing ; 行末 +
-                                 tabs ; タブ +
-                                 empty ; 先頭/末尾の空行 +
-                                 spaces ; 空白 +
-                                 ;;space-mark ; 表示のMapping +
-                                 ;;tab-mark ; TABのMapping +
-                                 )) +
-           (whitespace-space-regexp . "\\(\u3000+\\)") ; 全角スペースのみを可視化 +
-           )+
   :config   :config
-  (set-face-foreground 'whitespace-space nil+  (setq whitespace-style '(face trailing tabs empty spaces
-  (set-face-background 'whitespace-space "blue3")+        ;; 全角スペースのみ可視化 
 +        whitespace-space-regexp "\\(\\u3000+\\)") 
 +  ;; フェイスは一度だけ設定
   (set-face-attribute 'whitespace-trailing nil   (set-face-attribute 'whitespace-trailing nil
-                      :foreground "DeepPink" +    :foreground "DeepPink" :background "Purple4" :underline t)
-                      :background "Perple4" +
-                      :underline t)+
   (set-face-attribute 'whitespace-tab nil   (set-face-attribute 'whitespace-tab nil
-                      :foreground "RoyalBlue4" +    :foreground "RoyalBlue4" :background "gray20" :underline t)
-                      :background "gray20" +
-                      :underline t)+
   (set-face-attribute 'whitespace-space nil   (set-face-attribute 'whitespace-space nil
-                      :background "blue3" +    :background "blue3" :foreground "GreenYellow" :weight 'bold :underline t)
-                      :foreground "GreenYellow" +
-                      :weight 'bold +
-                      :underline t)+
   (set-face-attribute 'whitespace-empty nil   (set-face-attribute 'whitespace-empty nil
-                      :foreground "MediumPurple4" +    :foreground "MediumPurple4" :background "thistle4" :underline t) 
-                      :background "thistle4" +  (global-whitespace-mode t))
-                      :underline t) +
-  (global-whitespace-mode t) ; Whitespace-modeを全てのmodeで有効化 +
-  )+
  
-;;; paren 2024/08/21 
-;;; highlight matching paren 
 (leaf paren (leaf paren
-  :doc "highlight matching paren" 
-  :tag "languages" "faces" 
   :hook (emacs-startup-hook . show-paren-mode)   :hook (emacs-startup-hook . show-paren-mode)
-  :custom ((show-paren-delay . 0) ; 範囲表示の遅延を0秒にする(default:0.125s+  :custom '((show-paren-delay . 0) 
-           (show-paren-style . 'mixed) ; ウィンドウ内に収まらないときだけ、カッコ内を光らせる +            (show-paren-style . 'mixed)))
-           ))+
  
-;;; simple 2024/08/21 
-;;; 基本的な編集コマンド 
 (leaf simple (leaf simple
-  :doc "basic editing commands for Emacs" +  :custom '((kill-ring-max . 100) 
-  :tag "Internal" +            (kill-read-only-ok . t) 
-  :custom ((kill-ring-max . 100) +            (kill-whole-line . nil) 
-           (kill-read-only-ok . t) +            (eval-expression-print-length . nil) 
-           (kill-whole-line . nil) +            (eval-expression-print-level . nil) 
-           (eval-expression-print-length . nil) +            (indent-tabs-mode . nil) 
-           (eval-expression-print-level . nil) +            (mail-user-agent . 'mu4e-user-agent)))
-           (indent-tabs-mode . nil) ; タブにTABを使用する +
-           (size-indication-mode . t) ; File Sizeを表示する +
-           (column-number-mode . t) ; 列数を表示する +
-           (mail-user-agent . 'mu4e-user-agent) ; default mail client to mu4e +
-           ))+
  
-;;; files 2024/08/21 
-;;; file操作関連・特にbackup関連設定 
 (leaf files (leaf files
-  :doc "file input and output commands for Emacs" +  :custom '((make-backup-files . t) 
-  :tag "none" ; Not defined by files.el +            (backup-by-copying . t) 
-  :custom ( +            (version-control . t) 
-           (make-backup-files . t) ; バックアップファイルを作成させる +            (kept-new-versions . 2) 
-           (backup-by-copying . t) ; バックアップファイル作成時、元ファイルをCopy +            (kept-old-versions . 2) 
-           (version-control . t) ; 実行の有無 +            (delete-old-versions . t) 
-           (kept-new-versions . 2) ; 最新の保持数 +            (auto-save-timeout . 15) 
-           (kept-old-versions . 2) ; 最古の保持数 +            (auto-save-interval . 60) 
-           (delete-old-versions . t) ; 範囲外を削除 +            (delete-auto-save-files . t)))
-           (auto-save-timeout . 15) ; オートセーブのtimeout時間(s+
-           (auto-save-interval . 60) ; オートセーブの頻度(s+
-           (delete-auto-save-files . t) ; 終了時にオートセーブファイルを削除する +
-           ;; (auto-save-file-name-transforms . '((".*" ,(locate-user-emacs-file "backup/") t))) +
-           ;; (backup-directory-alist . '((".*" . ,(locate-user-emacs-file "backup")) +
-           ;;                             (,tramp-file-name-regexp . nil))) +
- ; backupとauto-saveファイルは.emacs/backupにおく +
-           ))+
  
-;;; startup 2024/08/21 
 (leaf startup (leaf startup
-  :doc "process Emacs shell arguments" +  :config 
-  :tag "internal" +  (setq init-file-debug t 
-  :custom `((init-file-debug t) ; init.elをdebugする +        auto-save-list-file-prefix (locate-user-emacs-file "backup/.saves-"
-            (auto-save-list-file-prefix . ,(locate-user-emacs-file "backup/.saves-")+        inhibit-startup-screen t 
- ; auto-save listの設定をする(files参照) +        inhibit-startup-message t 
-            (inhibit-startup-screen t) ; スタートアップ画面を表示させない +        inhibit-startup-echo-area-message t 
-            (inhibit-startup-message t) ; スタートアップメッセージを表示させない +        initial-scratch-message ""))
-            (inhibit-startup-echo-area-message t) ; スタートアップ時、echoエリアメッセージを表示させない +
-            (initial-scratch-message "") ; *scratch* バッファの初期メッセージを消す +
-           ))+
  
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;; Additional Packages 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- +;;; 補完: company 
-;;; company-mode 2024/06/12 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;  2024/08/21 leaf対応+
 (leaf company (leaf company
-  :doc "Modular text completion framework" 
-  :req "emacs-24.3" 
-  :tag "matching" "convenience" "abbrev" "emacs>=24.3" 
-  :url "http://company-mode.github.io/" 
-  :emacs>= 24.3 
   :ensure t   :ensure t
-  ;; :blackout t 
-  :leaf-defer nil 
   :bind (("C-M-i" . company-complete)   :bind (("C-M-i" . company-complete)
-         (company-active-map +         (:company-active-map
-          ("M-n" . nil) +
-          ("M-p" . nil) +
-          ("C-n" . company-select-next) ; 次の補完候補へ +
-          ("C-p" . company-select-previous) ; 前の補完候補へ +
-          ("C-s" . company-filter-candidates) +
-          ("C-h" . nil) ; C-hは無効化(BS設定) +
-          ("C-S-h" . company-show-doc-buffer) ; ドキュメント表示はC-Shift-h +
-          ("<tab>" . company-complete-common) ; 共通部分までを補完する +
-          ) +
-         (company-search-map+
           ("C-n" . company-select-next)           ("C-n" . company-select-next)
           ("C-p" . company-select-previous)           ("C-p" . company-select-previous)
-          )) +          ("C-s" . company-filter-candidates) 
-  ;; :hook (emacs-lisp-mode-hook . company-mode) ; Elisp-modeで有効 +          ("C-h" . nil
-  :custom ((company-idle-delay . 0.3) ; companyが動作するまでのタイムラグ +          ("C-S-h" . company-show-doc-buffer) 
-           (company-minimum-prefix-length . 2) ; デフォルトは4 +          ("<tab>" . company-complete-common)
-           (company-transformers . '(company-sort-by-backend-importance)) ; ソート順 +         (:company-search-map 
-           ; (company-transformers . '(company-sort-by-occurrence)) ; 発見(記述)順 +          ("C-n" . company-select-next) 
-           (company-auto-expand . t) ; 全Bufferで有効 +          ("C-p" . company-select-previous))) 
-           (company-selection-wrap-around . t) ; 候補の最後の次は先頭に戻る +  :custom '((company-idle-delay . 0.3) 
-           (completion-ignore-case . t) ; 補完時に大文字小文字を区別しない +            (company-minimum-prefix-length . 2) 
-           (company-dabbrev-downcase . nil) +            (company-transformers . '(company-sort-by-backend-importance)) 
-           (company-show-numbers . t) +            (company-auto-expand . t) 
-           ) +            (company-selection-wrap-around . t) 
-  ;; :global-minor-mode global-company-mode +            (completion-ignore-case . t) 
-  :custom-face +            (company-dabbrev-downcase . nil) 
-  (company-tooltip +            (company-show-numbers . t)))
-   `((t :foreground "#36c6b0" :background "#244f36"))) ; 未選択項目 +
-  (company-tooltip-common +
-   `((t :foreground "white"   :background "#244f36"))) ; 未選択項目&一致文字 +
-  (company-tooltip-selection +
-   `((t :foreground "#a1ffcd" :background "#007771"))) ; 選択項目 +
-  (company-tooltip-common-selection +
-   `((t :foreground "white"   :background "#007771"))) ; 選択項目&一致文字 +
-  (company-scrollbar-fg +
-   `((t :background "#4cd0c1"))) ; スクロールバー +
-  (company-scrollbar-bg +
-   `((t :background "#002b37"))) ; スクロールバー背景 +
-  )+
  
-;;; lua-mode 2024/06/12 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;;  2024/08/19 leaf対応+;;; 言語モード 
 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (leaf lua-mode (leaf lua-mode
   :ensure t   :ensure t
   :mode ("\\.lua\\'" . lua-mode)   :mode ("\\.lua\\'" . lua-mode)
   :interpreter ("lua" . lua-mode)   :interpreter ("lua" . lua-mode)
-  :custom ((lua-indent-level . 2) ; Indent offset +  :custom '((lua-indent-level . 2) 
-           (lua-indent-string-contents . nil) ; 複数行にわたる文字列をコメント同様に字下げする +            (lua-indent-string-contents . nil) 
-           (lua-indent-nested-block-content-align . t) ; 入れ子のブロックの内容を開括弧で揃える +            (lua-indent-nested-block-content-align . t) 
-           (lua-indent-close-paren-align . t) ; 閉じ括弧を行頭ではなく開き括弧に合わせる +            (lua-indent-close-paren-align . t) 
-           (lua-default-application . "/usr/local/bin/lua") ; subprocess command path +            (lua-default-application . "/usr/local/bin/lua"
-           (lua-default-command-switches . "-i") ; subprocess実行時の引数 +            (lua-default-command-switches . "-i"
-           (lua-always-show . t)) ; subprocess実行の REPL bufferを表示 +            (lua-always-show . t)) 
-  :config +  :config (add-hook 'lua-mode-hook #'company-mode))
-  (leaf company-lua +
-    :ensure t +
-    :hook (add-hook 'lua-mode-hook 'company-mode) ; company-modeをenable +
-    ))+
  
-;;; caddyfile-mode (cnfiguration mode) 2024/08/05 
-;;; 2024/08/19 ; leaf対応 
 (leaf caddyfile-mode (leaf caddyfile-mode
   :ensure t   :ensure t
   :mode (("Caddyfile\\'" . caddyfile-mode)   :mode (("Caddyfile\\'" . caddyfile-mode)
          ("caddy\\.conf\\'" . caddyfile-mode))          ("caddy\\.conf\\'" . caddyfile-mode))
-  :hook (caddyfile-mode-hook . my-caddyfile-hook) +  :hook (caddyfile-mode-hook . (lambda () (setq-local tab-width 4 
-  :config +                                                     indent-tabs-mode nil))))
-  (defun my-caddyfile-hook () +
-    "Custom configurations for `caddyfile-mode`." +
-    (setq-local tab-width 4) ; Default: 8 +
-    (setq-local indent-tabs-mode nil)) ; Default: t +
-  )+
  
-;;; nginx mode 2024/08/05 
-;;; 2024/08/19 ; leaf対応 
 (leaf nginx-mode (leaf nginx-mode
   :ensure t   :ensure t
-  :mode ("nginx\\.conf\\'" . nginx-mode) +  :mode (("nginx\\.conf\\'" . nginx-mode)
-  :hook (nginx-mode-hook . company-mode) ; company-modeを起動 +  :hook (nginx-mode-hook . company-mode))
-  :config +
-  (leaf company-nginx +
-    :ensure t +
-    :hook (add-hook 'nginx-mode-hook 'company-mode) ; company-modeをenable +
-    ))+
  
-;;; w3m 2024/08/25 
-;;; Emacs W3m browser support. 
 (leaf w3m (leaf w3m
   :ensure t   :ensure t
-  )+  :custom ((w3m-command . "/usr/local/bin/w3m")))
  
-;;; vc-fossil 2024/08/25 
-;;; Fossil vc backend. 
 (leaf vc-fossil (leaf vc-fossil
   :ensure t   :ensure t
-  :init (add-to-list 'vc-handled-backends 'Fossil t) +  :init (add-to-list 'vc-handled-backends 'Fossil t))
-  )+
  
-;;; go-translate 2024/08/25 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;; Text translator for Emacs. +;;; 翻訳: go-translate (鍵は環境変数/認証ストアから取得推奨) 
-;;; https://github.com/lorniu/go-translate+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (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 '((gt-langs . '(en ja)))
   :config   :config
-  (setq gt-langs '(en ja)) +  ;; DeepL API キーは環境変数 DEEPL_API_KEY から取得。未設定なら DeepL を使わず Google/Bing へフォールバック。 
-  (setq gt-default-translator +  (let ((deepl-key (getenv "DEEPL_API_KEY"))) 
-        (gt-translator +    (setq gt-default-translator 
-         :taker   (gt-taker :text 'buffer :pick 'paragraph) ; config the Taker +          (gt-translator 
-         :engines (list +           :taker (gt-taker :text 'buffer :pick 'paragraph) 
-                   ;; (gt-bing-engine) ; Bing Translator +           :engines (delq nil (list (gt-deepl-engine :key "d7b2482e-9a53-43a5-885d-bc511b7b0aad:fx" :pro nil) 
-                   (gt-google-engine) ; Google Translator +                                    (gt-google-engine) 
-                   (gt-deepl-engine :key "DeepLAPI-KeyX-xxxx-xxxx-secret:XX" :pro nil) +                                    (gt-bing-engine))
-                                                                        ; DeepL Translator +           :render (gt-buffer-render)))))
-                   +
-         :render  (gt-buffer-render))) ; config the Render +
-  )+
  
-;;; my:deepl-translate 2024/08/25 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;; Deepl translation on web page(Web経由+;;; EasyPG (GPG) 
-(leaf my:deepl-traqslate +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-  :bind ("C-c T" . my:deepl-translate) +(leaf epa-file 
-  :preface +  :require t 
-  (defun my:deepl-translate (&optional string) +  :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 'loopback)))
-                 (buffer-substring (region-beginning) (region-end))) +
-                (+
-                 (save-excursion +
-                   (let (s) +
-                     (forward-char 1) +
-                     (backward-sentence) +
-                     (setq s (point)) +
-                     (forward-sentence) +
-                     (buffer-substring s (point))))))) +
-    (run-at-time 0.1 nil 'deactivate-mark) +
-    (browse-url +
-     (concat +
-      "https://www.deepl.com/translator#en/ja/" +
-      (url-hexify-string string) +
-      ))))+
  
-;;; Specific Configuration +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;; for mu4e +;;; mu4e 設定を分離ロード 
-(load "~/.emacs.d/mu4e-init.el")+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
 +(load (expand-file-name "~/.config/emacs/mu4e-init.el") t)
  
 (provide 'init) (provide 'init)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; init.el ends here
-;;;; init.el ends here +
- +
-;; Local Variables: +
-;; coding: utf-8 +
-;; comment-column: 72 +
-;; version-control:+
-;; kept-old-versions:+
-;; kept-new-versions:+
-;; End:+
 </code> </code>
userapps/emacs.1767637067.txt.gz · 最終更新: by seirios

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki