/[emacs]/emacs/lisp/international/mule.el
ViewVC logotype

Diff of /emacs/lisp/international/mule.el

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

revision 1.183 by handa, Fri Apr 11 11:00:36 2003 UTC revision 1.184 by rms, Mon Apr 14 10:06:55 2003 UTC
# Line 1695  function by default." Line 1695  function by default."
1695  (setq set-auto-coding-function 'set-auto-coding)  (setq set-auto-coding-function 'set-auto-coding)
1696    
1697  (defun after-insert-file-set-coding (inserted)  (defun after-insert-file-set-coding (inserted)
1698    "Set `buffer-file-coding-system' of current buffer after text is inserted."    "Set `buffer-file-coding-system' of current buffer after text is inserted.
1699    INSERTED is the number of characters that were inserted, as figured
1700    in the situation before this function.  Return the number of characters
1701    inserted, as figured in the situation after.  The two numbers can be
1702    different if the buffer has become unibyte."
1703    (if last-coding-system-used    (if last-coding-system-used
1704        (let ((coding-system        (let ((coding-system
1705               (find-new-buffer-file-coding-system last-coding-system-used))               (find-new-buffer-file-coding-system last-coding-system-used))
# Line 1711  function by default." Line 1715  function by default."
1715                     (= (buffer-size) inserted))                     (= (buffer-size) inserted))
1716                ;; For coding systems no-conversion and raw-text...,                ;; For coding systems no-conversion and raw-text...,
1717                ;; edit the buffer as unibyte.                ;; edit the buffer as unibyte.
1718                (let ((pos-byte (position-bytes (+ (point) inserted))))                (let ((pos-marker (copy-marker (+ (point) inserted))))
1719                  (set-buffer-multibyte nil)                  (set-buffer-multibyte nil)
1720                  (setq inserted (- pos-byte (position-bytes (point))))))                  (setq inserted (- pos-marker (point)))))
1721            (set-buffer-modified-p modified-p))))            (set-buffer-modified-p modified-p))))
1722    inserted)    inserted)
1723    

Legend:
Removed from v.1.183  
changed lines
  Added in v.1.184

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