diff options
| author | Glenn Morris | 2012-04-09 16:43:15 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-04-09 16:43:15 -0400 |
| commit | 05920a43fc18e696b464387e781e7cfdcea5b5af (patch) | |
| tree | 9844632d0dfe04426c4032776764dfd01b33b7ff /src | |
| parent | 935396c0f0f97df05f0e41af517abed22655fd20 (diff) | |
| download | emacs-05920a43fc18e696b464387e781e7cfdcea5b5af.tar.gz emacs-05920a43fc18e696b464387e781e7cfdcea5b5af.zip | |
doc.c fix for bug#11036
* src/doc.c (Fsnarf_documentation): Check variables, functions are bound,
not just in the obarray, before snarfing them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/doc.c | 17 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index aa7d3b5eb7f..18a3d4545e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> | 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * doc.c (Fsnarf_documentation): Check variables, functions are bound, | ||
| 4 | not just in the obarray, before snarfing them. (Bug#11036) | ||
| 5 | |||
| 3 | * Makefile.in ($(leimdir)/leim-list.el): | 6 | * Makefile.in ($(leimdir)/leim-list.el): |
| 4 | Pass EMACS rather than BUILT_EMACS. | 7 | Pass EMACS rather than BUILT_EMACS. |
| 5 | 8 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Record indices of function doc strings stored in a file. | 1 | /* Record indices of function doc strings stored in a file. |
| 2 | Copyright (C) 1985-1986, 1993-1995, 1997-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1986, 1993-1995, 1997-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -671,15 +671,18 @@ the same file name is found in the `doc-directory'. */) | |||
| 671 | /* Install file-position as variable-documentation property | 671 | /* Install file-position as variable-documentation property |
| 672 | and make it negative for a user-variable | 672 | and make it negative for a user-variable |
| 673 | (doc starts with a `*'). */ | 673 | (doc starts with a `*'). */ |
| 674 | Fput (sym, Qvariable_documentation, | 674 | if (!NILP (Fboundp (sym))) |
| 675 | make_number ((pos + end + 1 - buf) | 675 | Fput (sym, Qvariable_documentation, |
| 676 | * (end[1] == '*' ? -1 : 1))); | 676 | make_number ((pos + end + 1 - buf) |
| 677 | * (end[1] == '*' ? -1 : 1))); | ||
| 677 | } | 678 | } |
| 678 | 679 | ||
| 679 | /* Attach a docstring to a function? */ | 680 | /* Attach a docstring to a function? */ |
| 680 | else if (p[1] == 'F') | 681 | else if (p[1] == 'F') |
| 681 | store_function_docstring (sym, pos + end + 1 - buf); | 682 | { |
| 682 | 683 | if (!NILP (Ffboundp (sym))) | |
| 684 | store_function_docstring (sym, pos + end + 1 - buf); | ||
| 685 | } | ||
| 683 | else if (p[1] == 'S') | 686 | else if (p[1] == 'S') |
| 684 | ; /* Just a source file name boundary marker. Ignore it. */ | 687 | ; /* Just a source file name boundary marker. Ignore it. */ |
| 685 | 688 | ||