[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/composite.el [emacs-unicode-2]
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/composite.el [emacs-unicode-2] |
Date: |
Tue, 30 Sep 2003 07:09:30 -0400 |
Index: emacs/lisp/composite.el
diff -c emacs/lisp/composite.el:1.13.6.3 emacs/lisp/composite.el:1.13.6.4
*** emacs/lisp/composite.el:1.13.6.3 Fri Sep 26 07:24:10 2003
--- emacs/lisp/composite.el Tue Sep 30 07:09:29 2003
***************
*** 398,406 ****
;;(def-edebug-spec save-buffer-state let)
)
- (defvar auto-composition-chunk-size 500
- "*Automatic composition uses chunks of this many characters, or smaller.")
-
(defun auto-compose-chars (pos string)
"Compose characters after the buffer position POS.
If STRING is non-nil, it is a string, and POS is an index into the string.
--- 398,403 ----
***************
*** 411,438 ****
(save-excursion
(save-restriction
(save-match-data
! (let* ((start pos)
! (end (if string (length string) (point-max)))
! (limit (next-single-property-change pos 'auto-composed string
! end))
! (lines 0)
! ch func newpos)
! (if (> (- limit start) auto-composition-chunk-size)
! (setq limit (+ start auto-composition-chunk-size)))
! (while (and (< pos end)
! (setq ch (if string (aref string pos)
! (char-after pos)))
! (or (< pos limit)
! (/= ch ?\n)))
! (setq func (aref composition-function-table ch))
! (if (functionp func)
! (setq newpos (funcall func pos string)
! pos (if (and (integerp newpos) (> newpos pos))
! newpos
! (1+ pos)))
! (setq pos (1+ pos))))
! (if (< pos limit)
! (setq pos (1+ pos)))
(put-text-property start pos 'auto-composed t string)))))))
(setq auto-composition-function 'auto-compose-chars)
--- 408,441 ----
(save-excursion
(save-restriction
(save-match-data
! (let ((start pos)
! (limit (next-single-property-change pos 'auto-composed string))
! ch func newpos)
! (if limit
! (setq limit (1+ limit))
! (setq limit (if string (length string) (point-max))))
! (catch 'tag
! (if string
! (while (< pos limit)
! (setq ch (aref string pos)
! pos (1+ pos))
! (if (= ch ?\n)
! (throw 'tag nil))
! (setq func (aref composition-function-table ch))
! (if (and (functionp func)
! (setq newpos (funcall func (1- pos) string))
! (> newpos pos))
! (setq pos newpos)))
! (while (< pos limit)
! (setq ch (char-after pos)
! pos (1+ pos))
! (if (= ch ?\n)
! (throw 'tag nil))
! (setq func (aref composition-function-table ch))
! (if (and (functionp func)
! (setq newpos (funcall func (1- pos) string))
! (> newpos pos))
! (setq pos newpos)))))
(put-text-property start pos 'auto-composed t string)))))))
(setq auto-composition-function 'auto-compose-chars)