aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1999-06-04 18:42:20 +0000
committerKarl Heuer1999-06-04 18:42:20 +0000
commit3fbd8622f286a966fe0ea95471653195088456aa (patch)
treecf7b136c95ebb2ad14c6eb0fa61b9c60ca730864
parentadb643d36c075e405fb230f0429595ddad4d79eb (diff)
downloademacs-3fbd8622f286a966fe0ea95471653195088456aa.tar.gz
emacs-3fbd8622f286a966fe0ea95471653195088456aa.zip
(standard-display-european):
For an interactive call by the user, don't set enable-multibyte-characters, and don't set the terminal coding system.
-rw-r--r--lisp/disp-table.el48
1 files changed, 29 insertions, 19 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index a648322dbaa..f2855692a09 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -177,31 +177,38 @@ X frame."
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 "Semi-obsolete way to toggle display of ISO 8859 European characters.
181 181
182This function is semi-obsolete; you can use `set-language-environment' 182This function is semi-obsolete; if you want to do your editing with
183coupled with either the `--unibyte' option, the EMACS_UNIBYTE 183unibyte characters, it is better to `set-language-environment' coupled
184environment variable or customizing `enable-multibyte-characters' if 184with either the `--unibyte' option or the EMACS_UNIBYTE environment
185you prefer to use unibyte characters. 185variable, or else customize `enable-multibyte-characters'.
186 186
187When enabled, characters in the range of 160 to 255 display not 187With prefix argument, this command enables European character display
188as octal escapes, but as accented characters. Codes 146 and 160 188if arg is positive, disables it otherwise. Otherwise, it toggles
189display as apostrophe and space, even though they are not the ASCII 189European character display.
190codes for apostrophe and space.
191 190
192With prefix argument, enable European character display iff arg is positive. 191When this mode is enabled, characters in the range of 160 to 255
192display not as octal escapes, but as accented characters. Codes 146
193and 160 display as apostrophe and space, even though they are not the
194ASCII codes for apostrophe and space.
193 195
194Normally, this function turns off `enable-multibyte-characters' for 196Enabling European character display with this command noninteractively
195existing and subsequently created Emacs buffers. This is because 197from Lisp code also selects Latin-1 as the language environment, and
196users who call this function probably want to edit European characters 198selects unibyte mode for all Emacs buffers \(both existing buffers and
197in single-byte mode." 199those created subsequently). This provides increased compatibility
200for users who call this function in `.emacs'."
198 201
199 ;; If the optional argument AUTO is non-nil, this function 202 ;; If the optional argument AUTO is non-nil, this function
200 ;; does not alter `enable-multibyte-characters'. 203 ;; does not alter `enable-multibyte-characters'.
201 ;; AUTO also specifies, in this case, the coding system for terminal output. 204 ;; AUTO also specifies, in this case, the coding system for terminal output.
202 ;; The AUTO argument is meant for use by startup.el only. 205 ;; The AUTO argument is meant for use by startup.el only.
203 ;; which is why it is not in the doc string. 206 ;; which is why it is not in the doc string.
204 (interactive "P") 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))
205 (if (or (<= (prefix-numeric-value arg) 0) 212 (if (or (<= (prefix-numeric-value arg) 0)
206 (and (null arg) 213 (and (null arg)
207 (char-table-p standard-display-table) 214 (char-table-p standard-display-table)
@@ -209,9 +216,11 @@ in single-byte mode."
209 (equal (aref standard-display-table 161) [161]))) 216 (equal (aref standard-display-table 161) [161])))
210 (progn 217 (progn
211 (standard-display-default 160 255) 218 (standard-display-default 160 255)
212 (unless (memq window-system '(x w32)) 219 (unless (or (memq window-system '(x w32))
213 (set-terminal-coding-system nil))) 220 (eq auto 'lambda))
214 ;; If the user does this explicitly, 221 (and (terminal-coding-system)
222 (set-terminal-coding-system nil))))
223 ;; If the user does this explicitly from Lisp (as in .emacs),
215 ;; turn off multibyte chars for more compatibility. 224 ;; turn off multibyte chars for more compatibility.
216 (unless auto 225 (unless auto
217 (setq-default enable-multibyte-characters nil) 226 (setq-default enable-multibyte-characters nil)
@@ -226,7 +235,8 @@ in single-byte mode."
226 (unless auto 235 (unless auto
227 (if (equal current-language-environment "English") 236 (if (equal current-language-environment "English")
228 (set-language-environment "latin-1"))) 237 (set-language-environment "latin-1")))
229 (unless (or noninteractive (memq window-system '(x w32))) 238 (unless (or noninteractive (memq window-system '(x w32))
239 (eq auto 'lambda))
230 ;; Send those codes literally to a non-X terminal. 240 ;; Send those codes literally to a non-X terminal.
231 ;; If AUTO is nil, we are using single-byte characters, 241 ;; If AUTO is nil, we are using single-byte characters,
232 ;; so it doesn't matter which one we use. 242 ;; so it doesn't matter which one we use.