diff options
| author | Dave Love | 2002-06-11 18:32:28 +0000 |
|---|---|---|
| committer | Dave Love | 2002-06-11 18:32:28 +0000 |
| commit | 0f53a32f99f77373705e8dc05c70fcad597b215a (patch) | |
| tree | f8c557bc325865eb301172592632e18156cb3abd /src | |
| parent | 612f72a634e875cc9dc6b59a6967939e2f350cba (diff) | |
| download | emacs-0f53a32f99f77373705e8dc05c70fcad597b215a.tar.gz emacs-0f53a32f99f77373705e8dc05c70fcad597b215a.zip | |
(count_combining): Comment out (unused).
(Flocale_codeset): New.
(syms_of_fns): Defsubr it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 22 |
1 files changed, 22 insertions, 0 deletions
| @@ -474,6 +474,7 @@ with the original. */) | |||
| 474 | return concat (1, &arg, CONSP (arg) ? Lisp_Cons : XTYPE (arg), 0); | 474 | return concat (1, &arg, CONSP (arg) ? Lisp_Cons : XTYPE (arg), 0); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | #if 0 /* unused */ | ||
| 477 | /* In string STR of length LEN, see if bytes before STR[I] combine | 478 | /* In string STR of length LEN, see if bytes before STR[I] combine |
| 478 | with bytes after STR[I] to form a single character. If so, return | 479 | with bytes after STR[I] to form a single character. If so, return |
| 479 | the number of bytes after STR[I] which combine in this way. | 480 | the number of bytes after STR[I] which combine in this way. |
| @@ -494,6 +495,7 @@ count_combining (str, len, i) | |||
| 494 | PARSE_MULTIBYTE_SEQ (str + j, len - j, bytes); | 495 | PARSE_MULTIBYTE_SEQ (str + j, len - j, bytes); |
| 495 | return (bytes <= i - j ? 0 : bytes - (i - j)); | 496 | return (bytes <= i - j ? 0 : bytes - (i - j)); |
| 496 | } | 497 | } |
| 498 | #endif | ||
| 497 | 499 | ||
| 498 | /* This structure holds information of an argument of `concat' that is | 500 | /* This structure holds information of an argument of `concat' that is |
| 499 | a string and has text properties to be copied. */ | 501 | a string and has text properties to be copied. */ |
| @@ -2730,6 +2732,25 @@ usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) | |||
| 2730 | UNGCPRO; | 2732 | UNGCPRO; |
| 2731 | return result; | 2733 | return result; |
| 2732 | } | 2734 | } |
| 2735 | |||
| 2736 | #ifdef HAVE_LANGINFO_CODESET | ||
| 2737 | #include <langinfo.h> | ||
| 2738 | #endif | ||
| 2739 | |||
| 2740 | /* Fixme: is it useful to get more general info from the locale? */ | ||
| 2741 | DEFUN ("locale-codeset", Flocale_codeset, Slocale_codeset, 0, 0, 0, | ||
| 2742 | doc: /* Return a string indicating the code set in the current locale. | ||
| 2743 | If the system can't provide such information through a call to | ||
| 2744 | nl_langinfo(3), return nil. */) | ||
| 2745 | () | ||
| 2746 | { | ||
| 2747 | #ifdef HAVE_LANGINFO_CODESET | ||
| 2748 | char *str = nl_langinfo (CODESET); | ||
| 2749 | return make_string (str, strlen (str)); | ||
| 2750 | #else | ||
| 2751 | return Qnil; | ||
| 2752 | #endif | ||
| 2753 | } | ||
| 2733 | 2754 | ||
| 2734 | /* base64 encode/decode functions (RFC 2045). | 2755 | /* base64 encode/decode functions (RFC 2045). |
| 2735 | Based on code from GNU recode. */ | 2756 | Based on code from GNU recode. */ |
| @@ -4866,6 +4887,7 @@ invoked by mouse clicks and mouse menu items. */); | |||
| 4866 | defsubr (&Sbase64_encode_string); | 4887 | defsubr (&Sbase64_encode_string); |
| 4867 | defsubr (&Sbase64_decode_string); | 4888 | defsubr (&Sbase64_decode_string); |
| 4868 | defsubr (&Smd5); | 4889 | defsubr (&Smd5); |
| 4890 | defsubr (&Slocale_codeset); | ||
| 4869 | } | 4891 | } |
| 4870 | 4892 | ||
| 4871 | 4893 | ||