diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/eieio-base.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index b530131e72b..f624714f8a6 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -273,7 +273,11 @@ instance." (eieio-persistent-path-relative this file) (file-name-nondirectory cfn))) (object-write this (oref this file-header-line))) - (let ((backup-inhibited (not (oref this do-backups)))) + (let ((backup-inhibited (not (oref this do-backups))) + (cs (car (find-coding-systems-region + (point-min) (point-max))))) + (unless (eq cs 'undecided) + (setq buffer-file-coding-system cs)) ;; Old way - write file. Leaves message behind. ;;(write-file cfn nil) |