emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/international/mule.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule.el
Date: Mon, 14 Apr 2003 06:06:56 -0400

Index: emacs/lisp/international/mule.el
diff -c emacs/lisp/international/mule.el:1.183 
emacs/lisp/international/mule.el:1.184
*** emacs/lisp/international/mule.el:1.183      Fri Apr 11 07:00:36 2003
--- emacs/lisp/international/mule.el    Mon Apr 14 06:06:55 2003
***************
*** 1695,1701 ****
  (setq set-auto-coding-function 'set-auto-coding)
  
  (defun after-insert-file-set-coding (inserted)
!   "Set `buffer-file-coding-system' of current buffer after text is inserted."
    (if last-coding-system-used
        (let ((coding-system
             (find-new-buffer-file-coding-system last-coding-system-used))
--- 1695,1705 ----
  (setq set-auto-coding-function 'set-auto-coding)
  
  (defun after-insert-file-set-coding (inserted)
!   "Set `buffer-file-coding-system' of current buffer after text is inserted.
! INSERTED is the number of characters that were inserted, as figured
! in the situation before this function.  Return the number of characters
! inserted, as figured in the situation after.  The two numbers can be
! different if the buffer has become unibyte."
    (if last-coding-system-used
        (let ((coding-system
             (find-new-buffer-file-coding-system last-coding-system-used))
***************
*** 1711,1719 ****
                   (= (buffer-size) inserted))
              ;; For coding systems no-conversion and raw-text...,
              ;; edit the buffer as unibyte.
!             (let ((pos-byte (position-bytes (+ (point) inserted))))
                (set-buffer-multibyte nil)
!               (setq inserted (- pos-byte (position-bytes (point))))))
          (set-buffer-modified-p modified-p))))
    inserted)
  
--- 1715,1723 ----
                   (= (buffer-size) inserted))
              ;; For coding systems no-conversion and raw-text...,
              ;; edit the buffer as unibyte.
!             (let ((pos-marker (copy-marker (+ (point) inserted))))
                (set-buffer-multibyte nil)
!               (setq inserted (- pos-marker (point)))))
          (set-buffer-modified-p modified-p))))
    inserted)
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]