mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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).
This commit is contained in:
parent
57e6c66dfb
commit
ff9ddda906
1 changed files with 1 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue