Mercurial > hg > xemacs-beta
changeset 5596:3b1d4fa716a4
Ignore lazy docstring info, #'built-in-symbol-file; nothing built-in uses it.
2011-11-13 Aidan Kehoe <kehoea@parhasard.net>
* doc.c (Fbuilt_in_symbol_file):
Don't attempt to take file information from lazy docstring
information in compiled functions; those functions are not
built-in, and as such it's appropriate to give nil.
Fix some indentation in passing.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 13 Nov 2011 17:13:52 +0000 |
parents | 391d809fa4e9 |
children | 79a1a759ec3d |
files | src/ChangeLog src/doc.c |
diffstat | 2 files changed, 26 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Nov 09 13:16:19 2011 +0000 +++ b/src/ChangeLog Sun Nov 13 17:13:52 2011 +0000 @@ -1,3 +1,11 @@ +2011-11-13 Aidan Kehoe <kehoea@parhasard.net> + + * doc.c (Fbuilt_in_symbol_file): + Don't attempt to take file information from lazy docstring + information in compiled functions; those functions are not + built-in, and as such it's appropriate to give nil. + Fix some indentation in passing. + 2011-10-29 Stephen J. Turnbull <stephen@xemacs.org> Prevent SIGPIPEs in deactivate_process().
--- a/src/doc.c Wed Nov 09 13:16:19 2011 +0000 +++ b/src/doc.c Sun Nov 13 17:13:52 2011 +0000 @@ -513,12 +513,19 @@ Lisp_Object fun; Lisp_Object filename = Qnil; - if (EQ(Ffboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefun))) + CHECK_SYMBOL (symbol); + + if (!UNBOUNDP (XSYMBOL_FUNCTION (symbol)) + && (NILP (type) || EQ (type, Qdefun))) { fun = Findirect_function (symbol); - if (SUBRP (fun) || (CONSP(fun) && (EQ (Qmacro, Fcar_safe (fun))) - && (fun = Fcdr_safe (fun), SUBRP (fun)))) + if (EQ (Qmacro, Fcar_safe (fun))) + { + fun = XCDR (fun); + } + + if (SUBRP (fun)) { if (XSUBR (fun)->doc == 0) return Qnil; @@ -537,10 +544,7 @@ } } - if (COMPILED_FUNCTIONP (fun) || (CONSP(fun) && - (EQ (Qmacro, Fcar_safe (fun))) - && (fun = Fcdr_safe (fun), - COMPILED_FUNCTIONP (fun)))) + if (COMPILED_FUNCTIONP (fun)) { Lisp_Object tem; Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); @@ -548,30 +552,25 @@ if (! (f->flags.documentationp)) return Qnil; tem = compiled_function_documentation (f); - if (NATNUMP (tem) || CONSP (tem)) + if (NATNUMP (tem)) { - filename = get_object_file_name (tem); - return filename; - } + return get_object_file_name (tem); + } } } - if (EQ(Fboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefvar))) + if (!UNBOUNDP (XSYMBOL_VALUE (symbol)) && (NILP (type) || EQ (type, Qdefvar))) { Lisp_Object doc_offset = Fget (symbol, Qvariable_documentation, Qnil); - if (!NILP(doc_offset)) + if (!NILP (doc_offset)) { - if (FIXNUMP(doc_offset)) + if (FIXNUMP (doc_offset)) { - filename = get_object_file_name + filename = get_object_file_name (XFIXNUM (doc_offset) > 0 ? doc_offset : make_fixnum (- XFIXNUM (doc_offset))); } - else if (CONSP(doc_offset)) - { - filename = get_object_file_name(doc_offset); - } return filename; } }