summaryrefslogtreecommitdiff
path: root/src/doc.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-02-06 21:43:39 +0800
committerChong Yidong <cyd@gnu.org>2012-02-06 21:43:39 +0800
commit1449fa1d08009f384f1867aecf1aa8a46220dcc4 (patch)
treeb7d19096ec5126fbc9bd2b29e2922a2d5096bcf4 /src/doc.c
parentf2475f97b728ad7b4237b40600f3cb786c8fbce7 (diff)
downloademacs-1449fa1d08009f384f1867aecf1aa8a46220dcc4.tar.gz
* doc.c (store_function_docstring): Avoid applying docstring of alias to base function.
Fixes: debbugs:2603
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/doc.c b/src/doc.c
index 7bdb8c658b0..ad2c667e771 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -502,10 +502,12 @@ aren't strings. */)
/* Scanning the DOC files and placing docstring offsets into functions. */
static void
-store_function_docstring (Lisp_Object fun, EMACS_INT offset)
+store_function_docstring (Lisp_Object sym, EMACS_INT offset)
/* Use EMACS_INT because we get offset from pointer subtraction. */
{
- fun = indirect_function (fun);
+ /* Don't use indirect_function here, or defaliases will apply their
+ docstrings to the base functions (Bug#2603). */
+ Lisp_Object fun = XSYMBOL (sym)->function;
/* The type determines where the docstring is stored. */