Created
July 23, 2010 11:22
-
-
Save miyamuko/487310 to your computer and use it in GitHub Desktop.
パッケージと同じ prefix を持つ関数を export するコードを生成する。
This file contains hidden or 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
| ;; パッケージと同じ prefix を持つ関数を export するコードを生成する。 | |
| (defun insert-export-functions () | |
| (interactive "*") | |
| (let* ((prefixs (cons (package-name *buffer-package*) | |
| (package-nicknames *buffer-package*))) | |
| (prefix-re (format nil "^\\(~{~A~^\\|~}\\)-" prefixs))) | |
| (insert "(export '())") | |
| (backward-char 2) | |
| (dolist (func (mapcar #'cadr (ed::lisp-build-summary-of-functions))) | |
| (when (string-match prefix-re func) | |
| (insert func #\LFD))) | |
| (ed::backward-up-list) | |
| (ed::backward-up-list) | |
| (ed::indent-sexp))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment