comparison lisp/disp-table.el @ 24116:cff6faa1cf82

(standard-display-european): Make all existing buffers unibyte. Fix doc.
author Richard M. Stallman <rms@gnu.org>
date Tue, 19 Jan 1999 03:00:26 +0000
parents 6182deb2d814
children f581efbf0caf
comparison
equal deleted inserted replaced
24115:10955ef4bdfb 24116:cff6faa1cf82
1 ;;; disp-table.el --- functions for dealing with char tables. 1 ;;; disp-table.el --- functions for dealing with char tables.
2 2
3 ;; Copyright (C) 1987, 1994, 1995 Free Software Foundation, Inc. 3 ;; Copyright (C) 1987, 1994, 1995, 1999 Free Software Foundation, Inc.
4 4
5 ;; Author: Erik Naggum <erik@naggum.no> 5 ;; Author: Erik Naggum <erik@naggum.no>
6 ;; Based on a previous version by Howard Gayle 6 ;; Based on a previous version by Howard Gayle
7 ;; Maintainer: FSF 7 ;; Maintainer: FSF
8 ;; Keywords: i18n 8 ;; Keywords: i18n
176 (1- (length glyph-table))) 176 (1- (length glyph-table)))
177 177
178 ;;;###autoload 178 ;;;###autoload
179 (defun standard-display-european (arg &optional auto) 179 (defun standard-display-european (arg &optional auto)
180 "Toggle display of European characters encoded with ISO 8859. 180 "Toggle display of European characters encoded with ISO 8859.
181 This function is semi-obsolete; it is better to use 181
182 `set-language-environment' and `set-terminal-coding-system', 182 This function is semi-obsolete; you can use `set-language-environment'
183 coupled with the `--unibyte' option if you prefer to use unibyte characters. 183 coupled with either the `--unibyte' option, the EMACS_UNIBYTE
184 environment variable or customizing `enable-multibyte-characters' if
185 you prefer to use unibyte characters.
184 186
185 When enabled, characters in the range of 160 to 255 display not 187 When enabled, characters in the range of 160 to 255 display not
186 as octal escapes, but as accented characters. Codes 146 and 160 188 as octal escapes, but as accented characters. Codes 146 and 160
187 display as apostrophe and space, even though they are not the ASCII 189 display as apostrophe and space, even though they are not the ASCII
188 codes for apostrophe and space. 190 codes for apostrophe and space.
189 191
190 With prefix argument, enable European character display iff arg is positive. 192 With prefix argument, enable European character display iff arg is positive.
191 193
192 Normally, this function turns off `enable-multibyte-characters' 194 Normally, this function turns off `enable-multibyte-characters' for
193 for subsequently created Emacs buffers, and for `*scratch*. 195 existing and subsequently created Emacs buffers. This is because
194 This is because users who call this function 196 users who call this function probably want to edit European characters
195 probably want to edit European characters in single-byte mode." 197 in single-byte mode."
196 198
197 ;; If the optional argument AUTO is non-nil, this function 199 ;; If the optional argument AUTO is non-nil, this function
198 ;; does not alter `enable-multibyte-characters'. 200 ;; does not alter `enable-multibyte-characters'.
199 ;; AUTO also specifies, in this case, the coding system for terminal output. 201 ;; AUTO also specifies, in this case, the coding system for terminal output.
200 ;; The AUTO argument is meant for use by startup.el only. 202 ;; The AUTO argument is meant for use by startup.el only.
211 (set-terminal-coding-system nil))) 213 (set-terminal-coding-system nil)))
212 ;; If the user does this explicitly, 214 ;; If the user does this explicitly,
213 ;; turn off multibyte chars for more compatibility. 215 ;; turn off multibyte chars for more compatibility.
214 (unless auto 216 (unless auto
215 (setq-default enable-multibyte-characters nil) 217 (setq-default enable-multibyte-characters nil)
216 (if (get-buffer "*scratch*") 218 (mapcar (lambda (buffer)
217 (with-current-buffer "*scratch*" 219 (with-current-buffer buffer
218 (set-buffer-multibyte nil)))) 220 (if enable-multibyte-characters
221 (set-buffer-multibyte nil))))
222 (buffer-list)))
219 ;; If the user does this explicitly, 223 ;; If the user does this explicitly,
220 ;; switch to Latin-1 language environment 224 ;; switch to Latin-1 language environment
221 ;; unless some other has been specified. 225 ;; unless some other has been specified.
222 (unless auto 226 (unless auto
223 (if (equal current-language-environment "English") 227 (if (equal current-language-environment "English")