From c9e6685fddd08ba2e74bd5726543d68608505701 Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 15 May 1998 18:37:31 +0000 Subject: [PATCH] (mime-character-unification-limit-size): New variable. (decode-mime-charset-region-with-iso646-unification): Don't unify if size of region is larger than 'mime-character-unification-limit-size. --- emu-x20.el | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/emu-x20.el b/emu-x20.el index 5628997..5f21362 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -115,21 +115,28 @@ find-file-hooks, etc. :group 'i18n :type 'face) +(defcustom mime-character-unification-limit-size 10000 + "*Limit size to unify characters." + :group 'i18n + :type 'integer) + (defun decode-mime-charset-region-with-iso646-unification (start end charset) (decode-mime-charset-region-default start end charset) - (save-excursion - (let ((rest mime-iso646-character-unification-alist)) - (while rest - (let ((pair (car rest))) - (goto-char (point-min)) - (while (search-forward (car pair) nil t) - (let ((str (cdr pair))) - (put-text-property 0 (length str) - 'face mime-unified-character-face str) - (replace-match str 'fixed-case 'literal) - ) - )) - (setq rest (cdr rest)))))) + (if (<= (- end start) mime-character-unification-limit-size) + (save-excursion + (let ((rest mime-iso646-character-unification-alist)) + (while rest + (let ((pair (car rest))) + (goto-char (point-min)) + (while (search-forward (car pair) nil t) + (let ((str (cdr pair))) + (put-text-property 0 (length str) + 'face mime-unified-character-face str) + (replace-match str 'fixed-case 'literal) + ) + )) + (setq rest (cdr rest))))) + )) (defun decode-mime-charset-region-for-hz (start end charset) (decode-hz-region start end)) -- 1.7.10.4