diff options
| author | Karl Heuer | 1999-06-04 18:42:20 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-06-04 18:42:20 +0000 |
| commit | 3fbd8622f286a966fe0ea95471653195088456aa (patch) | |
| tree | cf7b136c95ebb2ad14c6eb0fa61b9c60ca730864 | |
| parent | adb643d36c075e405fb230f0429595ddad4d79eb (diff) | |
| download | emacs-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.el | 48 |
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 | ||
| 182 | This function is semi-obsolete; you can use `set-language-environment' | 182 | This function is semi-obsolete; if you want to do your editing with |
| 183 | coupled with either the `--unibyte' option, the EMACS_UNIBYTE | 183 | unibyte characters, it is better to `set-language-environment' coupled |
| 184 | environment variable or customizing `enable-multibyte-characters' if | 184 | with either the `--unibyte' option or the EMACS_UNIBYTE environment |
| 185 | you prefer to use unibyte characters. | 185 | variable, or else customize `enable-multibyte-characters'. |
| 186 | 186 | ||
| 187 | When enabled, characters in the range of 160 to 255 display not | 187 | With prefix argument, this command enables European character display |
| 188 | as octal escapes, but as accented characters. Codes 146 and 160 | 188 | if arg is positive, disables it otherwise. Otherwise, it toggles |
| 189 | display as apostrophe and space, even though they are not the ASCII | 189 | European character display. |
| 190 | codes for apostrophe and space. | ||
| 191 | 190 | ||
| 192 | With prefix argument, enable European character display iff arg is positive. | 191 | When this mode is enabled, characters in the range of 160 to 255 |
| 192 | display not as octal escapes, but as accented characters. Codes 146 | ||
| 193 | and 160 display as apostrophe and space, even though they are not the | ||
| 194 | ASCII codes for apostrophe and space. | ||
| 193 | 195 | ||
| 194 | Normally, this function turns off `enable-multibyte-characters' for | 196 | Enabling European character display with this command noninteractively |
| 195 | existing and subsequently created Emacs buffers. This is because | 197 | from Lisp code also selects Latin-1 as the language environment, and |
| 196 | users who call this function probably want to edit European characters | 198 | selects unibyte mode for all Emacs buffers \(both existing buffers and |
| 197 | in single-byte mode." | 199 | those created subsequently). This provides increased compatibility |
| 200 | for 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. |