[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/mule.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/mule.el [lexbind] |
Date: |
Wed, 08 Dec 2004 18:49:04 -0500 |
Index: emacs/lisp/international/mule.el
diff -c emacs/lisp/international/mule.el:1.147.2.14
emacs/lisp/international/mule.el:1.147.2.15
*** emacs/lisp/international/mule.el:1.147.2.14 Fri Nov 12 04:21:14 2004
--- emacs/lisp/international/mule.el Wed Dec 8 23:31:45 2004
***************
*** 1137,1143 ****
(setq coding-system-alist (cons (list (symbol-name symbol))
coding-system-alist)))
! (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,
--- 1137,1143 ----
(setq coding-system-alist (cons (list (symbol-name symbol))
coding-system-alist)))
! (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,
***************
*** 1151,1158 ****
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))
--- 1151,1159 ----
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))
***************
*** 1163,1169 ****
;; `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)
--- 1164,1171 ----
;; `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)
***************
*** 1738,1744 ****
(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)
(if (and enable-multibyte-characters
(or (eq coding-system 'no-conversion)
(eq (coding-system-type coding-system) 5))
--- 1740,1750 ----
(find-new-buffer-file-coding-system last-coding-system-used))
(modified-p (buffer-modified-p)))
(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)
(if (and enable-multibyte-characters
(or (eq coding-system 'no-conversion)
(eq (coding-system-type coding-system) 5))
***************
*** 1748,1754 ****
(= (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))))
--- 1754,1762 ----
(= (buffer-size) inserted))
;; For coding systems no-conversion and raw-text...,
;; edit the buffer as unibyte.
! (let ((pos-marker (copy-marker (+ (point) inserted)))
! ;; Prevent locking.
! (buffer-file-name nil))
(set-buffer-multibyte nil)
(setq inserted (- pos-marker (point)))))
(set-buffer-modified-p modified-p))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/international/mule.el [lexbind],
Miles Bader <=