aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-08 09:59:29 +0000
committerRichard M. Stallman1997-09-08 09:59:29 +0000
commit3304a6c4520f8ecb1f8aac2e4d784fc6bb188b65 (patch)
tree616d357bd6ee3996b24226cc6e67ef3178771781
parent35ae8ec829fb7465061ad51bcd9420faf4ddd8d4 (diff)
downloademacs-3304a6c4520f8ecb1f8aac2e4d784fc6bb188b65.tar.gz
emacs-3304a6c4520f8ecb1f8aac2e4d784fc6bb188b65.zip
(standard-display-european): Arg AUTO
specifies coding system for terminal output (if needed).
-rw-r--r--lisp/disp-table.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 788669182d5..bda4802142f 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -187,19 +187,28 @@ for all Emacs buffers, because users who call this function
187probably want to edit European characters in single-byte mode. 187probably want to edit European characters in single-byte mode.
188 188
189However, if the optional argument AUTO is non-nil, this function 189However, if the optional argument AUTO is non-nil, this function
190does not alter `enable-multibyte-characters'." 190does not alter `enable-multibyte-characters'.
191AUTO also specifies, in this case, the coding system for terminal output."
191 (interactive "P") 192 (interactive "P")
192 (if (or (<= (prefix-numeric-value arg) 0) 193 (if (or (<= (prefix-numeric-value arg) 0)
193 (and (null arg) 194 (and (null arg)
194 (char-table-p standard-display-table) 195 (char-table-p standard-display-table)
195 ;; Test 161, because 160 displays as a space. 196 ;; Test 161, because 160 displays as a space.
196 (equal (aref standard-display-table 161) [161]))) 197 (equal (aref standard-display-table 161) [161])))
197 (standard-display-default 160 255) 198 (progn
199 (standard-display-default 160 255)
200 (unless (eq window-system 'x)
201 (set-terminal-coding-system nil)))
198 ;; If the user does this explicitly, 202 ;; If the user does this explicitly,
199 ;; turn off multibyte chars for more compatibility. 203 ;; turn off multibyte chars for more compatibility.
200 (or auto 204 (or auto
201 (setq-default enable-multibyte-characters nil)) 205 (setq-default enable-multibyte-characters nil))
202 (standard-display-8bit 160 255) 206 (standard-display-8bit 160 255)
207 (unless (eq window-system 'x)
208 ;; Send those codes literally to a non-X terminal.
209 ;; If AUTO is nil, we are using single-byte characters,
210 ;; so it doesn't matter which one we use.
211 (set-terminal-coding-system (or auto 'latin-1)))
203 ;; Make non-line-break space display as a plain space. 212 ;; Make non-line-break space display as a plain space.
204 ;; Most X fonts do the wrong thing for code 160. 213 ;; Most X fonts do the wrong thing for code 160.
205 (aset standard-display-table 160 [32]) 214 (aset standard-display-table 160 [32])