comparison src/bytecode.c @ 5206:39d74978fd32

Keep around file info for dumped functions and variables without docstrings. src/ChangeLog addition: 2010-04-17 Aidan Kehoe <kehoea@parhasard.net> * doc.c (Fdocumentation): If we have a zero length doc string in DOC, as may happen for undocumented compiled function objects which nonetheless have file information stored, return nil. (Fsnarf_documentation): DOC info existing for compiled functions without docstrings is perfectly legitimate, now the file is also used to store file names. * bytecode.c (set_compiled_function_documentation): Allow this function to set the documentation successfully for compiled function objects that don't currently have documentation; most relevant for functions without docstrings which have file information stored in DOC. lib-src/ChangeLog addition: 2010-04-17 Aidan Kehoe <kehoea@parhasard.net> * make-docfile.c (scan_lisp_file): Even if a function doesn't have a doc string, store its file name in DOC. lisp/ChangeLog addition: 2010-04-17 Aidan Kehoe <kehoea@parhasard.net> * loadup.el (load-history): Be a bit more discriminate in the entries we remove from load-history, only removing those where the information is entirely available from DOC. Fixes problems finding the files that dumped undocumented variables were loaded from, reported by Didier Verna. * loadhist.el (symbol-file): Correct a regexp here, I had forgotten to double a backslash.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 17 Apr 2010 10:40:03 +0100
parents 71ee43b8a74d
children 9f738305f80f 308d34e9f07d
comparison
equal deleted inserted replaced
5205:fcdb86afcb91 5206:39d74978fd32
2560 return f->annotated; 2560 return f->annotated;
2561 } 2561 }
2562 2562
2563 #endif 2563 #endif
2564 2564
2565 /* used only by Snarf-documentation; there must be doc already. */ 2565 /* used only by Snarf-documentation. */
2566 void 2566 void
2567 set_compiled_function_documentation (Lisp_Compiled_Function *f, 2567 set_compiled_function_documentation (Lisp_Compiled_Function *f,
2568 Lisp_Object new_doc) 2568 Lisp_Object new_doc)
2569 { 2569 {
2570 assert (f->flags.documentationp);
2571 assert (INTP (new_doc) || STRINGP (new_doc)); 2570 assert (INTP (new_doc) || STRINGP (new_doc));
2572 2571
2573 if (f->flags.interactivep && f->flags.domainp) 2572 if (f->flags.documentationp)
2574 XCAR (f->doc_and_interactive) = new_doc; 2573 {
2575 else if (f->flags.interactivep) 2574 if (f->flags.interactivep && f->flags.domainp)
2576 XCAR (f->doc_and_interactive) = new_doc; 2575 XCAR (f->doc_and_interactive) = new_doc;
2577 else if (f->flags.domainp) 2576 else if (f->flags.interactivep)
2578 XCAR (f->doc_and_interactive) = new_doc; 2577 XCAR (f->doc_and_interactive) = new_doc;
2578 else if (f->flags.domainp)
2579 XCAR (f->doc_and_interactive) = new_doc;
2580 else
2581 f->doc_and_interactive = new_doc;
2582 }
2579 else 2583 else
2580 f->doc_and_interactive = new_doc; 2584 {
2585 f->flags.documentationp = 1;
2586 if (f->flags.interactivep || f->flags.domainp)
2587 {
2588 f->doc_and_interactive = Fcons (new_doc, f->doc_and_interactive);
2589 }
2590 else
2591 {
2592 f->doc_and_interactive = new_doc;
2593 }
2594 }
2581 } 2595 }
2582 2596
2583 2597
2584 DEFUN ("compiled-function-arglist", Fcompiled_function_arglist, 1, 1, 0, /* 2598 DEFUN ("compiled-function-arglist", Fcompiled_function_arglist, 1, 1, 0, /*
2585 Return the argument list of the compiled-function object FUNCTION. 2599 Return the argument list of the compiled-function object FUNCTION.