Skip to content

Instantly share code, notes, and snippets.

@i03nomura1y
Last active December 10, 2015 20:48
Show Gist options
  • Save i03nomura1y/4490126 to your computer and use it in GitHub Desktop.
Save i03nomura1y/4490126 to your computer and use it in GitHub Desktop.
Emacs Lisp macro for add-to-list
;; 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