Mercurial > emacs
comparison lisp/disp-table.el @ 26124:ee67b2340a0f
* disp-table.el (standard-display-european): Remove undocumented
arg AUTO; no longer used by startup.el. Do not attempt to treat
all non-English language environments as coding system names.
Instead, use the downcased language environment name as a coding
system name if it is one; otherwise, use latin-1.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Thu, 21 Oct 1999 06:30:07 +0000 |
parents | f581efbf0caf |
children | c8bfb0b55a91 |
comparison
equal
deleted
inserted
replaced
26123:a82b8b03185f | 26124:ee67b2340a0f |
---|---|
174 (setq glyph-table (vconcat glyph-table (make-vector 224 nil)))) | 174 (setq glyph-table (vconcat glyph-table (make-vector 224 nil)))) |
175 (setq glyph-table (vconcat glyph-table (list string))) | 175 (setq glyph-table (vconcat glyph-table (list string))) |
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) |
180 "Semi-obsolete way to toggle display of ISO 8859 European characters. | 180 "Semi-obsolete way to toggle display of ISO 8859 European characters. |
181 | 181 |
182 This function is semi-obsolete; if you want to do your editing with | 182 This function is semi-obsolete; if you want to do your editing with |
183 unibyte characters, it is better to `set-language-environment' coupled | 183 unibyte characters, it is better to `set-language-environment' coupled |
184 with either the `--unibyte' option or the EMACS_UNIBYTE environment | 184 with either the `--unibyte' option or the EMACS_UNIBYTE environment |
197 from Lisp code also selects Latin-1 as the language environment, and | 197 from Lisp code also selects Latin-1 as the language environment, and |
198 selects unibyte mode for all Emacs buffers \(both existing buffers and | 198 selects unibyte mode for all Emacs buffers \(both existing buffers and |
199 those created subsequently). This provides increased compatibility | 199 those created subsequently). This provides increased compatibility |
200 for users who call this function in `.emacs'." | 200 for users who call this function in `.emacs'." |
201 | 201 |
202 ;; If the optional argument AUTO is non-nil, this function | |
203 ;; does not alter `enable-multibyte-characters'. | |
204 ;; AUTO also specifies, in this case, the coding system for terminal output. | |
205 ;; The AUTO argument is meant for use by startup.el only. | |
206 ;; which is why it is not in the doc string. | |
207 | |
208 ;; AUTO is `lambda' for an interactive call so that it will not | |
209 ;; set enable-multibyte-characters but also will not call | |
210 ;; set-terminal-coding-system. | |
211 (interactive (list current-prefix-arg 'lambda)) | |
212 (if (or (<= (prefix-numeric-value arg) 0) | 202 (if (or (<= (prefix-numeric-value arg) 0) |
213 (and (null arg) | 203 (and (null arg) |
214 (char-table-p standard-display-table) | 204 (char-table-p standard-display-table) |
215 ;; Test 161, because 160 displays as a space. | 205 ;; Test 161, because 160 displays as a space. |
216 (equal (aref standard-display-table 161) [161]))) | 206 (equal (aref standard-display-table 161) [161]))) |
217 (progn | 207 (progn |
218 (standard-display-default 160 255) | 208 (standard-display-default 160 255) |
219 (unless (or (memq window-system '(x w32)) | 209 (unless (or (memq window-system '(x w32)) |
220 (eq auto 'lambda)) | 210 (interactive-p)) |
221 (and (terminal-coding-system) | 211 (and (terminal-coding-system) |
222 (set-terminal-coding-system nil)))) | 212 (set-terminal-coding-system nil)))) |
223 ;; If the user does this explicitly from Lisp (as in .emacs), | 213 ;; If the user does this explicitly from Lisp (as in .emacs), |
224 ;; turn off multibyte chars for more compatibility. | 214 ;; turn off multibyte chars for more compatibility. |
225 (unless auto | 215 (unless (interactive-p) |
226 (setq-default enable-multibyte-characters nil) | 216 (setq-default enable-multibyte-characters nil) |
227 (mapcar (lambda (buffer) | 217 (mapcar (lambda (buffer) |
228 (with-current-buffer buffer | 218 (with-current-buffer buffer |
229 (if enable-multibyte-characters | 219 (if enable-multibyte-characters |
230 (set-buffer-multibyte nil)))) | 220 (set-buffer-multibyte nil)))) |
231 (buffer-list))) | 221 (buffer-list))) |
232 ;; If the user does this explicitly, | 222 ;; If the user does this explicitly, |
233 ;; switch to Latin-1 language environment | 223 ;; switch to Latin-1 language environment |
234 ;; unless some other has been specified. | 224 ;; unless some other has been specified. |
235 (unless auto | 225 (unless (interactive-p) |
236 (if (equal current-language-environment "English") | 226 (if (equal current-language-environment "English") |
237 (set-language-environment "latin-1"))) | 227 (set-language-environment "latin-1"))) |
238 (unless (or noninteractive (memq window-system '(x w32)) | 228 (unless (or noninteractive (memq window-system '(x w32)) |
239 (eq auto 'lambda)) | 229 (interactive-p)) |
240 ;; Send those codes literally to a non-X terminal. | 230 ;; Send those codes literally to a character-based terminal. |
241 ;; If AUTO is nil, we are using single-byte characters, | 231 ;; If we are using single-byte characters, |
242 ;; so it doesn't matter which one we use. | 232 ;; it doesn't matter which coding system we use. |
243 (set-terminal-coding-system | 233 (set-terminal-coding-system |
244 (cond ((not (equal current-language-environment "English")) | 234 (let ((c (intern (downcase current-language-environment)))) |
245 (intern (downcase current-language-environment))) | 235 (if (coding-system-p c) c 'latin-1)))) |
246 ((eq auto t) 'latin-1) | |
247 ((symbolp auto) (or auto 'latin-1)) | |
248 ((stringp auto) (intern auto))))) | |
249 (standard-display-european-internal))) | 236 (standard-display-european-internal))) |
250 | 237 |
251 (provide 'disp-table) | 238 (provide 'disp-table) |
252 | 239 |
253 ;;; disp-table.el ends here | 240 ;;; disp-table.el ends here |