Commit 597e2240 authored by Glenn Morris's avatar Glenn Morris
Browse files

Use default-value rather than default-enable-multibyte-characters.

parent 99b195c8
2009-09-03 Glenn Morris <rgm@gnu.org>
* arc-mode.el (archive-mode):
* dos-fns.el (set-default-process-coding-system):
* man.el (Man-getpage-in-background):
* menu-bar.el (menu-bar-describe-menu):
* server.el (server-process-filter):
* startup.el (command-line):
* tar-mode.el (tar-header-block-tokenize, tar-extract):
* w32-fns.el (set-default-process-coding-system):
* x-dnd.el (x-dnd-handle-file-name):
* international/mule-cmds.el (mule-menu-keymap)
(set-default-coding-systems, language-info-alist, set-language-info)
(set-language-environment, standard-display-european-internal)
(set-locale-environment):
* international/mule-diag.el (mule-diag):
* mail/emacsbug.el (report-emacs-bug):
* mail/rmail.el (rmail-mode):
* mail/sendmail.el (mail-setup):
Use default-value rather than default-enable-multibyte-characters.
* progmodes/f90.el: Move all safe properties into the defcustoms.
(f90-get-correct-indent, f90-indent-region, f90-abbrev-start): Use memq.
......
;;; arc-mode.el --- simple editing of archives
;; Copyright (C) 1995, 1997, 1998, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Morten Welinder <terra@gnu.org>
;; Keywords: archives msdog editing major-mode
......@@ -698,7 +698,7 @@ archive.
(or file-name-coding-system
default-file-name-coding-system
locale-coding-system))
(if default-enable-multibyte-characters
(if (default-value 'enable-multibyte-characters)
(set-buffer-multibyte 'to))
(archive-summarize nil)
(setq buffer-read-only t))))
......
;;; dos-fns.el --- MS-Dos specific functions
;; Copyright (C) 1991, 1993, 1995, 1996, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1991, 1993, 1995, 1996, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Maintainer: Morten Welinder <terra@diku.dk>
;; Keywords: internal
......@@ -211,7 +211,7 @@ returned unaltered."
;; Override settings chosen at startup.
(defun set-default-process-coding-system ()
(setq default-process-coding-system
(if default-enable-multibyte-characters
(if (default-value 'enable-multibyte-characters)
'(undecided-dos . undecided-dos)
'(raw-text-dos . raw-text-dos))))
......
......@@ -127,8 +127,8 @@
(define-key-after map [separator-input-method] '("--"))
(define-key-after map [set-various-coding-system]
(list 'menu-item "Set Coding Systems" set-coding-system-map
:enable 'default-enable-multibyte-characters))
`(menu-item "Set Coding Systems" ,set-coding-system-map
:enable (default-value 'enable-multibyte-characters)))
(define-key-after map [view-hello-file]
'(menu-item "Show Multi-lingual Text" view-hello-file
:enable (file-readable-p
......@@ -358,7 +358,7 @@ This also sets the following values:
(if (eq system-type 'darwin)
;; The file-name coding system on Darwin systems is always utf-8.
(setq default-file-name-coding-system 'utf-8)
(if (and default-enable-multibyte-characters
(if (and (default-value 'enable-multibyte-characters)
(or (not coding-system)
(coding-system-get coding-system 'ascii-compatible-p)))
(setq default-file-name-coding-system coding-system)))
......@@ -1097,7 +1097,7 @@ Meaningful values for KEY include
`ctext-non-standard-encodings' for more detail.
The following keys take effect only when multibyte characters are
globally disabled, i.e. the value of `default-enable-multibyte-characters'
globally disabled, i.e. the default value of `enable-multibyte-characters'
is nil.
unibyte-display value is a coding system to encode characters for
......@@ -1138,7 +1138,7 @@ see `language-info-alist'."
(set-language-environment-nonascii-translation lang-env))
((eq key 'charset)
(set-language-environment-charset lang-env))
((and (not default-enable-multibyte-characters)
((and (not (default-value 'enable-multibyte-characters))
(or (eq key 'unibyte-syntax) (eq key 'unibyte-display)))
(set-language-environment-unibyte lang-env)))))
......@@ -1849,7 +1849,7 @@ specifies the character set for the major languages of Western Europe."
(set-language-environment-nonascii-translation language-name)
(set-language-environment-charset language-name)
;; Unibyte setups if necessary.
(unless default-enable-multibyte-characters
(unless (default-value 'enable-multibyte-characters)
(set-language-environment-unibyte language-name))
(let ((func (get-language-info language-name 'setup-function)))
......@@ -1934,7 +1934,8 @@ See `set-language-info-alist' for use in programs."
;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with
;; the native font, and codes 160 and 146 stand for something very
;; different there.
(or (and (eq window-system 'pc) (not default-enable-multibyte-characters))
(or (and (eq window-system 'pc) (not (default-value
'enable-multibyte-characters)))
(progn
;; Most X fonts used to do the wrong thing for latin-1 code 160.
(unless (and (eq window-system 'x)
......@@ -2602,10 +2603,10 @@ See also `locale-charset-language-names', `locale-language-names',
(unless frame
(set-language-environment language-name))
;; If default-enable-multibyte-characters is nil,
;; If the default enable-multibyte-characters is nil,
;; we are using single-byte characters,
;; so the display table and terminal coding system are irrelevant.
(when default-enable-multibyte-characters
(when (default-value 'enable-multibyte-characters)
(set-display-table-and-terminal-coding-system
language-name coding-system frame))
......
......@@ -1088,7 +1088,8 @@ system which uses fontsets)."
(insert "Version of this emacs:\n " (emacs-version) "\n\n")
(insert "Configuration options:\n " system-configuration-options "\n\n")
(insert "Multibyte characters awareness:\n"
(format " default: %S\n" default-enable-multibyte-characters)
(format " default: %S\n" (default-value
'enable-multibyte-characters))
(format " current-buffer: %S\n\n" enable-multibyte-characters))
(insert "Current language environment: " current-language-environment
"\n\n")
......
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003,
;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
......@@ -166,8 +166,8 @@ usually do not have translators to read other languages for them.\n\n")
'("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
"LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
(insert (format " locale-coding-system: %s\n" locale-coding-system))
(insert (format " default-enable-multibyte-characters: %s\n"
default-enable-multibyte-characters))
(insert (format " default enable-multibyte-characters: %s\n"
(default-value 'enable-multibyte-characters)))
(insert "\n")
(insert (format "Major mode: %s\n"
(format-mode-line
......
......@@ -1234,7 +1234,7 @@ Instead, these commands are available:
(rmail-mode-2)
(when (and finding-rmail-file
(null coding-system-for-read)
default-enable-multibyte-characters)
(default-value 'enable-multibyte-characters))
(let ((rmail-enable-multibyte t))
(rmail-require-mime-maybe)
(rmail-convert-file-maybe)
......
......@@ -552,7 +552,7 @@ actually occur.")
(kill-local-variable 'buffer-file-coding-system)
;; This doesn't work for enable-multibyte-characters.
;; (kill-local-variable 'enable-multibyte-characters)
(set-buffer-multibyte default-enable-multibyte-characters)
(set-buffer-multibyte (default-value 'enable-multibyte-characters))
(if current-input-method
(inactivate-input-method))
(setq mail-send-actions actions)
......
;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*-
;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2002, 2003,
;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Barry A. Warsaw <bwarsaw@cen.com>
;; Maintainer: FSF
......@@ -811,7 +811,7 @@ all sections related to a subject, put something appropriate into the
;; We must decode the output by a coding system that the
;; system's locale suggests in multibyte mode.
(coding-system-for-read
(if default-enable-multibyte-characters
(if (default-value 'enable-multibyte-characters)
locale-coding-system 'raw-text-unix))
;; Avoid possible error by using a directory that always exists.
(default-directory
......
......@@ -982,7 +982,7 @@ mail status in mode line"))
(list 'menu-item "Mule (Multilingual Environment)" mule-menu-keymap
;; Most of the MULE menu actually does make sense in unibyte mode,
;; e.g. language selection.
;;; ':visible 'default-enable-multibyte-characters
;;; :visible '(default-value 'enable-multibyte-characters)
))
;(setq menu-bar-final-items (cons 'mule menu-bar-final-items))
;(define-key menu-bar-options-menu [preferences]
......@@ -1354,18 +1354,18 @@ mail status in mode line"))
(define-key menu-bar-describe-menu [mule-diag]
'(menu-item "Show All of Mule Status" mule-diag
:visible default-enable-multibyte-characters
:visible (default-value 'enable-multibyte-characters)
:help "Display multilingual environment settings"))
(define-key menu-bar-describe-menu [describe-coding-system-briefly]
'(menu-item "Describe Coding System (Briefly)"
describe-current-coding-system-briefly
:visible default-enable-multibyte-characters))
:visible (default-value 'enable-multibyte-characters)))
(define-key menu-bar-describe-menu [describe-coding-system]
'(menu-item "Describe Coding System..." describe-coding-system
:visible default-enable-multibyte-characters))
:visible (default-value 'enable-multibyte-characters)))
(define-key menu-bar-describe-menu [describe-input-method]
'(menu-item "Describe Input Method..." describe-input-method
:visible default-enable-multibyte-characters
:visible (default-value 'enable-multibyte-characters)
:help "Keyboard layout for specific input method"))
(define-key menu-bar-describe-menu [describe-language-environment]
(list 'menu-item "Describe Language Environment"
......
......@@ -869,7 +869,7 @@ The following commands are accepted by the client:
;; supported any more.
(assert (eq (match-end 0) (length string)))
(let ((request (substring string 0 (match-beginning 0)))
(coding-system (and default-enable-multibyte-characters
(coding-system (and (default-value 'enable-multibyte-characters)
(or file-name-coding-system
default-file-name-coding-system)))
nowait ; t if emacsclient does not want to wait for us.
......
......@@ -1015,7 +1015,7 @@ opening the first frame (e.g. open a connection to an X server).")
debug-on-error-should-be-set
(debug-on-error-initial
(if (eq init-file-debug t) 'startup init-file-debug))
(orig-enable-multibyte default-enable-multibyte-characters))
(orig-enable-multibyte (default-value 'enable-multibyte-characters)))
(let ((debug-on-error debug-on-error-initial)
;; This function actually reads the init files.
(inner
......@@ -1125,8 +1125,9 @@ the `--debug-init' option to view a complete error backtrace."
debug-on-error-from-init-file debug-on-error)))
(if debug-on-error-should-be-set
(setq debug-on-error debug-on-error-from-init-file))
(unless (or default-enable-multibyte-characters
(eq orig-enable-multibyte default-enable-multibyte-characters))
(unless (or (default-value 'enable-multibyte-characters)
(eq orig-enable-multibyte (default-value
'enable-multibyte-characters)))
;; Init file changed to unibyte. Reset existing multibyte
;; buffers (probably *scratch*, *Messages*, *Minibuff-0*).
;; Arguably this should only be done if they're free of
......@@ -1192,7 +1193,7 @@ the `--debug-init' option to view a complete error backtrace."
(run-hooks 'after-init-hook)
;; Decode all default-directory.
(if (and default-enable-multibyte-characters locale-coding-system)
(if (and (default-value 'enable-multibyte-characters) locale-coding-system)
(save-excursion
(dolist (elt (buffer-list))
(set-buffer elt)
......
;;; tar-mode.el --- simple editing of tar files from GNU emacs
;; Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Maintainer: FSF
......@@ -267,7 +268,7 @@ write-date, checksum, link-type, and link-name."
(setq name (concat (substring string tar-prefix-offset
(1- (match-end 0)))
"/" name)))
(if default-enable-multibyte-characters
(if (default-value 'enable-multibyte-characters)
(setq name
(decode-coding-string name coding)
linkname
......@@ -819,7 +820,7 @@ appear on disk when you save the tar-file's buffer."
(if (or (not coding)
(eq (coding-system-type coding) 'undecided))
(setq coding (detect-coding-region start end t)))
(if (and default-enable-multibyte-characters
(if (and (default-value 'enable-multibyte-characters)
(coding-system-get coding :for-unibyte))
(with-current-buffer buffer
(set-buffer-multibyte nil)))
......
;;; w32-fns.el --- Lisp routines for Windows NT
;; Copyright (C) 1994, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
;; 2009 Free Software Foundation, Inc.
;; Author: Geoff Voelker <voelker@cs.washington.edu>
;; Keywords: internal
......@@ -176,20 +176,20 @@ You should set this to t when using a non-system shell.\n\n"))))
;; (and some programs ported from Unix require it) but most will
;; produce DOS line endings on output.
(setq default-process-coding-system
(if default-enable-multibyte-characters
(if (default-value 'enable-multibyte-characters)
'(undecided-dos . undecided-unix)
'(raw-text-dos . raw-text-unix)))
;; Make cmdproxy default to using DOS line endings for input,
;; because some Windows programs (including command.com) require it.
(add-to-list 'process-coding-system-alist
`("[cC][mM][dD][pP][rR][oO][xX][yY]"
. ,(if default-enable-multibyte-characters
. ,(if (default-value 'enable-multibyte-characters)
'(undecided-dos . undecided-dos)
'(raw-text-dos . raw-text-dos))))
;; plink needs DOS input when entering the password.
(add-to-list 'process-coding-system-alist
`("[pP][lL][iI][nN][kK]"
. ,(if default-enable-multibyte-characters
. ,(if (default-value 'enable-multibyte-characters)
'(undecided-dos . undecided-dos)
'(raw-text-dos . raw-text-dos)))))
......
;;; x-dnd.el --- drag and drop support for X.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation, Inc.
;; Author: Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
;; Maintainer: FSF
......@@ -263,7 +264,7 @@ STRING is the uri-list as a string. The URIs are separated by \\r\\n."
WINDOW is the window where the drop happened.
STRING is the file names as a string, separated by nulls."
(let ((uri-list (split-string string "[\0\r\n]" t))
(coding (and default-enable-multibyte-characters
(coding (and (default-value 'enable-multibyte-characters)
(or file-name-coding-system
default-file-name-coding-system)))
retval)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment