diff options
| author | Stefan Monnier | 2018-01-25 13:35:13 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2018-01-25 13:35:37 -0500 |
| commit | 9107cf30c0c895bc4ea42810a22feee4af991157 (patch) | |
| tree | d6574e36348178cfadc1fb5d09ca7bebc250f088 | |
| parent | f44b50ffc957abb0fcda9b93f1bb7e2c8e9b3b0e (diff) | |
| download | emacs-9107cf30c0c895bc4ea42810a22feee4af991157.tar.gz emacs-9107cf30c0c895bc4ea42810a22feee4af991157.zip | |
Replace (default-value 'enable-multibyte-characters) with t
Since Emacs-24, (default-value 'enable-multibyte-characters) can't be
changed any more, so we can remove all code which checks this value.
* lisp/x-dnd.el (x-dnd-handle-file-name):
* lisp/w32-fns.el (w32-set-default-process-coding-system):
* lisp/textmodes/ispell.el (ispell-send-string):
* lisp/term/internal.el (dos-codepage-setup):
* lisp/tar-mode.el (tar-header-block-tokenize, tar--extract):
* lisp/startup.el (command-line):
* lisp/server.el (server-process-filter):
* lisp/net/browse-url.el (browse-url-file-url):
* lisp/menu-bar.el (menu-bar-options-menu, menu-bar-describe-menu):
* lisp/mail/sendmail.el (mail-setup):
* lisp/mail/rmail.el (rmail-mode, rmail-get-new-mail):
* lisp/mail/rfc2047.el (rfc2047-encode-message-header):
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/international/mule-diag.el (mule-diag):
* lisp/files.el (find-file-noselect-1):
* lisp/dos-fns.el (dos-set-default-process-coding-system):
* lisp/arc-mode.el (archive-mode):
* lisp/international/mule-cmds.el (mule-menu-keymap)
(set-default-coding-systems, set-language-info)
(set-language-environment, standard-display-european-internal)
(set-locale-environment): Simplify code.
| -rw-r--r-- | doc/lispref/processes.texi | 3 | ||||
| -rw-r--r-- | lisp/arc-mode.el | 3 | ||||
| -rw-r--r-- | lisp/dos-fns.el | 4 | ||||
| -rw-r--r-- | lisp/files.el | 3 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 60 | ||||
| -rw-r--r-- | lisp/international/mule-diag.el | 2 | ||||
| -rw-r--r-- | lisp/mail/emacsbug.el | 5 | ||||
| -rw-r--r-- | lisp/mail/rfc2047.el | 24 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 5 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 2 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 14 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 3 | ||||
| -rw-r--r-- | lisp/server.el | 5 | ||||
| -rw-r--r-- | lisp/startup.el | 21 | ||||
| -rw-r--r-- | lisp/tar-mode.el | 12 | ||||
| -rw-r--r-- | lisp/term/internal.el | 3 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 8 | ||||
| -rw-r--r-- | lisp/w32-fns.el | 16 | ||||
| -rw-r--r-- | lisp/x-dnd.el | 5 | ||||
| -rw-r--r-- | src/process.c | 8 |
20 files changed, 65 insertions, 141 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 8a8425cb84b..0a3a4617a2e 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -2712,8 +2712,7 @@ Initialize the process filter to @var{filter}. | |||
| 2712 | 2712 | ||
| 2713 | @item :filter-multibyte @var{multibyte} | 2713 | @item :filter-multibyte @var{multibyte} |
| 2714 | If @var{multibyte} is non-@code{nil}, strings given to the process | 2714 | If @var{multibyte} is non-@code{nil}, strings given to the process |
| 2715 | filter are multibyte, otherwise they are unibyte. The default is the | 2715 | filter are multibyte, otherwise they are unibyte. The default is @code{t}. |
| 2716 | default value of @code{enable-multibyte-characters}. | ||
| 2717 | 2716 | ||
| 2718 | @item :sentinel @var{sentinel} | 2717 | @item :sentinel @var{sentinel} |
| 2719 | Initialize the process sentinel to @var{sentinel}. | 2718 | Initialize the process sentinel to @var{sentinel}. |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index adb36699032..1dec40f2157 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -748,8 +748,7 @@ archive. | |||
| 748 | (or file-name-coding-system | 748 | (or file-name-coding-system |
| 749 | default-file-name-coding-system | 749 | default-file-name-coding-system |
| 750 | locale-coding-system)) | 750 | locale-coding-system)) |
| 751 | (if (default-value 'enable-multibyte-characters) | 751 | (set-buffer-multibyte 'to) |
| 752 | (set-buffer-multibyte 'to)) | ||
| 753 | (archive-summarize nil) | 752 | (archive-summarize nil) |
| 754 | (setq buffer-read-only t) | 753 | (setq buffer-read-only t) |
| 755 | (when (and archive-visit-single-files | 754 | (when (and archive-visit-single-files |
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index 87f7ed10fea..ebb8acb8608 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el | |||
| @@ -212,9 +212,7 @@ returned unaltered." | |||
| 212 | ;; Override settings chosen at startup. | 212 | ;; Override settings chosen at startup. |
| 213 | (defun dos-set-default-process-coding-system () | 213 | (defun dos-set-default-process-coding-system () |
| 214 | (setq default-process-coding-system | 214 | (setq default-process-coding-system |
| 215 | (if (default-value 'enable-multibyte-characters) | 215 | '(undecided-dos . undecided-dos))) |
| 216 | '(undecided-dos . undecided-dos) | ||
| 217 | '(raw-text-dos . raw-text-dos)))) | ||
| 218 | 216 | ||
| 219 | (add-hook 'before-init-hook 'dos-set-default-process-coding-system) | 217 | (add-hook 'before-init-hook 'dos-set-default-process-coding-system) |
| 220 | 218 | ||
diff --git a/lisp/files.el b/lisp/files.el index 7194b56fef2..00622cf6620 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2232,8 +2232,7 @@ Do you want to revisit the file normally now? ") | |||
| 2232 | (kill-local-variable 'cursor-type) | 2232 | (kill-local-variable 'cursor-type) |
| 2233 | (let ((inhibit-read-only t)) | 2233 | (let ((inhibit-read-only t)) |
| 2234 | (erase-buffer)) | 2234 | (erase-buffer)) |
| 2235 | (and (default-value 'enable-multibyte-characters) | 2235 | (and (not rawfile) |
| 2236 | (not rawfile) | ||
| 2237 | (set-buffer-multibyte t)) | 2236 | (set-buffer-multibyte t)) |
| 2238 | (if rawfile | 2237 | (if rawfile |
| 2239 | (condition-case () | 2238 | (condition-case () |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index aeba954a3b2..34681662631 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -136,8 +136,7 @@ | |||
| 136 | (expand-file-name "HELLO" data-directory)) | 136 | (expand-file-name "HELLO" data-directory)) |
| 137 | :help "Demonstrate various character sets")) | 137 | :help "Demonstrate various character sets")) |
| 138 | (bindings--define-key map [set-various-coding-system] | 138 | (bindings--define-key map [set-various-coding-system] |
| 139 | `(menu-item "Set Coding Systems" ,set-coding-system-map | 139 | `(menu-item "Set Coding Systems" ,set-coding-system-map)) |
| 140 | :enable (default-value 'enable-multibyte-characters))) | ||
| 141 | 140 | ||
| 142 | (bindings--define-key map [separator-input-method] menu-bar-separator) | 141 | (bindings--define-key map [separator-input-method] menu-bar-separator) |
| 143 | (bindings--define-key map [describe-input-method] | 142 | (bindings--define-key map [describe-input-method] |
| @@ -355,8 +354,7 @@ This also sets the following values: | |||
| 355 | (if (eq system-type 'darwin) | 354 | (if (eq system-type 'darwin) |
| 356 | ;; The file-name coding system on Darwin systems is always utf-8. | 355 | ;; The file-name coding system on Darwin systems is always utf-8. |
| 357 | (setq default-file-name-coding-system 'utf-8-unix) | 356 | (setq default-file-name-coding-system 'utf-8-unix) |
| 358 | (if (and (default-value 'enable-multibyte-characters) | 357 | (if (and (or (not coding-system) |
| 359 | (or (not coding-system) | ||
| 360 | (coding-system-get coding-system 'ascii-compatible-p))) | 358 | (coding-system-get coding-system 'ascii-compatible-p))) |
| 361 | (setq default-file-name-coding-system | 359 | (setq default-file-name-coding-system |
| 362 | (coding-system-change-eol-conversion coding-system 'unix)))) | 360 | (coding-system-change-eol-conversion coding-system 'unix)))) |
| @@ -1158,10 +1156,7 @@ see `language-info-alist'." | |||
| 1158 | ((eq key 'nonascii-translation) | 1156 | ((eq key 'nonascii-translation) |
| 1159 | (set-language-environment-nonascii-translation lang-env)) | 1157 | (set-language-environment-nonascii-translation lang-env)) |
| 1160 | ((eq key 'charset) | 1158 | ((eq key 'charset) |
| 1161 | (set-language-environment-charset lang-env)) | 1159 | (set-language-environment-charset lang-env))))) |
| 1162 | ((and (not (default-value 'enable-multibyte-characters)) | ||
| 1163 | (or (eq key 'unibyte-syntax) (eq key 'unibyte-display))) | ||
| 1164 | (set-language-environment-unibyte lang-env))))) | ||
| 1165 | 1160 | ||
| 1166 | (defun set-language-info-internal (lang-env key info) | 1161 | (defun set-language-info-internal (lang-env key info) |
| 1167 | "Internal use only. | 1162 | "Internal use only. |
| @@ -1897,9 +1892,6 @@ the new language environment, it runs `set-language-environment-hook'." | |||
| 1897 | (set-language-environment-input-method language-name) | 1892 | (set-language-environment-input-method language-name) |
| 1898 | (set-language-environment-nonascii-translation language-name) | 1893 | (set-language-environment-nonascii-translation language-name) |
| 1899 | (set-language-environment-charset language-name) | 1894 | (set-language-environment-charset language-name) |
| 1900 | ;; Unibyte setups if necessary. | ||
| 1901 | (unless (default-value 'enable-multibyte-characters) | ||
| 1902 | (set-language-environment-unibyte language-name)) | ||
| 1903 | 1895 | ||
| 1904 | (let ((func (get-language-info language-name 'setup-function))) | 1896 | (let ((func (get-language-info language-name 'setup-function))) |
| 1905 | (if (functionp func) | 1897 | (if (functionp func) |
| @@ -1978,28 +1970,22 @@ See `set-language-info-alist' for use in programs." | |||
| 1978 | (defun standard-display-european-internal () | 1970 | (defun standard-display-european-internal () |
| 1979 | ;; Actually set up direct output of non-ASCII characters. | 1971 | ;; Actually set up direct output of non-ASCII characters. |
| 1980 | (standard-display-8bit (if (eq window-system 'pc) 128 160) 255) | 1972 | (standard-display-8bit (if (eq window-system 'pc) 128 160) 255) |
| 1981 | ;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with | 1973 | ;; Most X fonts used to do the wrong thing for latin-1 code 160. |
| 1982 | ;; the native font, and codes 160 and 146 stand for something very | 1974 | (unless (and (eq window-system 'x) |
| 1983 | ;; different there. | 1975 | ;; XFree86 4 has fixed the fonts. |
| 1984 | (or (and (eq window-system 'pc) (not (default-value | 1976 | (string= "The XFree86 Project, Inc" (x-server-vendor)) |
| 1985 | 'enable-multibyte-characters))) | 1977 | (> (aref (number-to-string (nth 2 (x-server-version))) 0) |
| 1986 | (progn | 1978 | ?3)) |
| 1987 | ;; Most X fonts used to do the wrong thing for latin-1 code 160. | 1979 | ;; Make non-line-break space display as a plain space. |
| 1988 | (unless (and (eq window-system 'x) | 1980 | (aset standard-display-table (unibyte-char-to-multibyte 160) [32])) |
| 1989 | ;; XFree86 4 has fixed the fonts. | 1981 | ;; Most Windows programs send out apostrophes as \222. Most X fonts |
| 1990 | (string= "The XFree86 Project, Inc" (x-server-vendor)) | 1982 | ;; don't contain a character at that position. Map it to the ASCII |
| 1991 | (> (aref (number-to-string (nth 2 (x-server-version))) 0) | 1983 | ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, |
| 1992 | ?3)) | 1984 | ;; U+2019, normally from the windows-1252 character set. XFree 4 |
| 1993 | ;; Make non-line-break space display as a plain space. | 1985 | ;; fonts probably have the appropriate glyph at this position, |
| 1994 | (aset standard-display-table (unibyte-char-to-multibyte 160) [32])) | 1986 | ;; so they could use standard-display-8bit. It's better to use a |
| 1995 | ;; Most Windows programs send out apostrophes as \222. Most X fonts | 1987 | ;; proper windows-1252 coding system. --fx] |
| 1996 | ;; don't contain a character at that position. Map it to the ASCII | 1988 | (aset standard-display-table (unibyte-char-to-multibyte 146) [39])) |
| 1997 | ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, | ||
| 1998 | ;; U+2019, normally from the windows-1252 character set. XFree 4 | ||
| 1999 | ;; fonts probably have the appropriate glyph at this position, | ||
| 2000 | ;; so they could use standard-display-8bit. It's better to use a | ||
| 2001 | ;; proper windows-1252 coding system. --fx] | ||
| 2002 | (aset standard-display-table (unibyte-char-to-multibyte 146) [39])))) | ||
| 2003 | 1989 | ||
| 2004 | (defun set-language-environment-coding-systems (language-name) | 1990 | (defun set-language-environment-coding-systems (language-name) |
| 2005 | "Do various coding system setups for language environment LANGUAGE-NAME." | 1991 | "Do various coding system setups for language environment LANGUAGE-NAME." |
| @@ -2665,12 +2651,8 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2665 | (unless frame | 2651 | (unless frame |
| 2666 | (set-language-environment language-name)) | 2652 | (set-language-environment language-name)) |
| 2667 | 2653 | ||
| 2668 | ;; If the default enable-multibyte-characters is nil, | 2654 | (set-display-table-and-terminal-coding-system |
| 2669 | ;; we are using single-byte characters, | 2655 | language-name coding-system frame) |
| 2670 | ;; so the display table and terminal coding system are irrelevant. | ||
| 2671 | (when (default-value 'enable-multibyte-characters) | ||
| 2672 | (set-display-table-and-terminal-coding-system | ||
| 2673 | language-name coding-system frame)) | ||
| 2674 | 2656 | ||
| 2675 | ;; Set the `keyboard-coding-system' if appropriate (tty | 2657 | ;; Set the `keyboard-coding-system' if appropriate (tty |
| 2676 | ;; only). At least X and MS Windows can generate | 2658 | ;; only). At least X and MS Windows can generate |
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 7e225607a5a..87a2e993bb4 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el | |||
| @@ -1103,8 +1103,6 @@ system which uses fontsets)." | |||
| 1103 | (insert "Version of this emacs:\n " (emacs-version) "\n\n") | 1103 | (insert "Version of this emacs:\n " (emacs-version) "\n\n") |
| 1104 | (insert "Configuration options:\n " system-configuration-options "\n\n") | 1104 | (insert "Configuration options:\n " system-configuration-options "\n\n") |
| 1105 | (insert "Multibyte characters awareness:\n" | 1105 | (insert "Multibyte characters awareness:\n" |
| 1106 | (format " default: %S\n" (default-value | ||
| 1107 | 'enable-multibyte-characters)) | ||
| 1108 | (format " current-buffer: %S\n\n" enable-multibyte-characters)) | 1106 | (format " current-buffer: %S\n\n" enable-multibyte-characters)) |
| 1109 | (insert "Current language environment: " current-language-environment | 1107 | (insert "Current language environment: " current-language-environment |
| 1110 | "\n\n") | 1108 | "\n\n") |
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index cb34a75fa1c..43e8d3b526c 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -286,11 +286,6 @@ usually do not have translators for other languages.\n\n"))) | |||
| 286 | "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" | 286 | "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" |
| 287 | "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS")) | 287 | "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS")) |
| 288 | (insert (format " locale-coding-system: %s\n" locale-coding-system)) | 288 | (insert (format " locale-coding-system: %s\n" locale-coding-system)) |
| 289 | ;; Only ~ 0.2% of people from a sample of 3200 changed this from | ||
| 290 | ;; the default, t. | ||
| 291 | (or (default-value 'enable-multibyte-characters) | ||
| 292 | (insert (format " default enable-multibyte-characters: %s\n" | ||
| 293 | (default-value 'enable-multibyte-characters)))) | ||
| 294 | (insert "\n") | 289 | (insert "\n") |
| 295 | (insert (format "Major mode: %s\n" | 290 | (insert (format "Major mode: %s\n" |
| 296 | (format-mode-line | 291 | (format-mode-line |
diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index dbfde57224a..c0cd4ee8c43 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el | |||
| @@ -290,8 +290,7 @@ Should be called narrowed to the head of the message." | |||
| 290 | (let ((rfc2047-encoding-type 'mime)) | 290 | (let ((rfc2047-encoding-type 'mime)) |
| 291 | (rfc2047-encode-region (point) (point-max)))) | 291 | (rfc2047-encode-region (point) (point-max)))) |
| 292 | ((eq method 'default) | 292 | ((eq method 'default) |
| 293 | (if (and (default-value 'enable-multibyte-characters) | 293 | (if mail-parse-charset |
| 294 | mail-parse-charset) | ||
| 295 | (encode-coding-region (point) (point-max) | 294 | (encode-coding-region (point) (point-max) |
| 296 | mail-parse-charset))) | 295 | mail-parse-charset))) |
| 297 | ;; We get this when CC'ing messages to newsgroups with | 296 | ;; We get this when CC'ing messages to newsgroups with |
| @@ -305,18 +304,17 @@ Should be called narrowed to the head of the message." | |||
| 305 | ;; in accordance with changes elsewhere. | 304 | ;; in accordance with changes elsewhere. |
| 306 | ((null method) | 305 | ((null method) |
| 307 | (rfc2047-encode-region (point) (point-max))) | 306 | (rfc2047-encode-region (point) (point-max))) |
| 308 | ;;; ((null method) | 307 | ;; ((null method) |
| 309 | ;;; (if (or (message-options-get | 308 | ;; (if (or (message-options-get |
| 310 | ;;; 'rfc2047-encode-message-header-encode-any) | 309 | ;; 'rfc2047-encode-message-header-encode-any) |
| 311 | ;;; (message-options-set | 310 | ;; (message-options-set |
| 312 | ;;; 'rfc2047-encode-message-header-encode-any | 311 | ;; 'rfc2047-encode-message-header-encode-any |
| 313 | ;;; (y-or-n-p | 312 | ;; (y-or-n-p |
| 314 | ;;; "Some texts are not encoded. Encode anyway?"))) | 313 | ;; "Some texts are not encoded. Encode anyway?"))) |
| 315 | ;;; (rfc2047-encode-region (point-min) (point-max)) | 314 | ;; (rfc2047-encode-region (point-min) (point-max)) |
| 316 | ;;; (error "Cannot send unencoded text"))) | 315 | ;; (error "Cannot send unencoded text"))) |
| 317 | ((mm-coding-system-p method) | 316 | ((mm-coding-system-p method) |
| 318 | (when (default-value 'enable-multibyte-characters) | 317 | (encode-coding-region (point) (point-max) method)) |
| 319 | (encode-coding-region (point) (point-max) method))) | ||
| 320 | ;; Hm. | 318 | ;; Hm. |
| 321 | (t))) | 319 | (t))) |
| 322 | (goto-char (point-max)))))))) | 320 | (goto-char (point-max)))))))) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 7b542638743..4e182525511 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1331,8 +1331,7 @@ Instead, these commands are available: | |||
| 1331 | (let ((finding-rmail-file (not (eq major-mode 'rmail-mode)))) | 1331 | (let ((finding-rmail-file (not (eq major-mode 'rmail-mode)))) |
| 1332 | (rmail-mode-2) | 1332 | (rmail-mode-2) |
| 1333 | (when (and finding-rmail-file | 1333 | (when (and finding-rmail-file |
| 1334 | (null coding-system-for-read) | 1334 | (null coding-system-for-read)) |
| 1335 | (default-value 'enable-multibyte-characters)) | ||
| 1336 | (let ((rmail-enable-multibyte t)) | 1335 | (let ((rmail-enable-multibyte t)) |
| 1337 | (rmail-require-mime-maybe) | 1336 | (rmail-require-mime-maybe) |
| 1338 | (rmail-convert-file-maybe) | 1337 | (rmail-convert-file-maybe) |
| @@ -1759,7 +1758,7 @@ not be a new one). It returns non-nil if it got any new messages." | |||
| 1759 | (or (eq buffer-undo-list t) | 1758 | (or (eq buffer-undo-list t) |
| 1760 | (setq buffer-undo-list nil)) | 1759 | (setq buffer-undo-list nil)) |
| 1761 | (let ((all-files (if file-name (list file-name) rmail-inbox-list)) | 1760 | (let ((all-files (if file-name (list file-name) rmail-inbox-list)) |
| 1762 | (rmail-enable-multibyte (default-value 'enable-multibyte-characters)) | 1761 | (rmail-enable-multibyte t) |
| 1763 | found) | 1762 | found) |
| 1764 | (unwind-protect | 1763 | (unwind-protect |
| 1765 | (progn | 1764 | (progn |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index da2d3174ce1..212a6c74baa 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -607,7 +607,7 @@ This also saves the value of `send-mail-function' via Customize." | |||
| 607 | (kill-local-variable 'buffer-file-coding-system) | 607 | (kill-local-variable 'buffer-file-coding-system) |
| 608 | ;; This doesn't work for enable-multibyte-characters. | 608 | ;; This doesn't work for enable-multibyte-characters. |
| 609 | ;; (kill-local-variable 'enable-multibyte-characters) | 609 | ;; (kill-local-variable 'enable-multibyte-characters) |
| 610 | (set-buffer-multibyte (default-value 'enable-multibyte-characters)) | 610 | (set-buffer-multibyte t) |
| 611 | (if current-input-method | 611 | (if current-input-method |
| 612 | (deactivate-input-method)) | 612 | (deactivate-input-method)) |
| 613 | 613 | ||
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index e2ebd981196..25e016247b3 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1379,11 +1379,7 @@ mail status in mode line")) | |||
| 1379 | ;; It is better not to use backquote here, | 1379 | ;; It is better not to use backquote here, |
| 1380 | ;; because that makes a bootstrapping problem | 1380 | ;; because that makes a bootstrapping problem |
| 1381 | ;; if you need to recompile all the Lisp files using interpreted code. | 1381 | ;; if you need to recompile all the Lisp files using interpreted code. |
| 1382 | `(menu-item "Multilingual Environment" ,mule-menu-keymap | 1382 | `(menu-item "Multilingual Environment" ,mule-menu-keymap)) |
| 1383 | ;; Most of the MULE menu actually does make sense in | ||
| 1384 | ;; unibyte mode, e.g. language selection. | ||
| 1385 | ;; :visible '(default-value 'enable-multibyte-characters) | ||
| 1386 | )) | ||
| 1387 | ;;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) | 1383 | ;;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) |
| 1388 | ;;(bindings--define-key menu [preferences] | 1384 | ;;(bindings--define-key menu [preferences] |
| 1389 | ;; `(menu-item "Preferences" ,menu-bar-preferences-menu | 1385 | ;; `(menu-item "Preferences" ,menu-bar-preferences-menu |
| @@ -1697,18 +1693,14 @@ mail status in mode line")) | |||
| 1697 | 1693 | ||
| 1698 | (bindings--define-key menu [mule-diag] | 1694 | (bindings--define-key menu [mule-diag] |
| 1699 | '(menu-item "Show All of Mule Status" mule-diag | 1695 | '(menu-item "Show All of Mule Status" mule-diag |
| 1700 | :visible (default-value 'enable-multibyte-characters) | ||
| 1701 | :help "Display multilingual environment settings")) | 1696 | :help "Display multilingual environment settings")) |
| 1702 | (bindings--define-key menu [describe-coding-system-briefly] | 1697 | (bindings--define-key menu [describe-coding-system-briefly] |
| 1703 | '(menu-item "Describe Coding System (Briefly)" | 1698 | '(menu-item "Describe Coding System (Briefly)" |
| 1704 | describe-current-coding-system-briefly | 1699 | describe-current-coding-system-briefly)) |
| 1705 | :visible (default-value 'enable-multibyte-characters))) | ||
| 1706 | (bindings--define-key menu [describe-coding-system] | 1700 | (bindings--define-key menu [describe-coding-system] |
| 1707 | '(menu-item "Describe Coding System..." describe-coding-system | 1701 | '(menu-item "Describe Coding System..." describe-coding-system)) |
| 1708 | :visible (default-value 'enable-multibyte-characters))) | ||
| 1709 | (bindings--define-key menu [describe-input-method] | 1702 | (bindings--define-key menu [describe-input-method] |
| 1710 | '(menu-item "Describe Input Method..." describe-input-method | 1703 | '(menu-item "Describe Input Method..." describe-input-method |
| 1711 | :visible (default-value 'enable-multibyte-characters) | ||
| 1712 | :help "Keyboard layout for specific input method")) | 1704 | :help "Keyboard layout for specific input method")) |
| 1713 | (bindings--define-key menu [describe-language-environment] | 1705 | (bindings--define-key menu [describe-language-environment] |
| 1714 | `(menu-item "Describe Language Environment" | 1706 | `(menu-item "Describe Language Environment" |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 98b0acfc0c6..8086495aaaa 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -713,8 +713,7 @@ Use variable `browse-url-filename-alist' to map filenames to URLs." | |||
| 713 | (let ((coding (if (equal system-type 'windows-nt) | 713 | (let ((coding (if (equal system-type 'windows-nt) |
| 714 | ;; W32 pretends that file names are UTF-8 encoded. | 714 | ;; W32 pretends that file names are UTF-8 encoded. |
| 715 | 'utf-8 | 715 | 'utf-8 |
| 716 | (and (default-value 'enable-multibyte-characters) | 716 | (and (or file-name-coding-system |
| 717 | (or file-name-coding-system | ||
| 718 | default-file-name-coding-system))))) | 717 | default-file-name-coding-system))))) |
| 719 | (if coding (setq file (encode-coding-string file coding)))) | 718 | (if coding (setq file (encode-coding-string file coding)))) |
| 720 | (setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]")) | 719 | (setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]")) |
diff --git a/lisp/server.el b/lisp/server.el index ac0d7018513..d91a51e425a 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1061,9 +1061,8 @@ The following commands are accepted by the client: | |||
| 1061 | ;; supported any more. | 1061 | ;; supported any more. |
| 1062 | (cl-assert (eq (match-end 0) (length string))) | 1062 | (cl-assert (eq (match-end 0) (length string))) |
| 1063 | (let ((request (substring string 0 (match-beginning 0))) | 1063 | (let ((request (substring string 0 (match-beginning 0))) |
| 1064 | (coding-system (and (default-value 'enable-multibyte-characters) | 1064 | (coding-system (or file-name-coding-system |
| 1065 | (or file-name-coding-system | 1065 | default-file-name-coding-system)) |
| 1066 | default-file-name-coding-system))) | ||
| 1067 | nowait ; t if emacsclient does not want to wait for us. | 1066 | nowait ; t if emacsclient does not want to wait for us. |
| 1068 | frame ; Frame opened for the client (if any). | 1067 | frame ; Frame opened for the client (if any). |
| 1069 | display ; Open frame on this display. | 1068 | display ; Open frame on this display. |
diff --git a/lisp/startup.el b/lisp/startup.el index 86beef70a37..8c36c19e828 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1159,8 +1159,7 @@ please check its value") | |||
| 1159 | (let (debug-on-error-from-init-file | 1159 | (let (debug-on-error-from-init-file |
| 1160 | debug-on-error-should-be-set | 1160 | debug-on-error-should-be-set |
| 1161 | (debug-on-error-initial | 1161 | (debug-on-error-initial |
| 1162 | (if (eq init-file-debug t) 'startup init-file-debug)) | 1162 | (if (eq init-file-debug t) 'startup init-file-debug))) |
| 1163 | (orig-enable-multibyte (default-value 'enable-multibyte-characters))) | ||
| 1164 | (let ((debug-on-error debug-on-error-initial) | 1163 | (let ((debug-on-error debug-on-error-initial) |
| 1165 | ;; This function actually reads the init files. | 1164 | ;; This function actually reads the init files. |
| 1166 | (inner | 1165 | (inner |
| @@ -1275,23 +1274,7 @@ the `--debug-init' option to view a complete error backtrace." | |||
| 1275 | (setq debug-on-error-should-be-set t | 1274 | (setq debug-on-error-should-be-set t |
| 1276 | debug-on-error-from-init-file debug-on-error))) | 1275 | debug-on-error-from-init-file debug-on-error))) |
| 1277 | (if debug-on-error-should-be-set | 1276 | (if debug-on-error-should-be-set |
| 1278 | (setq debug-on-error debug-on-error-from-init-file)) | 1277 | (setq debug-on-error debug-on-error-from-init-file))) |
| 1279 | (unless (or (default-value 'enable-multibyte-characters) | ||
| 1280 | (eq orig-enable-multibyte (default-value | ||
| 1281 | 'enable-multibyte-characters))) | ||
| 1282 | ;; Init file changed to unibyte. Reset existing multibyte | ||
| 1283 | ;; buffers (probably *scratch*, *Messages*, *Minibuf-0*). | ||
| 1284 | ;; Arguably this should only be done if they're free of | ||
| 1285 | ;; multibyte characters. | ||
| 1286 | (mapc (lambda (buffer) | ||
| 1287 | (with-current-buffer buffer | ||
| 1288 | (if enable-multibyte-characters | ||
| 1289 | (set-buffer-multibyte nil)))) | ||
| 1290 | (buffer-list)) | ||
| 1291 | ;; Also re-set the language environment in case it was | ||
| 1292 | ;; originally done before unibyte was set and is sensitive to | ||
| 1293 | ;; unibyte (display table, terminal coding system &c). | ||
| 1294 | (set-language-environment current-language-environment))) | ||
| 1295 | 1278 | ||
| 1296 | ;; Do this here in case the init file sets mail-host-address. | 1279 | ;; Do this here in case the init file sets mail-host-address. |
| 1297 | (and mail-host-address | 1280 | (and mail-host-address |
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 07d902c1bb0..2beeb7484a7 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el | |||
| @@ -265,11 +265,10 @@ write-date, checksum, link-type, and link-name." | |||
| 265 | (setq name (concat (substring string tar-prefix-offset | 265 | (setq name (concat (substring string tar-prefix-offset |
| 266 | (1- (match-end 0))) | 266 | (1- (match-end 0))) |
| 267 | "/" name))) | 267 | "/" name))) |
| 268 | (if (default-value 'enable-multibyte-characters) | 268 | (setq name |
| 269 | (setq name | 269 | (decode-coding-string name coding) |
| 270 | (decode-coding-string name coding) | 270 | linkname |
| 271 | linkname | 271 | (decode-coding-string linkname coding)) |
| 272 | (decode-coding-string linkname coding))) | ||
| 273 | (if (and (null link-p) (string-match "/\\'" name)) | 272 | (if (and (null link-p) (string-match "/\\'" name)) |
| 274 | (setq link-p 5)) ; directory | 273 | (setq link-p 5)) ; directory |
| 275 | 274 | ||
| @@ -907,8 +906,7 @@ tar-file's buffer." | |||
| 907 | (if (or (not coding) | 906 | (if (or (not coding) |
| 908 | (eq (coding-system-type coding) 'undecided)) | 907 | (eq (coding-system-type coding) 'undecided)) |
| 909 | (setq coding (detect-coding-region start end t))) | 908 | (setq coding (detect-coding-region start end t))) |
| 910 | (if (and (default-value 'enable-multibyte-characters) | 909 | (if (coding-system-get coding :for-unibyte) |
| 911 | (coding-system-get coding :for-unibyte)) | ||
| 912 | (with-current-buffer buffer | 910 | (with-current-buffer buffer |
| 913 | (set-buffer-multibyte nil))) | 911 | (set-buffer-multibyte nil))) |
| 914 | (widen) | 912 | (widen) |
diff --git a/lisp/term/internal.el b/lisp/term/internal.el index 2cf560694c6..0cdf0c1a7c3 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el | |||
| @@ -595,8 +595,7 @@ list. You can (and should) also run it if and when the value of | |||
| 595 | (set-selection-coding-system coding-dos) | 595 | (set-selection-coding-system coding-dos) |
| 596 | (IT-setup-unicode-display coding-unix) | 596 | (IT-setup-unicode-display coding-unix) |
| 597 | (prefer-coding-system coding-dos) | 597 | (prefer-coding-system coding-dos) |
| 598 | (and (default-value 'enable-multibyte-characters) | 598 | (setq unibyte-display-via-language-environment t) |
| 599 | (setq unibyte-display-via-language-environment t)) | ||
| 600 | ;; Some codepages have sporadic support for Latin-1, Greek, and | 599 | ;; Some codepages have sporadic support for Latin-1, Greek, and |
| 601 | ;; symbol glyphs, which don't belong to their native character | 600 | ;; symbol glyphs, which don't belong to their native character |
| 602 | ;; set. It's a nuisance to have all those glyphs here, for all | 601 | ;; set. It's a nuisance to have all those glyphs here, for all |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 9288a77ba3e..512dfcfa6a7 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1818,11 +1818,9 @@ Only works for Aspell and Enchant." | |||
| 1818 | (setq default-directory defdir) | 1818 | (setq default-directory defdir) |
| 1819 | (insert string) | 1819 | (insert string) |
| 1820 | (if (not (memq cmd cmds-to-defer)) | 1820 | (if (not (memq cmd cmds-to-defer)) |
| 1821 | (let (coding-system-for-read coding-system-for-write status) | 1821 | (let* ((coding-system-for-read (ispell-get-coding-system)) |
| 1822 | (if (and (boundp 'enable-multibyte-characters) | 1822 | (coding-system-for-write coding-system-for-read) |
| 1823 | enable-multibyte-characters) | 1823 | status) |
| 1824 | (setq coding-system-for-read (ispell-get-coding-system) | ||
| 1825 | coding-system-for-write (ispell-get-coding-system))) | ||
| 1826 | (set-buffer output-buf) | 1824 | (set-buffer output-buf) |
| 1827 | (erase-buffer) | 1825 | (erase-buffer) |
| 1828 | (set-buffer session-buf) | 1826 | (set-buffer session-buf) |
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 18f987e26bd..b400c8d4a6f 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -126,22 +126,16 @@ You should set this to t when using a non-system shell.\n\n")))) | |||
| 126 | ;; (and some programs ported from Unix require it) but most will | 126 | ;; (and some programs ported from Unix require it) but most will |
| 127 | ;; produce DOS line endings on output. | 127 | ;; produce DOS line endings on output. |
| 128 | (setq default-process-coding-system | 128 | (setq default-process-coding-system |
| 129 | (if (default-value 'enable-multibyte-characters) | 129 | '(undecided-dos . undecided-unix)) |
| 130 | '(undecided-dos . undecided-unix) | ||
| 131 | '(raw-text-dos . raw-text-unix))) | ||
| 132 | ;; Make cmdproxy default to using DOS line endings for input, | 130 | ;; Make cmdproxy default to using DOS line endings for input, |
| 133 | ;; because some Windows programs (including command.com) require it. | 131 | ;; because some Windows programs (including command.com) require it. |
| 134 | (add-to-list 'process-coding-system-alist | 132 | (add-to-list 'process-coding-system-alist |
| 135 | `("[cC][mM][dD][pP][rR][oO][xX][yY]" | 133 | '("[cC][mM][dD][pP][rR][oO][xX][yY]" |
| 136 | . ,(if (default-value 'enable-multibyte-characters) | 134 | . (undecided-dos . undecided-dos))) |
| 137 | '(undecided-dos . undecided-dos) | ||
| 138 | '(raw-text-dos . raw-text-dos)))) | ||
| 139 | ;; plink needs DOS input when entering the password. | 135 | ;; plink needs DOS input when entering the password. |
| 140 | (add-to-list 'process-coding-system-alist | 136 | (add-to-list 'process-coding-system-alist |
| 141 | `("[pP][lL][iI][nN][kK]" | 137 | '("[pP][lL][iI][nN][kK]" |
| 142 | . ,(if (default-value 'enable-multibyte-characters) | 138 | . (undecided-dos . undecided-dos)))) |
| 143 | '(undecided-dos . undecided-dos) | ||
| 144 | '(raw-text-dos . raw-text-dos))))) | ||
| 145 | (define-obsolete-function-alias 'set-default-process-coding-system | 139 | (define-obsolete-function-alias 'set-default-process-coding-system |
| 146 | #'w32-set-default-process-coding-system "26.1") | 140 | #'w32-set-default-process-coding-system "26.1") |
| 147 | (add-hook 'before-init-hook #'w32-set-default-process-coding-system) | 141 | (add-hook 'before-init-hook #'w32-set-default-process-coding-system) |
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index fe2202cfc68..5f8578444a0 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el | |||
| @@ -264,9 +264,8 @@ STRING is the uri-list as a string. The URIs are separated by \\r\\n." | |||
| 264 | WINDOW is the window where the drop happened. | 264 | WINDOW is the window where the drop happened. |
| 265 | STRING is the file names as a string, separated by nulls." | 265 | STRING is the file names as a string, separated by nulls." |
| 266 | (let ((uri-list (split-string string "[\0\r\n]" t)) | 266 | (let ((uri-list (split-string string "[\0\r\n]" t)) |
| 267 | (coding (and (default-value 'enable-multibyte-characters) | 267 | (coding (or file-name-coding-system |
| 268 | (or file-name-coding-system | 268 | default-file-name-coding-system)) |
| 269 | default-file-name-coding-system))) | ||
| 270 | retval) | 269 | retval) |
| 271 | (dolist (bf uri-list) | 270 | (dolist (bf uri-list) |
| 272 | ;; If one URL is handled, treat as if the whole drop succeeded. | 271 | ;; If one URL is handled, treat as if the whole drop succeeded. |
diff --git a/src/process.c b/src/process.c index e6465e2347e..daa0dc68ae6 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1248,10 +1248,7 @@ passed to the filter. | |||
| 1248 | The filter gets two arguments: the process and the string of output. | 1248 | The filter gets two arguments: the process and the string of output. |
| 1249 | The string argument is normally a multibyte string, except: | 1249 | The string argument is normally a multibyte string, except: |
| 1250 | - if the process's input coding system is no-conversion or raw-text, | 1250 | - if the process's input coding system is no-conversion or raw-text, |
| 1251 | it is a unibyte string (the non-converted input), or else | 1251 | it is a unibyte string (the non-converted input). */) |
| 1252 | - if `default-enable-multibyte-characters' is nil, it is a unibyte | ||
| 1253 | string (the result of converting the decoded input multibyte | ||
| 1254 | string to unibyte with `string-make-unibyte'). */) | ||
| 1255 | (Lisp_Object process, Lisp_Object filter) | 1252 | (Lisp_Object process, Lisp_Object filter) |
| 1256 | { | 1253 | { |
| 1257 | CHECK_PROCESS (process); | 1254 | CHECK_PROCESS (process); |
| @@ -3761,8 +3758,7 @@ The stopped state is cleared by `continue-process' and set by | |||
| 3761 | 3758 | ||
| 3762 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the | 3759 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the |
| 3763 | process filter are multibyte, otherwise they are unibyte. | 3760 | process filter are multibyte, otherwise they are unibyte. |
| 3764 | If this keyword is not specified, the strings are multibyte if | 3761 | If this keyword is not specified, the strings are multibyte. |
| 3765 | the default value of `enable-multibyte-characters' is non-nil. | ||
| 3766 | 3762 | ||
| 3767 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. | 3763 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. |
| 3768 | 3764 | ||