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 [emacs-unicode


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule.el [emacs-unicode-2]
Date: Fri, 19 Nov 2004 02:19:53 -0500

Index: emacs/lisp/international/mule.el
diff -c emacs/lisp/international/mule.el:1.188.2.15 
emacs/lisp/international/mule.el:1.188.2.16
*** emacs/lisp/international/mule.el:1.188.2.15 Fri Nov 12 02:52:54 2004
--- emacs/lisp/international/mule.el    Fri Nov 19 06:55:10 2004
***************
*** 1119,1125 ****
                     first eol)))
      first))
  
! (defun set-buffer-file-coding-system (coding-system &optional force)
    "Set the file coding-system of the current buffer to CODING-SYSTEM.
  This means that when you save the buffer, it will be converted
  according to CODING-SYSTEM.  For a list of possible values of CODING-SYSTEM,
--- 1119,1125 ----
                     first eol)))
      first))
  
! (defun set-buffer-file-coding-system (coding-system &optional force nomodify)
    "Set the file coding-system of the current buffer to CODING-SYSTEM.
  This means that when you save the buffer, it will be converted
  according to CODING-SYSTEM.  For a list of possible values of CODING-SYSTEM,
***************
*** 1133,1140 ****
  
  This marks the buffer modified so that the succeeding \\[save-buffer]
  surely saves the buffer with CODING-SYSTEM.  From a program, if you
! don't want to mark the buffer modified, just set the variable
! `buffer-file-coding-system' directly."
    (interactive "zCoding system for saving file (default, nil): \nP")
    (check-coding-system coding-system)
    (if (and coding-system buffer-file-coding-system (null force))
--- 1133,1141 ----
  
  This marks the buffer modified so that the succeeding \\[save-buffer]
  surely saves the buffer with CODING-SYSTEM.  From a program, if you
! don't want to mark the buffer modified, specify t for NOMODIFY.
! If you know exactly what coding system you want to use,
! just set the variable `buffer-file-coding-system' directly."
    (interactive "zCoding system for saving file (default, nil): \nP")
    (check-coding-system coding-system)
    (if (and coding-system buffer-file-coding-system (null force))
***************
*** 1145,1151 ****
    ;; `set-buffer-major-mode-hook' take care of setting the table.
    (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
        (ucs-set-table-for-input))
!   (set-buffer-modified-p t)
    (force-mode-line-update))
  
  (defun revert-buffer-with-coding-system (coding-system &optional force)
--- 1146,1153 ----
    ;; `set-buffer-major-mode-hook' take care of setting the table.
    (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
        (ucs-set-table-for-input))
!   (unless nomodify
!     (set-buffer-modified-p t))
    (force-mode-line-update))
  
  (defun revert-buffer-with-coding-system (coding-system &optional force)
***************
*** 1705,1715 ****
  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))
!           (modified-p (buffer-modified-p)))
        (when coding-system
!         (set-buffer-file-coding-system coding-system t)
!         (set-buffer-modified-p modified-p))))
    inserted)
  
  ;; The coding-spec and eol-type of coding-system returned is decided
--- 1707,1719 ----
  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)))
        (when coding-system
!         ;; Tell set-buffer-file-coding-system not to mark the file
!         ;; as modified; we just read it, and it's supposed to be unmodified.
!         ;; Marking it modified would try to lock it, which would
!         ;; check the modtime, and we don't want to do that again now.
!         (set-buffer-file-coding-system coding-system t t))))
    inserted)
  
  ;; The coding-spec and eol-type of coding-system returned is decided




reply via email to

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