;;; srecode/document.el --- Documentation (comment) generation
-;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;; Document has now been ported to srecode, using the semantic recoder
;; as the templating engine.
-;; This file combines srecode-document.el and srecode-document-vars.el
+;; This file combines srecode/document.el and srecode/document-vars.el
;; from the CEDET repository.
(require 'srecode/args)
)
"List of common English abbreviations or full words.
These are nouns (as opposed to verbs) for use in creating expanded
-versions of names.This is an alist with each element of the form:
+versions of names. This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
("read" . "Reads from")
("reset" . "Resets the parameters and returns")
("scan" . "Scans the ")
- ("setup\\|init\\(iallize\\)?" . "Initializes the ")
+ ("setup\\|init\\(ialize\\)?" . "Initializes the ")
("select" . "Chooses the ")
("send" . "Sends a")
("re?c\\(v\\|ieves?\\)" . "Receives a ")
("str\\(ing\\)?" . "string")
("use?r" . "user")
("num\\(ber\\)?" . "number")
- ("\\(^\\|\\s-\\)id\\($\\|\\s-\\)" . "Identifier") ;complex cause ;commen sylable
+ ("\\(^\\|\\s-\\)id\\($\\|\\s-\\)" . "Identifier") ;complex cause ;common syllable
)
"List of common English abbreviations or full words.
These are nouns (as opposed to verbs) for use in creating expanded
-versions of names.This is an alist with each element of the form:
+versions of names. This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
-RESULT is a string, which can contain %s, whih is replaced with
+RESULT is a string, which can contain %s, which is replaced with
`match-string' 1."
:group 'document
:type '(repeat (cons (string :tag "Regexp")
("GC" . "Graphic Context")
("Widget" . "Widget")
)
- "Alist of input parameter types and strings desribing them.
+ "Alist of input parameter types and strings describing them.
This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
(defun srecode-document-insert-function-comment (&optional fcn-in)
"Insert or replace a function comment.
FCN-IN is the Semantic tag of the function to add a comment too.
-If FCN-IN is not provied, the current tag is used instead.
+If FCN-IN is not provided, the current tag is used instead.
It is assumed that the comment occurs just in front of FCN-IN."
(interactive)
(defun srecode-document-insert-variable-one-line-comment (&optional var-in)
"Insert or replace a variable comment.
VAR-IN is the Semantic tag of the function to add a comment too.
-If VAR-IN is not provied, the current tag is used instead.
+If VAR-IN is not provided, the current tag is used instead.
It is assumed that the comment occurs just after VAR-IN."
(interactive)
"Create documentation for the function defined in TAG.
If we can identify a verb in the list followed by some
name part then check the return value to see if we can use that to
-finish off the sentence. ie. any function with 'alloc' in it will be
+finish off the sentence. That is, any function with 'alloc' in it will be
allocating something based on its type."
(let ((al srecode-document-autocomment-return-first-alist)
(dropit nil)
(cdr (car al)))))
(setq al nil)))
(setq al (cdr al)))
- ;; add tailers to names which are obviously returning something.
+ ;; add trailers to names which are obviously returning something.
(if tailit
(progn
(setq al srecode-document-autocomment-return-last-alist)
"Convert tag or string PARAM into a name,comment pair.
Optional COMMENTLIST is list of previously existing comments to
use instead in alist form. If the name doesn't appear in the list of
-standard names, then englishify it instead."
+standard names, then english it instead."
(let ((cmt "")
(aso srecode-document-autocomment-param-alist)
(fnd nil)
(if (string-match (car (car al)) (downcase ts))
(progn
(setq newstr (concat newstr (cdr (car al))))
- ;; don't terminate because we may actuall have 2 words
- ;; next to eachother we didn't identify before
+ ;; don't terminate because we may actually have 2 words
+ ;; next to each other we didn't identify before
(setq llow t)))
(setq al (cdr al)))
(if (not llow) (setq newstr (concat newstr ts)))
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
-;; generated-autoload-feature: srecode/loaddefs
;; generated-autoload-load-name: "srecode/document"
;; End: