diff options
| author | Anders Lindgren | 2015-12-24 09:50:26 +0100 |
|---|---|---|
| committer | Anders Lindgren | 2015-12-24 09:50:26 +0100 |
| commit | d107eda498f94423d846b0e2f1be7facab417b2a (patch) | |
| tree | a6445cb96041c22579a12507deed013ede4724fc /src | |
| parent | 076172ba824783636094bbe7a63018c07077733c (diff) | |
| download | emacs-d107eda498f94423d846b0e2f1be7facab417b2a.tar.gz emacs-d107eda498f94423d846b0e2f1be7facab417b2a.zip | |
; Revert "File-name completion of non-ASCII characters on OS X (bug#22169)"
; This reverts commit 09053075225fec8a6cf7a72017a6dfc1ec6b6f0c.
; This caused a build from scratch to fail.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfns.m | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index 5fa68c0a15c..edc02e8350b 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -2099,6 +2099,39 @@ there was no result. */) | |||
| 2099 | } | 2099 | } |
| 2100 | 2100 | ||
| 2101 | 2101 | ||
| 2102 | DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc, | ||
| 2103 | Sns_convert_utf8_nfd_to_nfc, 1, 1, 0, | ||
| 2104 | doc: /* Return an NFC string that matches the UTF-8 NFD string STR. */) | ||
| 2105 | (Lisp_Object str) | ||
| 2106 | { | ||
| 2107 | /* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping, | ||
| 2108 | remove this. */ | ||
| 2109 | NSString *utfStr; | ||
| 2110 | Lisp_Object ret = Qnil; | ||
| 2111 | NSAutoreleasePool *pool; | ||
| 2112 | |||
| 2113 | CHECK_STRING (str); | ||
| 2114 | pool = [[NSAutoreleasePool alloc] init]; | ||
| 2115 | utfStr = [NSString stringWithUTF8String: SSDATA (str)]; | ||
| 2116 | #ifdef NS_IMPL_COCOA | ||
| 2117 | if (utfStr) | ||
| 2118 | utfStr = [utfStr precomposedStringWithCanonicalMapping]; | ||
| 2119 | #endif | ||
| 2120 | if (utfStr) | ||
| 2121 | { | ||
| 2122 | const char *cstr = [utfStr UTF8String]; | ||
| 2123 | if (cstr) | ||
| 2124 | ret = build_string (cstr); | ||
| 2125 | } | ||
| 2126 | |||
| 2127 | [pool release]; | ||
| 2128 | if (NILP (ret)) | ||
| 2129 | error ("Invalid UTF-8"); | ||
| 2130 | |||
| 2131 | return ret; | ||
| 2132 | } | ||
| 2133 | |||
| 2134 | |||
| 2102 | #ifdef NS_IMPL_COCOA | 2135 | #ifdef NS_IMPL_COCOA |
| 2103 | 2136 | ||
| 2104 | /* Compile and execute the AppleScript SCRIPT and return the error | 2137 | /* Compile and execute the AppleScript SCRIPT and return the error |
| @@ -3174,6 +3207,7 @@ be used as the image of the icon representing the frame. */); | |||
| 3174 | defsubr (&Sns_emacs_info_panel); | 3207 | defsubr (&Sns_emacs_info_panel); |
| 3175 | defsubr (&Sns_list_services); | 3208 | defsubr (&Sns_list_services); |
| 3176 | defsubr (&Sns_perform_service); | 3209 | defsubr (&Sns_perform_service); |
| 3210 | defsubr (&Sns_convert_utf8_nfd_to_nfc); | ||
| 3177 | defsubr (&Sns_popup_font_panel); | 3211 | defsubr (&Sns_popup_font_panel); |
| 3178 | defsubr (&Sns_popup_color_panel); | 3212 | defsubr (&Sns_popup_color_panel); |
| 3179 | 3213 | ||