summaryrefslogtreecommitdiff
path: root/src/doc.c
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-02-27 21:00:17 -0500
committerGlenn Morris <rgm@gnu.org>2014-02-27 21:00:17 -0500
commit2241d76e834c28dd84732ddda91bf1d559c65191 (patch)
tree8e995c7d9e282323359e85445242b2010f23892f /src/doc.c
parent289996f5e1288df9f69df469b44b7a9093ce3198 (diff)
downloademacs-2241d76e834c28dd84732ddda91bf1d559c65191.tar.gz
* src/doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
from custom-delayed-init-variables. Fixes: debbugs:11565
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/doc.c b/src/doc.c
index ecefd776b85..a42874f4503 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,7 +1,6 @@
/* Record indices of function doc strings stored in a file.
-Copyright (C) 1985-1986, 1993-1995, 1997-2014 Free Software Foundation,
-Inc.
+Copyright (C) 1985-1986, 1993-1995, 1997-2014 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -559,6 +558,12 @@ the same file name is found in the `doc-directory'. */)
char *p, *name;
bool skip_file = 0;
ptrdiff_t count;
+ /* Preloaded defcustoms using custom-initialize-delay are added to
+ this list, but kept unbound. See http://debbugs.gnu.org/11565 */
+ Lisp_Object delayed_init =
+ find_symbol_value (intern ("custom-delayed-init-variables"));
+
+ if (EQ (delayed_init, Qunbound)) delayed_init = Qnil;
CHECK_STRING (filename);
@@ -656,7 +661,8 @@ the same file name is found in the `doc-directory'. */)
/* Install file-position as variable-documentation property
and make it negative for a user-variable
(doc starts with a `*'). */
- if (!NILP (Fboundp (sym)))
+ if (!NILP (Fboundp (sym))
+ || !NILP (Fmemq (sym, delayed_init)))
Fput (sym, Qvariable_documentation,
make_number ((pos + end + 1 - buf)
* (end[1] == '*' ? -1 : 1)));