Lines Matching defs:magic
1 ;; texi-docstring-magic.el -- munge internal docstrings into texi
8 ;; Id: texi-docstring-magic.el,v 1.2 2004/04/11 17:56:47 karl Exp
34 ;; @c TEXI DOCSTRING MAGIC: my-package-function-or-variable-name
38 ;; M-x texi-docstring-magic to update all of the documentation strings.
41 ;; magic comment strings.
64 ;; (define-key TeXinfo-mode-map "C-cC-d" 'texi-docstring-magic-insert-magic)
80 (defun texi-docstring-magic-splice-sep (strings sep)
90 (defconst texi-docstring-magic-munge-table
171 (defun texi-docstring-magic-munge-docstring (docstring args)
174 (dolist (test texi-docstring-magic-munge-table docstring)
209 (defun texi-docstring-magic-texi (env grp name docstring args &optional endtext)
213 (texi-docstring-magic-splice-sep args " ")
215 ;; (texi-docstring-magic-splice-sep extras " ")
217 (texi-docstring-magic-munge-docstring docstring args)
222 (defun texi-docstring-magic-format-default (default)
236 (defun texi-docstring-magic-texi-for (symbol)
249 (texi-docstring-magic-texi "fn" "Face" name docstring nil)))
263 (texi-docstring-magic-texi "fn" "Command" name docstring args)
264 (texi-docstring-magic-texi "un" nil name docstring args))))
275 (texi-docstring-magic-format-default
280 (texi-docstring-magic-texi
285 (defconst texi-docstring-magic-comment
286 "@c TEXI DOCSTRING MAGIC:"
287 "Magic string in a texi buffer expanded into @defopt, or @deffn.")
289 (defun texi-docstring-magic ()
290 "Update all texi docstring magic annotations in buffer."
294 (let ((magic (concat "^"
295 (regexp-quote texi-docstring-magic-comment)
299 (while (re-search-forward magic nil t)
311 (texi-docstring-magic-texi-for symbol))))))
313 (defun texi-docstring-magic-face-at-point ()
328 (defun texi-docstring-magic-insert-magic (symbol)
332 (texi-docstring-magic-face-at-point)))
336 (format "Magic docstring for symbol (default %s): " v)
337 "Magic docstring for symbol: ")
344 (insert "\n" texi-docstring-magic-comment " " (symbol-name symbol)))
347 (provide 'texi-docstring-magic)