aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reitter2016-06-10 17:58:41 +1000
committerDavid Reitter2016-06-10 18:00:03 +1000
commitff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7 (patch)
tree9f2b089b8688736a553716821a0cf20932755da2
parent57e6c66dfb179375d323e1ece9099255f53e9cfb (diff)
downloademacs-ff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7.tar.gz
emacs-ff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7.zip
Simplify pre-write-conversion for utf-8-hfs coding system
* lisp/international/ucs-normalize.el (ucs-normalize-hfs-nfd-pre-write-conversion): Refactor. May address an issue where Emacs consumed large amounts of CPU because of neverending toolbar updating (which was caused by, but also called this function).
-rw-r--r--lisp/international/ucs-normalize.el8
1 files changed, 1 insertions, 7 deletions
diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el
index 74978ce38a3..8c4f4911228 100644
--- a/lisp/international/ucs-normalize.el
+++ b/lisp/international/ucs-normalize.el
@@ -614,13 +614,7 @@ COMPOSITION-PREDICATE will be used to compose region."
614 614
615;; Pre-write conversion for `utf-8-hfs'. 615;; Pre-write conversion for `utf-8-hfs'.
616(defun ucs-normalize-hfs-nfd-pre-write-conversion (from to) 616(defun ucs-normalize-hfs-nfd-pre-write-conversion (from to)
617 (let ((old-buf (current-buffer))) 617 (ucs-normalize-HFS-NFD-region (point-min) (point-max)))
618 (set-buffer (generate-new-buffer " *temp*"))
619 (if (stringp from)
620 (insert from)
621 (insert-buffer-substring old-buf from to))
622 (ucs-normalize-HFS-NFD-region (point-min) (point-max))
623 nil))
624 618
625;;; coding-system definition 619;;; coding-system definition
626(define-coding-system 'utf-8-hfs 620(define-coding-system 'utf-8-hfs