summaryrefslogtreecommitdiff
path: root/lispdoc.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-29 02:42:58 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-29 02:42:58 -0400
commit7e5230b8ffe32cfe7c1ec31d37c40684893aa787 (patch)
tree182101ebdd0429321339ca54a49aae0f559a5fe2 /lispdoc.el
parent9cd4c61d4ddbe87f461e402c754ea37782674bfd (diff)
Changed to using an autoconf/automake setup for building. This precipitated
many changes to the code, including: - documentation has been moved into doc/ - the chess-eco opening moves are pre-generated from chess-eco.ps into chess-eco.fen, so users don't have to wait around for it to build - no longer using lispdoc to auto-gen function stubs in chess.texi, this means that chess-maint.el and lispdoc.el are gone
Diffstat (limited to 'lispdoc.el')
-rw-r--r--lispdoc.el53
1 files changed, 0 insertions, 53 deletions
diff --git a/lispdoc.el b/lispdoc.el
deleted file mode 100644
index bbeb778..0000000
--- a/lispdoc.el
+++ /dev/null
@@ -1,53 +0,0 @@
-(require 'pp)
-
-(defun update-lispdoc-tags ()
- (interactive)
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "^@c lispfun \\(.+\\)" nil t)
- (let ((name (match-string 1)) begin end)
- (message "Update lispdoc for function '%s'" name)
- (if (re-search-forward (concat "^@defun " name) nil t)
- (setq begin (match-beginning 0)))
- (if (re-search-forward "^@end defun" nil t)
- (setq end (match-end 0)))
- (if (and begin end)
- (delete-region begin end))
- (let* ((sym (or (intern-soft name)
- (signal 'wrong-type-argument
- (list 'functionp name))))
- (data (let ((func (symbol-function sym)))
- (while (symbolp func)
- (setq func (symbol-function func)))
- func))
- (args (pp-to-string (if (listp data)
- (cadr data)
- (aref data 0))))
- (doc (documentation sym)))
- (if (or (null doc) (= (length doc) 0))
- (message "warning: no documentation available for '%s'" name)
- (unless (and begin end)
- (insert ?\n ?\n))
- (insert (format "@defun %s %s\n" name
- (substring args 1 (- (length args) 2))))
- (setq begin (point))
- (insert doc ?\n)
- (save-restriction
- (narrow-to-region begin (point))
- (goto-char (point-min))
- (let ((case-fold-search nil))
- (while (re-search-forward "[A-Z][A-Z-]+" nil t)
- (replace-match (format "@var{%s}"
- (downcase (match-string 0))) t t)))
- (goto-char (point-max)))
- (insert "@end defun")))))))
-
-(defun chess-undocd-functions ()
- (interactive)
- (save-excursion
- (dolist (func (apropos-internal "^chess-" 'functionp))
- (goto-char (point-min))
- (unless (search-forward (concat "@c lispfun " (symbol-name func)) nil t)
- (message "Missing documentation for '%s'" (symbol-name func))))))
-
-(provide 'lispdoc)