comparison src/doc.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
136 } 136 }
137 } 137 }
138 } 138 }
139 139
140 /* #### mrb: following STILL completely broken */ 140 /* #### mrb: following STILL completely broken */
141 return_me = make_ext_string ((Bufbyte *) buffer, to - buffer, Qbinary); 141 return_me = make_ext_string ((Bufbyte *) buffer, to - buffer, FORMAT_BINARY);
142 142
143 done: 143 done:
144 if (buffer != buf) /* We must have allocated buffer above */ 144 if (buffer != buf) /* We must have allocated buffer above */
145 xfree (buffer); 145 xfree (buffer);
146 return return_me; 146 return return_me;
282 doc = get_doc_string (make_int (- (EMACS_INT) XSUBR (fun)->doc)); 282 doc = get_doc_string (make_int (- (EMACS_INT) XSUBR (fun)->doc));
283 } 283 }
284 else if (COMPILED_FUNCTIONP (fun)) 284 else if (COMPILED_FUNCTIONP (fun))
285 { 285 {
286 Lisp_Object tem; 286 Lisp_Object tem;
287 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); 287 struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
288 if (! (f->flags.documentationp)) 288 if (! (f->flags.documentationp))
289 return Qnil; 289 return Qnil;
290 tem = compiled_function_documentation (f); 290 tem = compiled_function_documentation (f);
291 if (STRINGP (tem)) 291 if (STRINGP (tem))
292 doc = tem; 292 doc = tem;
390 UNGCPRO; 390 UNGCPRO;
391 return doc; 391 return doc;
392 } 392 }
393 393
394 static void 394 static void
395 weird_doc (Lisp_Object sym, const char *weirdness, const char *type, int pos) 395 weird_doc (Lisp_Object sym, CONST char *weirdness, CONST char *type, int pos)
396 { 396 {
397 if (!strcmp (weirdness, GETTEXT ("duplicate"))) return; 397 if (!strcmp (weirdness, GETTEXT ("duplicate"))) return;
398 message ("Note: Strange doc (%s) for %s %s @ %d", 398 message ("Note: Strange doc (%s) for %s %s @ %d",
399 weirdness, type, string_data (XSYMBOL (sym)->name), pos); 399 weirdness, type, string_data (XSYMBOL (sym)->name), pos);
400 } 400 }
571 } 571 }
572 else if (COMPILED_FUNCTIONP (fun)) 572 else if (COMPILED_FUNCTIONP (fun))
573 { 573 {
574 /* Compiled-Function objects sometimes have 574 /* Compiled-Function objects sometimes have
575 slots for it. */ 575 slots for it. */
576 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); 576 struct Lisp_Compiled_Function *f =
577 XCOMPILED_FUNCTION (fun);
577 578
578 /* This compiled-function object must have a 579 /* This compiled-function object must have a
579 slot for the docstring, since we've found a 580 slot for the docstring, since we've found a
580 docstring for it. Unless there were multiple 581 docstring for it. Unless there were multiple
581 definitions of it, and the latter one didn't 582 definitions of it, and the latter one didn't
637 wrapped by advice-freeze.el... */ 638 wrapped by advice-freeze.el... */
638 static int 639 static int
639 kludgily_ignore_lost_doc_p (Lisp_Object sym) 640 kludgily_ignore_lost_doc_p (Lisp_Object sym)
640 { 641 {
641 # define kludge_prefix "ad-Orig-" 642 # define kludge_prefix "ad-Orig-"
642 Lisp_String *name = XSYMBOL (sym)->name; 643 struct Lisp_String *name = XSYMBOL (sym)->name;
643 return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) && 644 return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) &&
644 !strncmp ((char *) string_data (name), kludge_prefix, 645 !strncmp ((char *) string_data (name), kludge_prefix,
645 sizeof (kludge_prefix) - 1)); 646 sizeof (kludge_prefix) - 1));
646 # undef kludge_prefix 647 # undef kludge_prefix
647 } 648 }
681 doc = XINT (XCAR (tem)); 682 doc = XINT (XCAR (tem));
682 } 683 }
683 } 684 }
684 else if (COMPILED_FUNCTIONP (fun)) 685 else if (COMPILED_FUNCTIONP (fun))
685 { 686 {
686 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); 687 struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
687 if (! (f->flags.documentationp)) 688 if (! (f->flags.documentationp))
688 doc = -1; 689 doc = -1;
689 else 690 else
690 { 691 {
691 Lisp_Object tem = compiled_function_documentation (f); 692 Lisp_Object tem = compiled_function_documentation (f);
883 } 884 }
884 } 885 }
885 case '{': 886 case '{':
886 case '<': 887 case '<':
887 { 888 {
888 /* #### jump to label `subst_string|subst' crosses 889 /* ### jump to label `subst_string|subst' crosses
889 initialization of `buffer|_buf' */ 890 initialization of `buffer|_buf' */
890 Lisp_Object buffer; 891 Lisp_Object buffer;
891 struct buffer *buf_; 892 struct buffer *buf_;
892 893
893 buffer = Fget_buffer_create (QSsubstitute); 894 buffer = Fget_buffer_create (QSsubstitute);