Function: srecode-texi-texify-docstring-default

srecode-texi-texify-docstring-default is a byte-compiled function defined in texi.el.gz.

Signature

(srecode-texi-texify-docstring-default DOCSTRING)

Documentation

Texify the doc string DOCSTRING.

Takes a few very generic guesses as to what the formatting is.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/texi.el.gz
(defun srecode-texi-texify-docstring-default (docstring)
  "Texify the doc string DOCSTRING.
Takes a few very generic guesses as to what the formatting is."
  (let ((case-fold-search nil)
	(start 0))
    (while (string-match
	    "\\(^\\|[^{]\\)\\<\\([A-Z0-9_-]+\\)\\>\\($\\|[^}]\\)"
	    docstring start)
      (let ((ms (match-string 2 docstring)))
	;(when (eq mode 'emacs-lisp-mode)
	;  (setq ms (downcase ms)))

	(when (not (or (string= ms "A")
		       (string= ms "a")
		       ))
	  (setq docstring (concat (substring docstring 0 (match-beginning 2))
			       "@var{"
			       ms
			       "}"
			       (substring docstring (match-end 2))))))
      (setq start (match-end 2)))
    ;; Return our modified doc string.
    docstring))