aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-01-19 03:00:09 +0000
committerRichard M. Stallman1999-01-19 03:00:09 +0000
commita460d4e398b8a5b182c52470c5d76a4c006b448e (patch)
tree86cd033537be9d2f2a3de95f11b50d4656baf9b4
parent4200b742d9a86483102d97e8ceaf2c1531b12a79 (diff)
downloademacs-a460d4e398b8a5b182c52470c5d76a4c006b448e.tar.gz
emacs-a460d4e398b8a5b182c52470c5d76a4c006b448e.zip
(command-line): If the init file changes operation to
unibyte, make all buffers unibyte and re-set language environment.
-rw-r--r--lisp/startup.el22
1 files changed, 19 insertions, 3 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 4ce11931ab8..ccdc8804bd4 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,6 +1,6 @@
1;;; startup.el --- process Emacs shell arguments 1;;; startup.el --- process Emacs shell arguments
2 2
3;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: internal 6;; Keywords: internal
@@ -675,7 +675,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
675 (let (debug-on-error-from-init-file 675 (let (debug-on-error-from-init-file
676 debug-on-error-should-be-set 676 debug-on-error-should-be-set
677 (debug-on-error-initial 677 (debug-on-error-initial
678 (if (eq init-file-debug t) 'startup init-file-debug))) 678 (if (eq init-file-debug t) 'startup init-file-debug))
679 (orig-enable-multibyte default-enable-multibyte-characters))
679 (let ((debug-on-error debug-on-error-initial) 680 (let ((debug-on-error debug-on-error-initial)
680 ;; This function actually reads the init files. 681 ;; This function actually reads the init files.
681 (inner 682 (inner
@@ -721,7 +722,22 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
721 (setq debug-on-error-should-be-set t 722 (setq debug-on-error-should-be-set t
722 debug-on-error-from-init-file debug-on-error))) 723 debug-on-error-from-init-file debug-on-error)))
723 (if debug-on-error-should-be-set 724 (if debug-on-error-should-be-set
724 (setq debug-on-error debug-on-error-from-init-file))) 725 (setq debug-on-error debug-on-error-from-init-file))
726 (unless (or default-enable-multibyte-characters
727 (eq orig-enable-multibyte default-enable-multibyte-characters))
728 ;; Init file changed to unibyte. Reset existing multibyte
729 ;; buffers (probably *scratch*, *Messages*, *Minibuff-0*).
730 ;; Arguably this should only be done if they're free of
731 ;; multibyte characters.
732 (mapcar (lambda (buffer)
733 (with-current-buffer buffer
734 (if enable-multibyte-characters
735 (set-buffer-multibyte nil))))
736 (buffer-list))
737 ;; Also re-set the language environment in case it was
738 ;; originally done before unibyte was set and is sensitive to
739 ;; unibyte (display table, terminal coding system &c).
740 (set-language-environment current-language-environment)))
725 741
726 ;; Do this here in case the init file sets mail-host-address. 742 ;; Do this here in case the init file sets mail-host-address.
727 (or user-mail-address 743 (or user-mail-address