comparison lisp/startup.el @ 24115:10955ef4bdfb

(command-line): If the init file changes operation to unibyte, make all buffers unibyte and re-set language environment.
author Richard M. Stallman <rms@gnu.org>
date Tue, 19 Jan 1999 03:00:09 +0000
parents 00fa89a27438
children 8ca6326a79e1
comparison
equal deleted inserted replaced
24114:df6194854007 24115:10955ef4bdfb
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
7 7
8 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
673 673
674 ;; Load that user's init file, or the default one, or none. 674 ;; Load that user's init file, or the default one, or none.
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
682 (function 683 (function
683 (lambda () 684 (lambda ()
719 ;; arrange to preserve the value that it set up. 720 ;; arrange to preserve the value that it set up.
720 (or (eq debug-on-error debug-on-error-initial) 721 (or (eq debug-on-error debug-on-error-initial)
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
728 (setq user-mail-address (concat (user-login-name) "@" 744 (setq user-mail-address (concat (user-login-name) "@"
729 (or mail-host-address 745 (or mail-host-address