Subject: bug#12686: PATCH: ambiguous help doc strings

From: Juri Linkov <[email-masked]>
Date: Tue, 23 Oct 2012 11:04:07 +0300

> In order to check all the doc strings in Emacs, all the libraries in
> Emacs need to be loaded.  Unfortunately, Emacs crashes or becomes
> unusable when doing this.  Some libraries need to be skipped.  This
> could be because a library is loaded more than once since I use
> `load-library' rather than `require'.

To avoid crashes after loading all the libraries I suggest to try
static analysis without loading the libraries.  This is possible
to do with a function like `emacs-lisp-grep' from
http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg01259.html

When the first element of an expression read from the source file
is `defun', its docstring is in the fourth element.  A variable name
is the second element of the expression whose first element is `defvar'
or `defcustom', etc.  Conditional defvars are more tricky to process
but fortunately they are rare.