Skip to content

Instantly share code, notes, and snippets.

@miyamuko
Created July 23, 2010 11:22
Show Gist options
  • Select an option

  • Save miyamuko/487310 to your computer and use it in GitHub Desktop.

Select an option

Save miyamuko/487310 to your computer and use it in GitHub Desktop.
パッケージと同じ prefix を持つ関数を export するコードを生成する。
;; パッケージと同じ 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