]> code.delx.au - gnu-emacs/blobdiff - lisp/international/mule-cmds.el
Update copyright year to 2016
[gnu-emacs] / lisp / international / mule-cmds.el
index 248c89c40fc4234a06c05631c402ac7e0d167f82..79e9c7b4adcddb8d78748cfd227154aa476cf044 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mule-cmds.el --- commands for multilingual environment  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2016 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -35,8 +35,6 @@
 (defvar dos-codepage)
 (autoload 'widget-value "wid-edit")
 
-(defvar mac-system-coding-system)
-
 ;;; MULE related key bindings and menus.
 
 (defvar mule-keymap
 ;; very frequently while editing multilingual text.  Now we can use
 ;; only two such keys: "\C-\\" and "\C-^", but the latter is not
 ;; convenient because it requires shifting on most keyboards.  An
-;; alternative is "\C-\]" which is now bound to `abort-recursive-edit'
+;; alternative is "\C-]" which is now bound to `abort-recursive-edit'
 ;; but it won't be used that frequently.
 (define-key global-map "\C-\\" 'toggle-input-method)
 
@@ -397,7 +395,7 @@ A coding system that requires automatic detection of text+encoding
 
 To prefer, for instance, utf-8, say the following:
 
-  \(prefer-coding-system 'utf-8)"
+  (prefer-coding-system \\='utf-8)"
   (interactive "zPrefer coding system: ")
   (if (not (and coding-system (coding-system-p coding-system)))
       (error "Invalid coding system `%s'" coding-system))
@@ -719,14 +717,14 @@ DEFAULT is the coding system to use by default in the query."
              (insert "No default coding systems to try for "
                      (if (stringp from)
                          (format "string \"%s\"." from)
-                       (format "buffer `%s'." bufname)))
+                       (format-message "buffer `%s'." bufname)))
            (insert
             "These default coding systems were tried to encode"
             (if (stringp from)
                 (concat " \"" (if (> (length from) 10)
                                   (concat (substring from 0 10) "...\"")
                                 (concat from "\"")))
-              (format " text\nin the buffer `%s'" bufname))
+              (format-message " text\nin the buffer `%s'" bufname))
             ":\n")
            (let ((pos (point))
                  (fill-prefix "  "))
@@ -744,7 +742,8 @@ e.g., for sending an email message.\n ")
            (when unsafe
              (insert (if rejected "The other coding systems"
                        "However, each of them")
-                     " encountered characters it couldn't encode:\n")
+                     (substitute-command-keys
+                      " encountered characters it couldn't encode:\n"))
              (dolist (coding unsafe)
                (insert (format "  %s cannot encode these:" (car coding)))
                (let ((i 0)
@@ -875,13 +874,13 @@ and TO is ignored."
                  (setq auto-cs (car auto-cs))
                (display-warning
                 'mule
-                (format "\
+                (format-message "\
 Invalid coding system `%s' is specified
 for the current buffer/file by the %s.
 It is highly recommended to fix it before writing to a file."
                         (car auto-cs)
                         (if (eq (cdr auto-cs) :coding) ":coding tag"
-                          (format "variable `%s'" (cdr auto-cs))))
+                          (format-message "variable `%s'" (cdr auto-cs))))
                 :warning)
                (or (yes-or-no-p "Really proceed with writing? ")
                    (error "Save aborted"))
@@ -1271,7 +1270,7 @@ This file contains a list of libraries of Emacs input methods (LEIM)
 in the format of Lisp expression for registering each input method.
 Emacs loads this file at startup time.")
 
-(defconst leim-list-header (format
+(defconst leim-list-header (format-message
 ";;; %s -- list of LEIM (Library of Emacs Input Method) -*-coding: utf-8;-*-
 ;;
 ;; This file is automatically generated.
@@ -1587,8 +1586,8 @@ which marks the variable `default-input-method' as set for Custom buffers."
                          (called-interactively-p 'interactive))
         (with-output-to-temp-buffer (help-buffer)
           (let ((elt (assoc input-method input-method-alist)))
-            (princ (format
-                    "Input method: %s (‘%s’ in mode line) for %s\n  %s\n"
+            (princ (format-message
+                    "Input method: %s (`%s' in mode line) for %s\n  %s\n"
                     input-method (nth 3 elt) (nth 1 elt) (nth 4 elt))))))))))
 
 (defun describe-current-input-method ()
@@ -2173,9 +2172,9 @@ See `set-language-info-alist' for use in programs."
              (search-backward (symbol-name (car l)))
              (help-xref-button 0 'help-coding-system (car l))
              (goto-char (point-max))
-             (insert " (‘"
+             (insert (substitute-command-keys " (`")
                      (coding-system-mnemonic (car l))
-                     "’ in mode line):\n\t"
+                     (substitute-command-keys "' in mode line):\n\t")
                       (substitute-command-keys
                        (coding-system-doc-string (car l)))
                      "\n")
@@ -2412,12 +2411,12 @@ See `set-language-info-alist' for use in programs."
     ))
   "Alist of locale regexps vs the corresponding languages and coding systems.
 Each element has this form:
-  \(LOCALE-REGEXP LANG-ENV CODING-SYSTEM)
+  (LOCALE-REGEXP LANG-ENV CODING-SYSTEM)
 The first element whose LOCALE-REGEXP matches the start of a
 downcased locale specifies the LANG-ENV \(language environment)
 and CODING-SYSTEM corresponding to that locale.  If there is no
 appropriate language environment, the element may have this form:
-  \(LOCALE-REGEXP . LANG-ENV)
+  (LOCALE-REGEXP . LANG-ENV)
 In this case, LANG-ENV is one of generic language environments for an
 specific encoding such as \"Latin-1\" and \"UTF-8\".")
 
@@ -2731,14 +2730,6 @@ See also `locale-charset-language-names', `locale-language-names',
        (set-terminal-coding-system 'utf-8)
        (set-keyboard-coding-system 'utf-8)))
 
-    ;; If curved quotes don't work, display ASCII approximations.
-    (unless frame
-      (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
-        (when (not (char-displayable-p (car char-repl)))
-          (or standard-display-table
-              (setq standard-display-table (make-display-table)))
-          (aset standard-display-table (car char-repl) (cdr char-repl)))))
-
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (unless frame