aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAnders Lindgren2015-12-24 09:50:26 +0100
committerAnders Lindgren2015-12-24 09:50:26 +0100
commitd107eda498f94423d846b0e2f1be7facab417b2a (patch)
treea6445cb96041c22579a12507deed013ede4724fc /lisp
parent076172ba824783636094bbe7a63018c07077733c (diff)
downloademacs-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 'lisp')
-rw-r--r--lisp/loadup.el1
-rw-r--r--lisp/term/ns-win.el28
2 files changed, 22 insertions, 7 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el
index dda433e4eaf..f0caa8be349 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -276,7 +276,6 @@
276(if (featurep 'ns) 276(if (featurep 'ns)
277 (progn 277 (progn
278 (load "term/common-win") 278 (load "term/common-win")
279 (load "international/ucs-normalize")
280 (load "term/ns-win"))) 279 (load "term/ns-win")))
281(if (fboundp 'x-create-frame) 280(if (fboundp 'x-create-frame)
282 ;; Do it after loading term/foo-win.el since the value of the 281 ;; Do it after loading term/foo-win.el since the value of the
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 9bd59fc1954..0b3e3bd9d9c 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -51,7 +51,6 @@
51(require 'menu-bar) 51(require 'menu-bar)
52(require 'fontset) 52(require 'fontset)
53(require 'dnd) 53(require 'dnd)
54(require 'ucs-normalize)
55 54
56(defgroup ns nil 55(defgroup ns nil
57 "GNUstep/Mac OS X specific features." 56 "GNUstep/Mac OS X specific features."
@@ -338,12 +337,29 @@ See `ns-insert-working-text'."
338 (setq ns-working-overlay nil)) 337 (setq ns-working-overlay nil))
339 338
340 339
341;; OS X file system Unicode UTF-8 NFD (decomposed form) support. 340(declare-function ns-convert-utf8-nfd-to-nfc "nsfns.m" (str))
342(when (eq system-type 'darwin)
343 ;; Used prior to Emacs 25.
344 (define-coding-system-alias 'utf-8-nfd 'utf-8-hfs)
345 341
346 (set-file-name-coding-system 'utf-8-hfs)) 342;;;; OS X file system Unicode UTF-8 NFD (decomposed form) support
343;; Lisp code based on utf-8m.el, by Seiji Zenitani, Eiji Honjoh, and
344;; Carsten Bormann.
345(when (eq system-type 'darwin)
346 (defun ns-utf8-nfd-post-read-conversion (length)
347 "Calls `ns-convert-utf8-nfd-to-nfc' to compose char sequences."
348 (save-excursion
349 (save-restriction
350 (narrow-to-region (point) (+ (point) length))
351 (let ((str (buffer-string)))
352 (delete-region (point-min) (point-max))
353 (insert (ns-convert-utf8-nfd-to-nfc str))
354 (- (point-max) (point-min))))))
355
356 (define-coding-system 'utf-8-nfd
357 "UTF-8 NFD (decomposed) encoding."
358 :coding-type 'utf-8
359 :mnemonic ?U
360 :charset-list '(unicode)
361 :post-read-conversion 'ns-utf8-nfd-post-read-conversion)
362 (set-file-name-coding-system 'utf-8-nfd))
347 363
348;;;; Inter-app communications support. 364;;;; Inter-app communications support.
349 365