Mercurial > hg > xemacs-beta
comparison src/doc.c @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 8626e4521993 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
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, FORMAT_BINARY); | 141 return_me = make_ext_string ((Bufbyte *) buffer, to - buffer, Qbinary); |
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 struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); | 287 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 struct Lisp_Compiled_Function *f = | 576 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); |
577 XCOMPILED_FUNCTION (fun); | |
578 | 577 |
579 /* This compiled-function object must have a | 578 /* This compiled-function object must have a |
580 slot for the docstring, since we've found a | 579 slot for the docstring, since we've found a |
581 docstring for it. Unless there were multiple | 580 docstring for it. Unless there were multiple |
582 definitions of it, and the latter one didn't | 581 definitions of it, and the latter one didn't |
638 wrapped by advice-freeze.el... */ | 637 wrapped by advice-freeze.el... */ |
639 static int | 638 static int |
640 kludgily_ignore_lost_doc_p (Lisp_Object sym) | 639 kludgily_ignore_lost_doc_p (Lisp_Object sym) |
641 { | 640 { |
642 # define kludge_prefix "ad-Orig-" | 641 # define kludge_prefix "ad-Orig-" |
643 struct Lisp_String *name = XSYMBOL (sym)->name; | 642 Lisp_String *name = XSYMBOL (sym)->name; |
644 return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) && | 643 return (string_length (name) > (Bytecount) (sizeof (kludge_prefix)) && |
645 !strncmp ((char *) string_data (name), kludge_prefix, | 644 !strncmp ((char *) string_data (name), kludge_prefix, |
646 sizeof (kludge_prefix) - 1)); | 645 sizeof (kludge_prefix) - 1)); |
647 # undef kludge_prefix | 646 # undef kludge_prefix |
648 } | 647 } |
682 doc = XINT (XCAR (tem)); | 681 doc = XINT (XCAR (tem)); |
683 } | 682 } |
684 } | 683 } |
685 else if (COMPILED_FUNCTIONP (fun)) | 684 else if (COMPILED_FUNCTIONP (fun)) |
686 { | 685 { |
687 struct Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); | 686 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); |
688 if (! (f->flags.documentationp)) | 687 if (! (f->flags.documentationp)) |
689 doc = -1; | 688 doc = -1; |
690 else | 689 else |
691 { | 690 { |
692 Lisp_Object tem = compiled_function_documentation (f); | 691 Lisp_Object tem = compiled_function_documentation (f); |
884 } | 883 } |
885 } | 884 } |
886 case '{': | 885 case '{': |
887 case '<': | 886 case '<': |
888 { | 887 { |
889 /* ### jump to label `subst_string|subst' crosses | 888 /* #### jump to label `subst_string|subst' crosses |
890 initialization of `buffer|_buf' */ | 889 initialization of `buffer|_buf' */ |
891 Lisp_Object buffer; | 890 Lisp_Object buffer; |
892 struct buffer *buf_; | 891 struct buffer *buf_; |
893 | 892 |
894 buffer = Fget_buffer_create (QSsubstitute); | 893 buffer = Fget_buffer_create (QSsubstitute); |