Last active
October 11, 2017 08:32
-
-
Save kobapan/053da5f8b9a0461f70d6 to your computer and use it in GitHub Desktop.
elisp 同じFUNCTIONを、複数モードのadd-hookに、一括で登録するマクロ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro def-add-hooks (lst body) | |
`(mapc #'(lambda (name) | |
(add-hook name #'(lambda () ,body))) | |
,lst)) | |
; 使い方 | |
; (def-add-hooks `(text-mode-hook markdown-mode-hook) | |
; (setq truncate-lines nil)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment