/[emacs]/emacs/lisp/composite.el
ViewVC logotype

Diff of /emacs/lisp/composite.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13.6.5 by handa, Fri Oct 24 02:40:27 2003 UTC revision 1.13.6.6 by handa, Sun Nov 23 07:33:48 2003 UTC
# Line 391  See also the command `toggle-auto-compos Line 391  See also the command `toggle-auto-compos
391         ,@body         ,@body
392         (unless modified         (unless modified
393           (restore-buffer-modified-p nil))))           (restore-buffer-modified-p nil))))
   (put 'save-buffer-state 'lisp-indent-function 1)  
394    ;; Fixme: This makes bootstrapping fail with this error.    ;; Fixme: This makes bootstrapping fail with this error.
395    ;;   Symbol's function definition is void: eval-defun    ;;   Symbol's function definition is void: eval-defun
396    ;;(def-edebug-spec save-buffer-state let)    ;;(def-edebug-spec save-buffer-state let)
397    )    )
398    
399    (put 'save-buffer-state 'lisp-indent-function 1)
400    
401  (defun auto-compose-chars (pos string)  (defun auto-compose-chars (pos string)
402    "Compose characters after the buffer position POS.    "Compose characters after the buffer position POS.
403  If STRING is non-nil, it is a string, and POS is an index into the string.  If STRING is non-nil, it is a string, and POS is an index into the string.
# Line 404  In that case, compose characters in the Line 405  In that case, compose characters in the
405    
406  This function is the default value of `auto-composition-function' (which see)."  This function is the default value of `auto-composition-function' (which see)."
407    (save-buffer-state nil    (save-buffer-state nil
408      (save-excursion      (save-match-data
409        (save-restriction        (let ((start pos)
410          (save-match-data              (limit (if string (length string) (point-max)))
411            (let ((start pos)              ch func newpos)
412                  (limit (next-single-property-change pos 'auto-composed string))          (setq limit (or (text-property-any pos limit 'auto-composed t string)
413                  ch func newpos)                          limit))
414              (if limit          (catch 'tag
415                  (setq limit (1+ limit))            (if string
416                (setq limit (if string (length string) (point-max))))                (while (< pos limit)
417              (catch 'tag                  (setq ch (aref string pos))
418                (if string                  (if (= ch ?\n)
419                    (while (< pos limit)                      (throw 'tag nil))
420                      (setq ch (aref string pos)                  (setq func (aref composition-function-table ch))
421                            pos (1+ pos))                  (if (and (functionp func)
422                      (if (= ch ?\n)                           (setq newpos (funcall func pos string))
423                          (throw 'tag nil))                           (> newpos pos))
424                      (setq func (aref composition-function-table ch))                      (setq pos newpos)
425                      (if (and (functionp func)                    (setq pos (1+ pos))))
426                               (setq newpos (funcall func (1- pos) string))              (while (< pos limit)
427                               (> newpos pos))                (setq ch (char-after pos))
428                          (setq pos newpos)))                (if (= ch ?\n)
429                  (while (< pos limit)                    (throw 'tag nil))
430                    (setq ch (char-after pos)                (setq func (aref composition-function-table ch))
431                          pos (1+ pos))                (if (and (functionp func)
432                    (if (= ch ?\n)                         (setq newpos (funcall func pos string))
433                        (throw 'tag nil))                         (> newpos pos))
434                    (setq func (aref composition-function-table ch))                    (setq pos newpos)
435                    (if (and (functionp func)                  (setq pos (1+ pos))))))
436                             (setq newpos (funcall func (1- pos) string))          (put-text-property start pos 'auto-composed t string)))))
                            (> newpos pos))  
                       (setq pos newpos)))))  
             (put-text-property start pos 'auto-composed t string)))))))  
437    
438  (setq auto-composition-function 'auto-compose-chars)  (setq auto-composition-function 'auto-compose-chars)
439    

Legend:
Removed from v.1.13.6.5  
changed lines
  Added in v.1.13.6.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26