APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1321204432 0
# Node ID 3b1d4fa716a4f3c563f7e86f8943098fc7dcc359
# Parent 391d809fa4e9b1f3f813ff1141df16d802824195
Ignore lazy docstring info, #'built-in-symbol-file; nothing built-in uses it.
2011-11-13 Aidan Kehoe <kehoea(a)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.
diff -r 391d809fa4e9 -r 3b1d4fa716a4 src/ChangeLog
--- 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(a)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(a)xemacs.org>
Prevent SIGPIPEs in deactivate_process().
diff -r 391d809fa4e9 -r 3b1d4fa716a4 src/doc.c
--- 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;
}
}
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches