Last active
December 10, 2015 20:48
-
-
Save i03nomura1y/4490126 to your computer and use it in GitHub Desktop.
Emacs Lisp macro for add-to-list
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
;; add-to-list のマクロ | |
(defmacro append-to-list (to lst) | |
`(progn (mapcar (lambda (arg) (add-to-list ,to arg)) ,lst) | |
(eval ,to))) | |
;;; Usage | |
;; load-path 追加 | |
(setq nom-slispd "/path/to/site-lisp" | |
(append-to-list 'load-path | |
(list nom-slispd | |
(concat nom-slispd "/php-mode") | |
(concat nom-slispd "/color-theme") | |
(concat nom-slispd "/yatex") | |
(concat nom-slispd "/mmm-mode") | |
(concat nom-slispd "/evernote-mode") | |
(concat nom-slispd "/w3m"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment