;;; ucs-tables.el --- translation to, from and via Unicode -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-;; Copyright (C) 2002, 2003
+;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
The ISO 8859 characters sets overlap, e.g. 8859-1 (Latin-1) and
8859-15 (Latin-9) differ only in a few characters. Emacs normally
distinguishes equivalent characters from those ISO-8859 character sets
-which are built in to Emacs. This behaviour is essentially inherited
+which are built in to Emacs. This behavior is essentially inherited
from the European-originated international standards. Treating them
equivalently, by translating to and from a single representation is
called `unification'. (The `utf-8' coding system treats the
;; normal-mode and minibuffer-setup-hook.
(defun ucs-set-table-for-input (&optional buffer)
"Set up an appropriate `translation-table-for-input' for BUFFER.
-BUFFER defaults to the current buffer.
-This function is automatically called directly at the end of `get-buffer-create'."
+BUFFER defaults to the current buffer. This function is
+automatically called directly at the end of `get-buffer-create'."
(when (and unify-8859-on-encoding-mode
(not unify-8859-on-decoding-mode)
(char-table-p translation-table-for-input))
(if (and table (symbolp table))
(setq table (get table 'translation-table)))
(unless (char-table-p table)
- (setq table (coding-system-get cs 'translation-table-for-input)))
+ (setq table (coding-system-get cs 'translation-table-for-input))
+ (if (and table (symbolp table))
+ (setq table (get table 'translation-table))))
(when (char-table-p table)
(if buffer
(with-current-buffer buffer
- (set (make-variable-buffer-local 'translation-table-for-input)
+ (set (make-local-variable 'translation-table-for-input)
table))
- (set (make-variable-buffer-local 'translation-table-for-input)
+ (set (make-local-variable 'translation-table-for-input)
table)))))))
;; The minibuffer needs to acquire a `buffer-file-coding-system' for