Mercurial > hg > xemacs-beta
comparison src/doc.c @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | 489f57a838ef |
children | 78478c60bfcd |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
360 translation. | 360 translation. |
361 */ | 361 */ |
362 (sym, prop, raw)) | 362 (sym, prop, raw)) |
363 { | 363 { |
364 /* This function can GC */ | 364 /* This function can GC */ |
365 REGISTER Lisp_Object doc; | 365 REGISTER Lisp_Object doc = Qnil; |
366 #ifdef I18N3 | 366 #ifdef I18N3 |
367 REGISTER Lisp_Object domain; | 367 REGISTER Lisp_Object domain; |
368 #endif | 368 #endif |
369 struct gcpro gcpro1; | |
370 | |
371 GCPRO1 (doc); | |
369 | 372 |
370 doc = Fget (sym, prop, Qnil); | 373 doc = Fget (sym, prop, Qnil); |
371 if (INTP (doc)) | 374 if (INTP (doc)) |
372 doc = get_doc_string (XINT (doc) > 0 ? doc : make_int (- XINT (doc))); | 375 doc = get_doc_string (XINT (doc) > 0 ? doc : make_int (- XINT (doc))); |
373 else if (CONSP (doc)) | 376 else if (CONSP (doc)) |
382 doc = Fdgettext (domain, doc); | 385 doc = Fdgettext (domain, doc); |
383 } | 386 } |
384 #endif | 387 #endif |
385 if (NILP (raw) && STRINGP (doc)) | 388 if (NILP (raw) && STRINGP (doc)) |
386 doc = Fsubstitute_command_keys (doc); | 389 doc = Fsubstitute_command_keys (doc); |
390 UNGCPRO; | |
387 return doc; | 391 return doc; |
388 } | 392 } |
389 | 393 |
390 static void | 394 static void |
391 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) |
783 if (NILP (keymap)) | 787 if (NILP (keymap)) |
784 keymap = Voverriding_local_map; | 788 keymap = Voverriding_local_map; |
785 #endif | 789 #endif |
786 | 790 |
787 strlength = XSTRING_LENGTH (str); | 791 strlength = XSTRING_LENGTH (str); |
788 bsize = strlength; | 792 bsize = 1 + strlength; |
789 buf = (Bufbyte *) xmalloc (bsize); | 793 buf = (Bufbyte *) xmalloc (bsize); |
790 bufp = buf; | 794 bufp = buf; |
791 | 795 |
792 /* Have to reset strdata every time GC might be called */ | 796 /* Have to reset strdata every time GC might be called */ |
793 strdata = XSTRING_DATA (str); | 797 strdata = XSTRING_DATA (str); |