├── .editorconfig ├── .gitignore ├── early-init.el ├── init.el └── lisp └── reformat-github-markdown-link.el /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*,!*.el] 10 | indent_size = 2 11 | indent_style = space 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *core 2 | *elc 3 | *stuckdump 4 | *~ 5 | /.authinfo.plist 6 | /.custom.el 7 | /.desktop.el 8 | /.desktop.lock 9 | /.forge-database.sqlite 10 | /.prescient-save.el 11 | /.recentf.el 12 | /.scratch.el 13 | /auto-save-list 14 | /bookmarks 15 | /customize.el 16 | /el-get 17 | /eln-cache 18 | /elpa 19 | /games 20 | /history 21 | /network-security.data 22 | /projectile-bookmarks.eld 23 | /projectile.cache 24 | /tramp 25 | /transient 26 | /url 27 | request 28 | -------------------------------------------------------------------------------- /early-init.el: -------------------------------------------------------------------------------- 1 | ;;; early-init.el --- undoc 2 | ;;; Commentary: 3 | 4 | ;;; Code: 5 | 6 | (set-variable 'ns-use-native-fullscreen nil) 7 | (set-variable 'x-super-keysym 'meta) 8 | 9 | (push '(menu-bar-lines . 0) default-frame-alist) 10 | (push '(tool-bar-lines . 0) default-frame-alist) 11 | 12 | (push '(fullscreen . maximized) default-frame-alist) 13 | 14 | (provide 'early-init) 15 | ;;; early-init.el ends here 16 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el --- A setting of my own Emacs. -*- lexical-binding: t; -*- 2 | ;;; Commentary: 3 | ;;; Code: 4 | 5 | (set-variable 'debug-on-error t) 6 | (set-variable 'init-file-debug t) 7 | (set-variable 'load-prefer-newer t) 8 | 9 | (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) 10 | 11 | (defun elim:first-existing-path-in (list) 12 | "Return first existing path in LIST." 13 | (car (cl-remove-if-not #'file-exists-p list))) 14 | 15 | ;; this enables this running method 16 | ;; emacs -q -l ~/.debug.emacs.d/init.el 17 | (eval-and-compile 18 | (when (or load-file-name byte-compile-current-file) 19 | (setq user-emacs-directory 20 | (expand-file-name 21 | (file-name-directory (or load-file-name byte-compile-current-file)))))) 22 | 23 | ;;; leaf.el 24 | ;; 25 | (eval-and-compile 26 | (customize-set-variable 27 | 'package-archives '(("gnu" . "https://elpa.gnu.org/packages/") 28 | ("melpa" . "https://melpa.org/packages/") 29 | ("org" . "https://orgmode.org/elpa/"))) 30 | (package-initialize) 31 | (unless (package-installed-p 'leaf) 32 | (package-refresh-contents) 33 | (package-install 'leaf)) 34 | 35 | (leaf leaf-keywords 36 | :ensure t 37 | :config 38 | ;; optional packages if you want to use :hydra, :el-get,,, 39 | (leaf hydra :ensure t) 40 | (leaf blackout :ensure t) 41 | 42 | ;; initialize leaf-keywords.el 43 | (leaf-keywords-init))) 44 | 45 | (leaf browse-at-remote 46 | :doc "Open github/gitlab/bitbucket/stash/gist/phab/sourcehut page from Emacs" 47 | :req "f-0.17.2" "s-1.9.0" "cl-lib-0.5" 48 | :tag "pagure" "sourcehut" "phabricator" "stash" "gist" "bitbucket" "gitlab" "github" 49 | :url "https://github.com/rmuslimov/browse-at-remote" 50 | :added "2022-12-22" 51 | :ensure t) 52 | 53 | (leaf comp 54 | :doc "compilation of qLisp code into native code" 55 | :tag "builtin" "lisp" 56 | :added "2022-12-22" 57 | :custom ((native-comp-async-report-warnings-errors . 'silent))) 58 | 59 | (leaf git-modes 60 | :doc "Major modes for editing Git configuration files" 61 | :req "emacs-25.1" "compat-29.1.3.4" 62 | :tag "git" "vc" "convenience" "emacs>=25.1" 63 | :url "https://github.com/magit/git-modes" 64 | :added "2023-04-14" 65 | :emacs>= 25.1 66 | :ensure t 67 | :after compat) 68 | 69 | (leaf nix-mode 70 | :doc "Major mode for editing .nix files" 71 | :req "emacs-25.1" "magit-section-0" "transient-0.3" 72 | :tag "unix" "tools" "languages" "nix" "emacs>=25.1" 73 | :url "https://github.com/NixOS/nix-mode" 74 | :added "2023-03-28" 75 | :emacs>= 25.1 76 | :ensure t 77 | :after magit-section) 78 | 79 | (leaf reformat-github-markdown-link 80 | :commands reformat-github-markdown-link 81 | :doc "self-made" 82 | :tag "out-of-MELPA" 83 | :added "2022-12-24" 84 | :custom ((rgml-reformat-style . 'with-repository))) 85 | 86 | (leaf tab-bar 87 | :doc "frame-local tabs with named persistent window configurations" 88 | :tag "builtin" 89 | :added "2022-02-09" 90 | :bind-keymap ("C-z" . tab-bar-map) 91 | :bind `(("M-{" . tab-previous) 92 | ("M-}" . tab-next) 93 | (:tab-bar-map 94 | ("k" . tab-close) 95 | ("c" . tab-new) 96 | ("C-k" . tab-close) 97 | ("n" . tab-next) 98 | ("p" . tab-previous) 99 | ("C-SPC" . tab-recent) 100 | ,@(mapcar (lambda (i) 101 | (cons (number-to-string i) 'tab-select)) 102 | (number-sequence 0 9)))) 103 | :custom ((tab-bar-new-tab-choice . "*scratch*") 104 | (tab-bar-tab-hints . t)) 105 | :custom-face 106 | ((tab-bar-tab . '((nil (:foreground "#112" :background "#ccc")))) 107 | (tab-bar-tab-inactive . '((nil (:foreground "#ccc" :background "#112"))))) 108 | :global-minor-mode t) 109 | 110 | (leaf topsy 111 | :doc "Simple sticky header" 112 | :req "emacs-26.3" 113 | :tag "convenience" "emacs>=26.3" 114 | :url "https://github.com/alphapapa/topsy.el" 115 | :added "2022-12-24" 116 | :emacs>= 26.3 117 | :ensure t 118 | :global-minor-mode t) 119 | 120 | (leaf vertico-posframe 121 | :doc "Using posframe to show Vertico" 122 | :req "emacs-26.0" "posframe-1.1.4" "vertico-0.13.0" 123 | :tag "vertico" "matching" "convenience" "abbrev" "emacs>=26.0" 124 | :url "https://github.com/tumashu/vertico-posframe" 125 | :added "2022-03-02" 126 | :emacs>= 26.0 127 | :ensure t 128 | :after posframe vertico 129 | :global-minor-mode t) 130 | 131 | (leaf window 132 | :doc "GNU Emacs window commands aside from those written in C" 133 | :tag "builtin" "internal" 134 | :added "2023-04-18" 135 | :config 136 | (put 'scroll-left 'disabled nil)) 137 | 138 | (leaf *environments 139 | :custom `((enable-recursive-minibuffers . t) 140 | (gc-cons-threshold . ,(* 128 1024 1024)) 141 | (use-dialog-box . nil) 142 | (user-mail-address . "takeru.naito@gmail.com") 143 | (user-full-name . "Takeru Naito")) 144 | :config 145 | (defalias 'yes-or-no-p 'y-or-n-p) 146 | (leaf async 147 | :ensure t) 148 | (leaf cus-edit 149 | :doc "Just prevent appending to this file (not load at startup)." 150 | :custom `((custom-file . ,(locate-user-emacs-file ".custom.el")))) 151 | (leaf frame 152 | :if window-system 153 | :preface 154 | (defun elim:frame-fullscreen () 155 | ;; FIXME: Sometimes may become native full screen on macOS even 156 | ;; the ns-use-native-fullscreen is nil (especially on 157 | ;; startup). 158 | (set-frame-parameter nil 'fullscreen 'fullboth)) 159 | :config 160 | (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) 161 | (add-to-list 'default-frame-alist '(ns-appearance . dark)) 162 | :custom ((line-spacing . 4)) 163 | :hook (window-setup-hook . elim:frame-fullscreen)) 164 | (leaf *completion 165 | :url https://blog.tomoya.dev/posts/a-new-wave-has-arrived-at-emacs 166 | :url https://emacs-jp.slack.com/archives/C1B5WTJLQ/p1623851956426000 167 | :url https://github.com/uwabami/emacs 168 | :config 169 | (leaf affe 170 | :ensure t 171 | :after orderless 172 | :custom 173 | ((affe-highlight-function . 'orderless-highlight-matches) 174 | (affe-regexp-function . 'orderless-pattern-compiler))) 175 | (leaf consult 176 | :ensure t 177 | :preface 178 | ;; C-uを付けるとカーソル位置の文字列を使うmy-consult-lineコマンドを定義する 179 | (defun tomoya:consult-line (&optional at-point) 180 | "Consult-line uses things-at-point if set C-u prefix." 181 | (interactive "P") 182 | (if at-point 183 | (consult-line (thing-at-point 'symbol)) 184 | (consult-line))) 185 | :bind (([remap switch-to-buffer] . consult-buffer) ; C-x b 186 | ([remap switch-to-buffer-other-window] . consult-buffer-other-window) ; C-x 4 b 187 | ([remap display-buffer-other-frame] . consult-buffer-other-frame) ; C-x 5 b 188 | ([remap repeat-complex-command] . consult-complex-command) ; C-x C-: 189 | ([remap pop-global-mark] . consult-global-mark) ; C-x C-SPC 190 | ([remap goto-line] . consult-goto-line) ; M-g g 191 | ([remap yank-pop] . consult-yank-pop) ; M-y 192 | 193 | ("C-;" . consult-buffer) 194 | ("C-x C-;" . consult-buffer) 195 | 196 | ("C-x C-o" . consult-file-externally) ; orig. delete-blank-lines 197 | ("C-x C-p" . consult-find) ; orig. mark-page 198 | ("M-s M-s" . tomoya:consult-line) 199 | ("C-S-s" . consult-imenu) ; orig. imenu 200 | )) 201 | (leaf embark-consult 202 | :ensure t 203 | :require t 204 | :after consult) 205 | (leaf marginalia 206 | :ensure t 207 | :global-minor-mode t) 208 | (leaf orderless 209 | :ensure t 210 | :custom (completion-styles . '(orderless))) 211 | (leaf savehist 212 | :global-minor-mode t) 213 | (leaf vertico 214 | :url https://github.com/uwabami/emacs 215 | :preface 216 | (defun uwabami:filename-upto-parent () 217 | "Move to parent directory like \"cd ..\" in find-file." 218 | (interactive) 219 | (let ((sep (eval-when-compile (regexp-opt '("/" "\\"))))) 220 | (save-excursion 221 | (left-char 1) 222 | (when (looking-at-p sep) 223 | (delete-char 1))) 224 | (save-match-data 225 | (when (search-backward-regexp sep nil t) 226 | (right-char 1) 227 | (filter-buffer-substring (point) 228 | (save-excursion (end-of-line) (point)) 229 | #'delete))))) 230 | :ensure t 231 | :bind (:vertico-map 232 | (("C-l" . uwabami:filename-upto-parent) 233 | ("C-r" . vertico-previous) 234 | ("C-s" . vertico-next))) 235 | :custom (vertico-count . 20) 236 | :global-minor-mode t)) 237 | (leaf *fonts 238 | :defun elim:set-text-height 239 | :preface 240 | (defun elim:set-text-height (height) 241 | "Set to the HEIGHT and the family to the default face and some faces." 242 | (let* ((asciifont "Cica") ; ASCII fonts 243 | (jpfont "Cica") ; Japanese fonts 244 | (fontspec (font-spec :family asciifont :weight 'normal)) 245 | (jp-fontspec (font-spec :family jpfont :weight 'normal))) 246 | (set-face-attribute 'default nil :family asciifont :height height) 247 | (set-face-attribute 'fixed-pitch nil :family asciifont :height height) 248 | (set-fontset-font nil 'japanese-jisx0213.2004-1 jp-fontspec) 249 | (set-fontset-font nil 'japanese-jisx0213-2 jp-fontspec) 250 | (set-fontset-font nil 'katakana-jisx0201 jp-fontspec) 251 | (set-fontset-font nil '(#x0080 . #x024F) fontspec) 252 | (set-fontset-font nil '(#x0370 . #x03FF) fontspec))) 253 | (defun elim:change-interactive-text-height () 254 | (interactive) 255 | (let 256 | ((height (face-attribute 'default :height)) 257 | (step 10) (char nil)) 258 | (catch 'end:flag 259 | (while t 260 | (message "change text height. p:up n:down height:%s" height) 261 | (setq char (read-char)) 262 | (cond 263 | ((= char ?p) 264 | (setq height (+ height step))) 265 | ((= char ?n) 266 | (setq height (- height step))) 267 | ((and (/= char ?p) (/= char ?n)) 268 | (message "quit text height:%s" height) 269 | (throw 'end:flag t))) 270 | (elim:set-text-height height))))) 271 | :config 272 | (cond 273 | ((eq window-system 'ns) 274 | (set-variable 'ns-antialias-text t) 275 | (elim:set-text-height 180)) 276 | ((eq window-system 'x) 277 | (elim:set-text-height 160)))) 278 | (leaf ns 279 | :if (featurep 'ns) 280 | :custom 281 | ((ns-antialias-text . t) 282 | (ns-pop-up-frames . nil) 283 | (ns-use-native-fullscreen . nil) 284 | 285 | (ns-alternate-modifier . 'meta) 286 | (ns-command-modifier . 'meta) 287 | (ns-right-alternate-modifier . 'hyper) 288 | (ns-right-command-modifier . 'super))) 289 | (leaf simple 290 | :defun elim:editorconfig-mode-enabled-p 291 | :preface 292 | (defvar elim:auto-delete-trailing-whitespace-enable-p t) 293 | (defun elim:editorconfig-mode-enabled-p () 294 | (assoc 'editorconfig-mode minor-mode-alist)) 295 | (defun elim:auto-delete-trailing-whitespace () 296 | (and elim:auto-delete-trailing-whitespace-enable-p 297 | (not (elim:editorconfig-mode-enabled-p)) 298 | (delete-trailing-whitespace))) 299 | :bind (("" . delete-char) 300 | ("C-h" . delete-char) 301 | ("C-m" . newline-and-indent) 302 | ("C-x |" . split-window-right) 303 | ("C-x -" . split-window-below)) 304 | :custom ((kill-ring-max . 8192)) 305 | :config 306 | (keyboard-translate ?\C-h ?\C-?) 307 | :global-minor-mode line-number-mode transient-mark-mode 308 | :hook (before-save-hook . elim:auto-delete-trailing-whitespace)) 309 | (leaf timer-list 310 | :config (put 'list-timers 'disabled nil)) 311 | (leaf vc 312 | :custom (vc-follow-symlinks . t))) 313 | 314 | (leaf *utilities 315 | :config 316 | (leaf add-node-modules-path 317 | :ensure t 318 | :hook ((js-mode-hook . add-node-modules-path) 319 | (www-mode-hook . add-node-modules-path))) 320 | (leaf auth-source 321 | :custom `(auth-sources . '(,(locate-user-emacs-file ".authinfo.plist")))) 322 | (leaf browse-url 323 | :bind ("C-x m" . browse-url-at-point)) 324 | (leaf bs 325 | :bind ("C-x C-b" . bs-show)) 326 | (leaf clipmon 327 | :ensure t 328 | :defun reformat-github-markdown-link 329 | :preface 330 | (defun elim:advice:clipmon--on-clipboard-change (f &rest args) 331 | (let* 332 | ((raw-str (car args)) 333 | (formatted-str (reformat-github-markdown-link raw-str)) 334 | (select-enable-clipboard (not (string= raw-str formatted-str)))) 335 | (apply f (list formatted-str)))) 336 | 337 | :advice 338 | (:around clipmon--on-clipboard-change 339 | elim:advice:clipmon--on-clipboard-change) 340 | :hook (after-init-hook . clipmon-mode-start) 341 | :config 342 | (when (fboundp 'gui-get-selection) 343 | (defun clipmon--get-selection () 344 | "Get the clipboard contents. With a hack for Mozilla products, to set 345 | UTF8_STRING explicitly." 346 | (ignore-errors (gui-get-selection 'CLIPBOARD 'UTF8_STRING)))) 347 | ) 348 | (leaf dabbrev 349 | :custom ((dabbrev-abbrev-skip-leading-regexp . "\\$"))) 350 | (leaf desktop 351 | :defvar desktop-globals-to-save 352 | :custom `((desktop-base-file-name . ,(locate-user-emacs-file ".desktop.el")) 353 | (desktop-base-lock-name . ,(locate-user-emacs-file ".desktop.lock")) 354 | (desktop-restore-eager . 0) 355 | (desktop-restore-frames . nil) 356 | (desktop-save-mode . +1)) 357 | :config 358 | (add-to-list 'desktop-globals-to-save 'extended-command-history) 359 | (add-to-list 'desktop-globals-to-save 'kill-ring) 360 | (add-to-list 'desktop-globals-to-save 'log-edit-comment-ring) 361 | (add-to-list 'desktop-globals-to-save 'read-expression-history)) 362 | (leaf eslint-fix 363 | :ensure t) 364 | (leaf files 365 | :if (executable-find "gls") 366 | :custom ((insert-directory-program . "gls"))) 367 | (leaf find-func 368 | :config 369 | ;; C-x F => Find Function 370 | ;; C-x V => Find Variable 371 | ;; C-x K => Find Function on Key 372 | (find-function-setup-keys)) 373 | (leaf forge 374 | :after magit 375 | :ensure t 376 | :custom `(forge-database-file . ,(locate-user-emacs-file ".forge-database.sqlite"))) 377 | (leaf dictionary 378 | :if (eq system-type 'darwin) 379 | :defun elim:dictionary-search 380 | :preface 381 | (defun elim:dictionary-search (word) 382 | (browse-url 383 | (concat "dict:///" (url-hexify-string word)))) 384 | (defun elim:dictionary-word () 385 | (interactive) 386 | (elim:dictionary-search 387 | (substring-no-properties (thing-at-point 'word)))) 388 | (defun elim:dictionary-region (beg end) 389 | (interactive "r") 390 | (elim:dictionary-search 391 | (buffer-substring-no-properties beg end))) 392 | :bind (("C-x e" . elim:dictionary-word) 393 | ("C-x y" . elim:dictionary-region))) 394 | (leaf help-fns 395 | :bind (("H-b" . describe-binding) 396 | ("H-f" . describe-function) 397 | ("H-k" . describe-key) 398 | ("H-v" . describe-variable))) 399 | (leaf open-junk-file 400 | :ensure t 401 | :bind (("C-x C-z" . open-junk-file)) 402 | :custom ((open-junk-file-format . "~/.junk/%Y/%m/%d-%H%M%S.") 403 | (open-junk-file-find-file-function . 'find-file))) 404 | (leaf recentf 405 | :defvar recentf-auto-save-timer 406 | :custom `((recentf-auto-save-timer 407 | . ,(run-with-idle-timer 30 t #'recentf-save-list)) 408 | (recentf-max-saved-items . 512) 409 | (recentf-save-file . ,(locate-user-emacs-file ".recentf.el"))) 410 | :global-minor-mode t) 411 | (leaf sort 412 | :defun elim:sort-lines-nocase 413 | :config 414 | (defun elim:sort-lines-nocase () 415 | "Ignore case when the sort the lines." 416 | (interactive) 417 | (defvar sort-fold-case) 418 | (let ((sort-fold-case t)) 419 | (call-interactively 'sort-lines))) 420 | (defalias 'sort-lines-nocase #'elim:sort-lines-nocase)) 421 | (leaf sqlformat 422 | :ensure t 423 | :custom (sqlformat-command . 'pgformatter))) 424 | 425 | (leaf *interfaces 426 | :custom ((frame-title-format . `(" %b " (buffer-file-name "( %f )"))) 427 | (inhibit-startup-screen . t) 428 | (mouse-drag-copy-region . t) 429 | (read-buffer-completion-ignore-case . t) 430 | (read-file-name-completion-ignore-case . t) 431 | (require-final-newline . t) 432 | (ring-bell-function . 'ignore) 433 | (scroll-conservatively . 1) 434 | (select-active-regions . nil) 435 | (show-trailing-whitespace . nil) 436 | (truncate-lines . nil) 437 | (visible-bell . t)) 438 | :config 439 | (put 'narrow-to-region 'disabled nil) 440 | (put 'dired-find-alternate-file 'disabled nil) 441 | (set-default 'indent-tabs-mode nil) 442 | (set-default 'cursor-in-non-selected-windows nil) 443 | (leaf buffer-move 444 | :ensure t 445 | :bind (("M-g h" . buf-move-left) 446 | ("M-g j" . buf-move-down) 447 | ("M-g k" . buf-move-up) 448 | ("M-g l" . buf-move-right))) 449 | (leaf company 450 | :ensure t 451 | :bind (("C-M-i" . company-complete) 452 | (:company-active-map 453 | ("C-n" . company-select-next) 454 | ("C-p" . company-select-previous) 455 | ("C-s" . company-filter-candidates) 456 | ("C-i" . company-complete-selection))) 457 | :custom-face ((company-preview-common . '((nil (:foreground "lightgrey" :underline t)))) 458 | (company-scrollbar-bg . '((nil (:background "gray40")))) 459 | (company-scrollbar-fg . '((nil (:background "orange")))) 460 | (company-tooltip . '((nil (:foreground "black" :background "lightgrey")))) 461 | (company-tooltip-common . '((nil (:foreground "black" :background "lightgrey")))) 462 | (company-tooltip-common-selection . '((nil (:foreground "white" :background "steelblue")))) 463 | (company-tooltip-selection . '((nil (:foreground "black" :background "steelblue"))))) 464 | :blackout company-mode 465 | :hook (after-init-hook . global-company-mode)) 466 | (leaf company-quickhelp 467 | :ensure t 468 | :global-minor-mode company-quickhelp-mode) 469 | (leaf doom-modeline 470 | :ensure t 471 | :leaf-defer nil 472 | :custom 473 | ((doom-modeline-buffer-file-name-style . 'truncate-with-project) 474 | (doom-modeline-major-mode-icon . nil) 475 | (doom-modeline-minor-modes . nil) 476 | (inhibit-compacting-font-caches . t)) 477 | :custom-face 478 | ((mode-line . '((t (:height 160)))) 479 | (mode-line-inactive . '((t (:height 160))))) 480 | :config (doom-modeline-mode)) 481 | (leaf executable 482 | :config 483 | (defun elim:executable-make-buffer-file-executable-if-script-p () 484 | (unless (string-match tramp-file-name-regexp (buffer-file-name)) 485 | (executable-make-buffer-file-executable-if-script-p))) 486 | :hook (after-save-hook . elim:executable-make-buffer-file-executable-if-script-p)) 487 | (leaf font-core 488 | :config (global-font-lock-mode t)) 489 | (leaf menu-bar 490 | :if (eq system-type 'darwin) 491 | :global-minor-mode t) 492 | (leaf mouse 493 | :bind (("C-" . nil) 494 | ("C-" . nil) 495 | ("S-" . nil) 496 | ("S-" . nil))) 497 | (leaf nyan-mode 498 | :ensure t 499 | :leaf-defer nil 500 | :global-minor-mode t 501 | :custom ((nyan-animate-nyancat . t) 502 | (nyan-wavy-trail . t))) 503 | (leaf popwin 504 | :ensure t 505 | :defvar popwin:special-display-config 506 | :require t 507 | :custom ((popwin:popup-window-position . 'bottom) 508 | (popwin:popup-window-height . 20)) 509 | :config 510 | (push '("*Google Translate*") popwin:special-display-config) 511 | :global-minor-mode t) 512 | (leaf rotate :ensure t) 513 | (leaf scroll-bar 514 | :if (fboundp 'scroll-bar-mode) 515 | :config 516 | (set-scroll-bar-mode 'right) 517 | (scroll-bar-mode -1) 518 | :global-minor-mode column-number-mode) 519 | (leaf select 520 | :custom ((select-enable-primary . nil) 521 | (select-enable-clipboard . t) 522 | (selection-coding-system . 'utf-8))) 523 | (leaf wgrep 524 | :ensure t 525 | :custom ((wgrep-auto-save-buffer . t))) 526 | (leaf *theme 527 | :config 528 | ;; (load-theme 'tango-dark t)) 529 | (leaf doom-themes 530 | :ensure t 531 | :custom ((doom-themes-enable-italic . t) 532 | (doom-themes-enable-bold . nil)) 533 | :config 534 | ;; (load-theme 'doom-city-lights t) 535 | ;; (load-theme 'doom-dracula t) 536 | ;; (load-theme 'doom-nord t) 537 | (load-theme 'doom-one t) 538 | ;; (doom-themes-neotree-config) 539 | ;; (doom-themes-org-config) 540 | (set-face-attribute 'show-paren-match nil :weight 'normal))) 541 | (leaf time 542 | :custom ((display-time-24hr-format . t)) 543 | :config (display-time)) 544 | (leaf uniquify 545 | :custom ((uniquify-buffer-name-style . 'post-forward-angle-brackets) 546 | (uniquify-ignore-buffers-re . "*[^*]+*") 547 | (uniquify-min-dir-content . 1))) 548 | (leaf which-key 549 | :ensure t 550 | :hook (after-init-hook . which-key-mode)) 551 | (leaf windmove 552 | :custom ((windmove-wrap-around . t)) 553 | :bind (("C-c C-b" . windmove-left) 554 | ("C-c C-n" . windmove-down) 555 | ("C-c C-p" . windmove-up) 556 | ("C-c C-f" . windmove-right)))) 557 | 558 | (leaf *minor-modes 559 | :config 560 | (leaf anzu 561 | :ensure t 562 | :bind (([remap query-replace] . anzu-query-replace) 563 | ([remap query-replace-regexp] . anzu-query-replace-regexp)) 564 | :custom ((anzu-mode-lighter . "") 565 | (anzu-deactivate-region . t) 566 | (anzu-search-threshold . 1000)) 567 | :global-minor-mode global-anzu-mode) 568 | (leaf atomic-chrome 569 | :ensure t 570 | :preface 571 | (defun elim:atomic-chrome-edit-done-hook-func () 572 | (kill-new (buffer-string))) 573 | :custom ((atomic-chrome-default-major-mode . 'markdown-mode) 574 | (atomic-chrome-url-major-mode-alist 575 | . '(("github\\.com" . gfm-mode) 576 | ("esa\\.io" . gfm-mode) 577 | ("redmine" . textile-mode)))) 578 | :hook ((after-init-hook 579 | . atomic-chrome-start-server) 580 | (atomic-chrome-edit-done-hook 581 | . elim:atomic-chrome-edit-done-hook-func))) 582 | (leaf autorevert 583 | :global-minor-mode global-auto-revert-mode) 584 | (leaf auto-save-visited-mode 585 | :bind ("C-x as" . auto-save-visited-mode) 586 | :leaf-defer nil 587 | :custom ((auto-save-visited-interval . 0.5)) 588 | :global-minor-mode t) 589 | (leaf *dired 590 | :config 591 | (leaf dired 592 | :bind (:dired-mode-map 593 | ("SPC" . elim:dired-toggle-mark) 594 | ("r" . dired-toggle-read-only)) 595 | :custom ((dired-recursive-copies . 'always) 596 | (dired-recursive-deletes . 'always)) 597 | :preface 598 | ;; Mark with space (like the FD) 599 | (defun elim:dired-toggle-mark (arg) 600 | "Toggle the current (or next ARG) files." 601 | ;; S.Namba Sat Aug 10 12:20:36 1996 602 | (interactive "P") 603 | (let ((dired-marker-char 604 | (if (save-excursion (beginning-of-line) 605 | (looking-at " ")) 606 | dired-marker-char ?\040))) 607 | (dired-mark arg) 608 | (dired-next-line 0)))) 609 | (leaf dired-x 610 | :custom ((dired-bind-jump . nil) 611 | (dired-guess-shell-alist-user 612 | . '(("\\.tar\\.gz\\'" "tar tzvf") 613 | ("\\.taz\\'" "tar ztvf") 614 | ("\\.tar\\.bz2\\'" "tar tjvf") 615 | ("\\.zip\\'" "unzip -l") 616 | ("\\.\\(g\\|\\) z\\'" "zcat")))))) 617 | (leaf diff-mode 618 | :custom-face 619 | ((diff-added . '((nil (:foreground "white" :background "dark green")))) 620 | (diff-removed . '((nil (:foreground "white" :background "dark red")))) 621 | (diff-refine-change . '((nil (:foreground nil :background nil :weight 'bold :inverse-video t)))))) 622 | (leaf editorconfig 623 | :ensure t 624 | :init 625 | (defun elim:coordinate-editorconfig-with-web-mode (_props) 626 | "When using web mode, leaves the code format to prettifiers." 627 | (when (derived-mode-p 'web-mode) 628 | (set-variable 'web-mode-script-padding 0) 629 | (set-variable 'web-mode-style-padding 0))) 630 | :hook (editorconfig-after-apply-functions 631 | . elim:coordinate-editorconfig-with-web-mode) 632 | :global-minor-mode editorconfig-mode 633 | :blackout editorconfig-mode) 634 | (leaf eldoc 635 | :custom ((eldoc-idle-delay . 0.2) 636 | (eldoc-minor-mode-string . "")) 637 | :hook ((emacs-lisp-mode 638 | lisp-interaction-mode 639 | ielm-mode-hook) . turn-on-eldoc-mode)) 640 | (leaf *flycheck 641 | :config 642 | (leaf flycheck 643 | :ensure t 644 | :hook (after-init-hook . global-flycheck-mode) 645 | :init (add-to-list 'exec-path (expand-file-name "bin" user-emacs-directory))) 646 | (leaf flycheck-posframe 647 | :ensure t 648 | :after flycheck 649 | :hook (flycheck-mode-hook . flycheck-posframe-mode))) 650 | (leaf flyspell 651 | :custom ((ispell-dictionary . "american") 652 | (flyspell-use-meta-tab . nil))) 653 | (leaf google-translate 654 | :ensure t 655 | :defun google-translate-translate 656 | :bind (("C-c t" . google-translate-enja-or-jaen)) 657 | :custom (google-translate-backend-method . 'curl) 658 | :url http://emacs.rubikitch.com/google-translate/ 659 | :config 660 | (defvar google-translate-english-chars "[:ascii:]" 661 | "If the target string consists of that pattern, it is assumed to be English.") 662 | (defun google-translate-enja-or-jaen (&optional string) 663 | "Translates the region, sentence or STRING by 664 | Google(with automatic language detection)." 665 | (interactive) 666 | (setq string 667 | (cond ((stringp string) string) 668 | (current-prefix-arg 669 | (read-string "Google Translate: ")) 670 | ((use-region-p) 671 | (buffer-substring (region-beginning) (region-end))) 672 | (t 673 | (save-excursion 674 | (let (s) 675 | (forward-char 1) 676 | (backward-sentence) 677 | (setq s (point)) 678 | (forward-sentence) 679 | (buffer-substring s (point))))))) 680 | (let* ((asciip (string-match 681 | (format "\\`[%s]+\\'" google-translate-english-chars) 682 | string))) 683 | (run-at-time 0.1 nil 'deactivate-mark) 684 | (google-translate-translate 685 | (if asciip "en" "ja") 686 | (if asciip "ja" "en") 687 | string)))) 688 | (leaf help 689 | :config (temp-buffer-resize-mode t)) 690 | (leaf hideshow 691 | :bind ((:hs-minor-mode-map 692 | ("C-c C-M-c" . hs-toggle-hiding) 693 | ("C-c h" . hs-toggle-hiding) 694 | ("C-c l" . hs-hide-level)))) 695 | (leaf hl-line 696 | :global-minor-mode global-hl-line-mode) 697 | (leaf paren 698 | :url http://0xcc.net/unimag/10/ 699 | :global-minor-mode show-paren-mode 700 | :config 701 | (defvar elim:paren-face 'paren-face) 702 | (defvar elim:brace-face 'brace-face) 703 | (defvar elim:bracket-face 'bracket-face) 704 | (make-face 'paren-face) 705 | (make-face 'brace-face) 706 | (make-face 'bracket-face) 707 | (set-face-foreground 'paren-face "#88aaff") 708 | (set-face-foreground 'brace-face "#ffaa88") 709 | (set-face-foreground 'bracket-face "#aaaa00") 710 | (leaf lisp-mode 711 | :config 712 | (add-to-list 'lisp-el-font-lock-keywords-2 '("(\\|)" . elim:paren-face))) 713 | (leaf scheme-mode 714 | :defvar scheme-font-lock-keywords-2 715 | :config 716 | (defun elim:scheme-mode-hook-func () 717 | (add-to-list 'scheme-font-lock-keywords-2 '("(\\|)" . elim:paren-face))) 718 | :hook (scheme-mode-hook . elim:scheme-mode-hook-func)) 719 | (leaf cc-mode 720 | :defvar c-font-lock-keywords-3 721 | :config 722 | (defun elim:c-mode-common-hook-func-paren () 723 | (add-to-list 'c-font-lock-keywords-3 '("(\\|)" . elim:paren-face)) 724 | (add-to-list 'c-font-lock-keywords-3 '("{\\|}" . elim:brace-face)) 725 | (add-to-list 'c-font-lock-keywords-3 '("\\[\\|\\]" . elim:bracket-face))) 726 | :hook ((c-mode-common-hook . elim:c-mode-common-hook-func-paren)))) 727 | (leaf persistent-scratch 728 | :ensure t 729 | :leaf-defer nil 730 | :custom `(persistent-scratch-save-file . ,(locate-user-emacs-file ".scratch.el")) 731 | :config 732 | (with-current-buffer "*scratch*" 733 | (emacs-lock-mode 'kill)) 734 | (persistent-scratch-setup-default)) 735 | (leaf projectile 736 | :ensure t 737 | :bind (("M-t" . projectile-command-map)) 738 | :global-minor-mode t 739 | :custom (projectile-enable-caching . t) 740 | :blackout projectile-mode) 741 | (leaf rainbow-mode 742 | :ensure t 743 | :blackout t 744 | :hook ((css-mode-hook 745 | emacs-lisp-mode-hook 746 | scss-mode-hook 747 | php-mode-hook 748 | html-mode-hook) . rainbow-mode)) 749 | (leaf server 750 | :require t 751 | :defun server-running-p 752 | :custom (server-window . 'pop-to-buffer) 753 | :config 754 | (unless (server-running-p) (server-start)) 755 | (remove-hook 756 | 'kill-buffer-query-functions 757 | 'server-kill-buffer-query-function)) 758 | (leaf *skk 759 | :config 760 | (leaf skk 761 | :ensure ddskk 762 | :bind* (("C-x C-j" . skk-mode) 763 | ("C-x t" . nil) 764 | ("C-x j" . nil)) 765 | :custom `((default-input-method . "japanese-skk") 766 | (skk-user-directory . ,(expand-file-name "ddskk" (getenv "XDG_CONFIG_HOME"))) 767 | (skk-jisyo-code . 'utf-8) 768 | (skk-count-private-jisyo-candidates-exactly . t) 769 | (skk-share-private-jisyo . t) 770 | (skk-server-host . "localhost") 771 | (skk-server-portnum . 1178) 772 | (skk-japanese-message-and-error . t) 773 | (skk-kutouten-type . 'jp) 774 | (skk-show-annotation . t) 775 | (skk-henkan-strict-okuri-precedence . t) 776 | (skk-check-okurigana-on-touroku . 'auto) 777 | (skk-isearch-start-mode . 'latin) 778 | (skk-search-sagyo-henkaku . t)) 779 | :config 780 | (condition-case nil 781 | (skk-server-version) 782 | (error 783 | (let 784 | ((dic-file "/usr/share/skk/SKK-JISYO.L")) 785 | (and (file-exists-p dic-file) 786 | (set-variable 'skk-jisyo-code nil) 787 | (set-variable 'skk-large-jisyo dic-file))))) 788 | (let 789 | ((skk-auto-save-jisyo-interval 6)) 790 | (run-with-idle-timer skk-auto-save-jisyo-interval t 791 | #'(lambda () (skk-save-jisyo +1))))) 792 | (leaf ddskk-posframe 793 | :doc "Show Henkan tooltip for ddskk via posframe" 794 | :after skk 795 | :ensure t 796 | :custom ((ddskk-posframe-mode . t)) 797 | :blackout ddskk-posframe-mode)) 798 | (leaf undo-tree 799 | :ensure t 800 | :bind ((:undo-tree-visualizer-mode-map 801 | ("C-g" . undo-tree-visualizer-quit))) 802 | :advice 803 | (:before undo-tree-visualize elim:advice:undo-tree-visualize:before) 804 | (:after undo-tree-visualizer-quit elim:advice:undo-tree-visualizer-quit:after) 805 | :leaf-defer nil 806 | :custom ((undo-tree-enable-undo-in-region . nil) 807 | (undo-tree-history-directory-alist 808 | . `(("." . ,(expand-file-name "undo" user-emacs-directory))))) 809 | :blackout undo-tree-mode 810 | :config 811 | (defvar elim:before:auto-save-visited-mode nil 812 | "Store the value of auto-save-visited-mode.") 813 | (defun elim:advice:undo-tree-visualize:before () 814 | (set-variable (quote elim:before:auto-save-visited-mode) 815 | auto-save-visited-mode) 816 | (auto-save-visited-mode -1)) 817 | (defun elim:advice:undo-tree-visualizer-quit:after () 818 | (auto-save-visited-mode elim:before:auto-save-visited-mode)) 819 | (global-undo-tree-mode))) 820 | 821 | (leaf *major-modes 822 | :config 823 | (leaf cc-mode 824 | :defun c-toggle-auto-hungry-state 825 | :preface 826 | (defun elim:c-mode-common-hook-func () 827 | (c-set-style "bsd") 828 | (set-variable 'indent-tabs-mode nil) 829 | (set-variable 'c-basic-offset 2) 830 | (c-toggle-auto-hungry-state -1) 831 | (subword-mode 1)) 832 | :hook ((c-mode-common-hook . elim:c-mode-common-hook-func))) 833 | (leaf css-mode 834 | :custom ((css-indent-offset . 2))) 835 | (leaf dockerfile-mode :ensure t) 836 | (leaf elisp-mode 837 | :hook (emacs-lisp-mode-hook . elim:emacs-lisp-mode-hook-func) 838 | :config 839 | (defun elim:emacs-lisp-mode-hook-func () 840 | (set-variable 'indent-tabs-mode nil) 841 | (hs-minor-mode +1))) 842 | (leaf elm-mode :ensure t) 843 | (leaf feature-mode 844 | :ensure t 845 | :after org org-table) 846 | (leaf gitconfig-mode :ensure t) 847 | (leaf gitignore-mode :ensure t) 848 | (leaf go-mode 849 | :ensure t 850 | :preface 851 | (defun elim:go-mode-hook-func () 852 | (set (make-local-variable 'tab-width) 4)) 853 | :hook (go-mode-hook . elim:go-mode-hook-func)) 854 | (leaf js2-mode 855 | :ensure t 856 | :mode ("\\.js\\'" "\\.es6\\'") 857 | :preface 858 | (defun elim:js2-mode-hook-func () 859 | (set-face-underline 'js2-warning nil) 860 | (set-variable 'indent-tabs-mode nil) 861 | (set-variable 'show-trailing-whitespace t) 862 | (hs-minor-mode +1)) 863 | :custom ((js2-basic-offset . 2) 864 | (js2-include-browser-externs . t) 865 | (js2-include-node-externs . t) 866 | (js2-mode-deactivate-region . t) 867 | (js2-mode-mode-lighter . "") 868 | (js2-mode-search-threshold . 1000) 869 | (js2-global-externs 870 | . '("define" "describe" "xdescribe" "expect" "it" "xit" 871 | "require" "$" "_" "angular" "Backbone" "JSON" "setTimeout" "jasmine" 872 | "beforeEach" "afterEach" "spyOn"))) 873 | :hook (js2-mode-hook . elim:js2-mode-hook-func)) 874 | (leaf js 875 | :custom ((js-indent-level . 2))) 876 | (leaf json-mode :ensure t) 877 | (leaf magit 878 | :ensure t 879 | :bind (("C-x v s" . magit-status) 880 | ("C-x v f" . magit-diff-buffer-file)) 881 | :custom (magit-diff-refine-hunk . 'all) 882 | :hook (git-commit-setup-hook . elim:git-commit-setup-hook-func) 883 | :init (add-to-list 'process-coding-system-alist '("git" utf-8 . utf-8)) 884 | :config 885 | (defun elim:git-commit-setup-hook-func () 886 | (flyspell-mode +1) 887 | (set (make-local-variable 888 | 'elim:auto-delete-trailing-whitespace-enable-p) nil)) 889 | :blackout auto-revert-mode) 890 | (leaf markdown-mode 891 | :ensure t 892 | :mode (("\\.md\\'" "\\ISSUE_EDITMSG\\'") . gfm-mode) 893 | :bind (:markdown-mode-map 894 | ("C-c 1" . markdown-insert-header-atx-1) 895 | ("C-c 2" . markdown-insert-header-atx-2) 896 | ("C-c b" . markdown-insert-bold) 897 | ("C-c i" . markdown-insert-italic)) 898 | :custom 899 | ((markdown-asymmetric-header . t) 900 | (markdown-fontify-code-blocks-natively . t) 901 | (markdown-gfm-use-electric-backquote . nil) 902 | (markdown-header-scaling . nil) 903 | (markdown-hr-strings . '("* * *\n\n")) 904 | (markdown-marginalize-headers . nil))) 905 | (leaf mmm-mode 906 | :ensure t 907 | :config 908 | (leaf *hack-indentation 909 | ;; https://github.com/AdamNiederer/vue-mode/issues/74#issuecomment-539711083 910 | :preface 911 | (defun elim:disable-syntax-ppss-table () 912 | (set-variable 'syntax-ppss-table nil)) 913 | :hook 914 | ((mmm-js-mode-enter-hook . elim:disable-syntax-ppss-table) 915 | (mmm-typescript-mode-enter-hook . elim:disable-syntax-ppss-table)))) 916 | (leaf org :require org org-table) 917 | (leaf php-mode 918 | :ensure t 919 | :defun php-enable-psr2-coding-style 920 | :bind (:php-mode-map 921 | ("C-c C-[" . beginning-of-defun) 922 | ("C-c C-]" . end-of-defun)) 923 | :custom ((php-mode-coding-style . 'psr2)) 924 | :preface 925 | (defun elim:php-mode-hook-func () 926 | (setq-local shell-file-name "/bin/sh") 927 | (setq-local flycheck-phpcs-standard "PSR2") 928 | (php-enable-psr2-coding-style) 929 | (hs-minor-mode +1)) 930 | :hook (php-mode-hook . elim:php-mode-hook-func)) 931 | (leaf *ruby 932 | :config 933 | (leaf rubocop :ensure t) 934 | (leaf ruby-end :ensure t) 935 | (leaf ruby-mode 936 | :ensure t 937 | :bind (:ruby-mode-map 938 | ("C-m" . reindent-then-newline-and-indent)) 939 | :custom ((ruby-deep-indent-paren-style . nil) 940 | (ruby-flymake-use-rubocop-if-available . nil) 941 | (ruby-insert-encoding-magic-comment . nil))) 942 | (leaf rspec-mode :ensure t)) 943 | (leaf salt-mode 944 | :ensure t 945 | :mode ("\\.sls\\'" "\\master\\'" "\\roster\\'" "\\Saltfile\\'")) 946 | (leaf sh-script 947 | :mode ("\\.env\\'" "\\.env.sample\\'") 948 | :custom ((sh-basic-offset . 2) 949 | (sh-indentation . 2))) 950 | (leaf slim-mode :ensure t) 951 | (leaf text-mode 952 | :preface 953 | (defun elim:text-mode-hook-func () 954 | (set-variable 'indent-tabs-mode nil)) 955 | :hook (text-mode-hook . elim:text-mode-hook-func)) 956 | (leaf terraform-mode :ensure t) 957 | (leaf *typescript 958 | :config 959 | (leaf typescript-mode 960 | :ensure t 961 | :defun company-mode-on 962 | :preface 963 | (defun elim:typescript-mode-hook-func () 964 | (tide-setup) 965 | (flycheck-mode t) 966 | (set-variable 'flycheck-check-syntax-automatically '(save mode-enabled)) 967 | (eldoc-mode t) 968 | (company-mode-on)) 969 | :hook (typescript-mode-hook . elim:typescript-mode-hook-func)) 970 | (leaf tide :ensure t)) 971 | (leaf web-mode 972 | :after flycheck 973 | :ensure t 974 | :doc "https://github.com/ananthakumaran/tide/tree/6faea517957f56467cac5be689277d6365f3aa1a#tsx" 975 | :defun flycheck-add-mode 976 | :preface 977 | (defun elim:web-mode-hook-func () 978 | (when (string-equal "tsx" (file-name-extension buffer-file-name)) 979 | (tide-setup))) 980 | :mode ("\\.ctp\\'" 981 | "\\.html.erb\\'" 982 | "\\.js.erb\\'" 983 | "\\.p?html?\\'" 984 | "\\.tsx\\'" 985 | "\\.vue\\'") 986 | :custom (;; general 987 | (web-mode-enable-auto-indentation . nil) 988 | (web-mode-enable-engine-detection . t) 989 | ;; offsets 990 | (web-mode-code-indent-offset . 2) 991 | (web-mode-css-indent-offset . 2) 992 | (web-mode-markup-indent-offset . 2) 993 | ;; paddings 994 | (web-mode-block-padding . 2) 995 | (web-mode-script-padding . 0) 996 | (web-mode-style-padding . 0) 997 | ;; styles 998 | (web-mode-comment-style . 1) 999 | (web-mode-indent-style . 1)) 1000 | :hook (web-mode-hook . elim:web-mode-hook-func) 1001 | :config (flycheck-add-mode 'javascript-eslint 'web-mode)) 1002 | (leaf yaml-mode :ensure t)) 1003 | 1004 | (provide 'init) 1005 | 1006 | ;;; init.el ends here 1007 | -------------------------------------------------------------------------------- /lisp/reformat-github-markdown-link.el: -------------------------------------------------------------------------------- 1 | ;;; reformat-github-markdown-link.el --- . -*- lexical-binding: t; -*- 2 | ;;; Commentary: 3 | ;;; Code: 4 | 5 | (defconst rgml-github-markdown-link-regexp 6 | "^\\[\\(.+?\\)\\(?: by \\(.*?\\) · \\| · \\).*· \\(.*\\)/\\(.*\\)](\\(https.+/\\(.+\\)\\))$") 7 | 8 | (defcustom rgml-reformat-style 'simple 9 | "Select the style on reformatting." 10 | :group 'reformat-github-markdown-link 11 | :type '(radio 12 | (const :tag "[#number title](url)" simple) 13 | (const :tag "[repository#number title](url)" with-repository) 14 | (const :tag "[owner/repository#number title](url)" with-owner/repository))) 15 | 16 | (cl-defun rgml-string-match-to-alist (string regexp names) 17 | "Return matched strings with NAMES as an alist. 18 | Matches REGEXP to STRING, allocates NAMES to matches, and returns 19 | them in alist." 20 | (unless (string-match regexp string) 21 | (cl-return-from rgml-string-match-to-alist nil)) 22 | 23 | (let ((index 1) (match) (alist)) 24 | (dolist (name names alist) 25 | (setq match `(,name . ,(match-string index string))) 26 | (setq alist (cons match alist)) 27 | (setq index (1+ index))))) 28 | 29 | ;;;###autoload 30 | (cl-defun reformat-github-markdown-link (markdown-link &optional variant) 31 | "Reformat a title of a Markdown-style link. 32 | MARKDOWN-LINK should be a link to a GitHub pull request, issue, or 33 | discussion. 34 | 35 | Input example: 36 | [Title · Pull Request #1 · elim/nowhere](https://github.com/elim/nowhere/pull/1) 37 | 38 | Output example: 39 | [nowhere#1 Title](https://github.com/elim/nowhere/pull/1) 40 | 41 | If set VARIANT to 'with-owner then the output string is including owner" 42 | 43 | (let 44 | ((alist (rgml-string-match-to-alist 45 | markdown-link 46 | rgml-github-markdown-link-regexp 47 | '(title author owner repository url number)))) 48 | 49 | (unless alist 50 | (cl-return-from reformat-github-markdown-link markdown-link)) 51 | 52 | (let-alist alist 53 | (pcase (or variant rgml-reformat-style) 54 | ('simple (format "[#%s %s](%s)" .number .title .url)) 55 | ('with-repository (format "[%s#%s %s](%s)" .repository .number .title .url)) 56 | ('with-owner/repository (format "[%s/%s#%s %s](%s)" .owner .repository .number .title .url)))))) 57 | 58 | (provide 'reformat-github-markdown-link) 59 | ;;; reformat-github-markdown-link.el ends here 60 | --------------------------------------------------------------------------------