diff options
author | David Reitter <david.reitter@gmail.com> | 2016-06-10 17:58:41 +1000 |
---|---|---|
committer | David Reitter <david.reitter@gmail.com> | 2016-06-10 18:00:03 +1000 |
commit | ff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7 (patch) | |
tree | 9f2b089b8688736a553716821a0cf20932755da2 | |
parent | 57e6c66dfb179375d323e1ece9099255f53e9cfb (diff) | |
download | emacs-ff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7.tar.gz emacs-ff9ddda9069da6b4dbcc64615cb4cab9a1f4f8b7.tar.bz2 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.el | 8 |
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." ;; Pre-write conversion for `utf-8-hfs'. (defun ucs-normalize-hfs-nfd-pre-write-conversion (from to) - (let ((old-buf (current-buffer))) - (set-buffer (generate-new-buffer " *temp*")) - (if (stringp from) - (insert from) - (insert-buffer-substring old-buf from to)) - (ucs-normalize-HFS-NFD-region (point-min) (point-max)) - nil)) + (ucs-normalize-HFS-NFD-region (point-min) (point-max))) ;;; coding-system definition (define-coding-system 'utf-8-hfs |