view lisp/international/iso-ascii.el @ 22917:00f3497854c4

(quail-translation-keymap): Declare it as variable instead of constant. Bind all keys less than 32 to quail-other-command. Don't bind the key meta-prefix-char and escape. (quail-simple-translation-keymap): Likewise. (quail-conversion-keymap): Bind the key C-h to quail-translation-keymap. (quail-define-package): Fix typo in doc-string. (quail-conversion-str): New variable. (quail-input-method): Bind buffer-undo-list to t. Show Quail guidance buffer if necessary. (quail-delete-region): Move the definintion before the first calling place. (quail-start-translation): Handle the case the arg KEY is nil. Bind echo-keystrokes and help-char. Initialize quail-current-str to "". If input-method-use-echo-area is non-nil, call read-key-sequence with appropriate PROMPT arg. Setup last-command-event by local variable `keyseq'. Generate an event list form quail-current-str. If input-methodd-exit-on-first-char is non-nil, return only the first event. (quail-start-conversion): Likewise. Initialize quail-conversion-str to "". Generate an event list form quail-conversion-str. (quail-update-translation): Expect that the function given by (quail-update-translation-function) returns a new control-flag. Handle the case the length of quail-current-key is 1. Use string-as-unibyte if enable-multibyte-characters is nil. Always assures that quail-current-str is Lisp string. (quail-self-insert-command): Use `or' instead of `unless'. (quail-update-current-translations): Always assures that quail-current-str is Lisp string. (quail-next-translation-block): Update unread-command-events correctly. (quail-abort-translation): Set quail-current-str to nil. (quail-conversion-delete-char): Update quail-conversion-str. (quail-conversion-delete-tail): Likewise. (quail-conversion-backward-delete-char): Likewise. (quail-show-guidance-buf): Show Quail guidance buffer not in echo area if input-method-use-echo-area is non-nil. (quail-show-translations): Bind current-translations locally to quail-current-translations to get this value across different buffers. Handle the case that the length quail-current-key is 0. (quail-translation-help): If this command is invoked repeatedly, scroll the already shown help window. Handle the case that this command is called while converting (not translating). (quail-conversion-help): This function deleted and the functionality is merged to quail-translation-help.
author Kenichi Handa <handa@m17n.org>
date Thu, 06 Aug 1998 05:38:11 +0000
parents 40670d13dd48
children 1ff8dc8dbffc
line wrap: on
line source

;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals.

;; Copyright (C) 1987, 1995 Free Software Foundation, Inc.

;; Author: Howard Gayle
;; Maintainer: FSF
;; Keywords: i18n

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; 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.

;;; Commentary:

;; Written by Howard Gayle.  See display-table.el for details.

;; This code sets up to display ISO 8859/1 characters on plain
;; ASCII terminals.  The display strings for the characters are
;; more-or-less based on TeX.

;;; Code:

(require 'disp-table)

(defgroup iso-ascii nil
  "Set up char tables for ISO 8859/1 on ASCII terminals."
  :prefix "iso-ascii-"
  :group 'i18n)

(defcustom iso-ascii-convenient nil
  "*Non-nil means `iso-ascii' should aim for convenience, not precision."
  :type 'boolean
  :group 'iso-ascii)

(defun iso-ascii-display (code string &optional convenient-string)
  (if iso-ascii-convenient
      (setq string (or convenient-string string))
    (setq string (concat "{" string "}")))
  (standard-display-ascii code string))

(iso-ascii-display 160 "_" " ")   ; NBSP (no-break space)
(iso-ascii-display 161 "!")   ; inverted exclamation mark
(iso-ascii-display 162 "c")   ; cent sign
(iso-ascii-display 163 "GBP") ; pound sign
(iso-ascii-display 164 "$")   ; general currency sign
(iso-ascii-display 165 "JPY") ; yen sign
(iso-ascii-display 166 "|")   ; broken vertical line
(iso-ascii-display 167 "S" "(S)")   ; section sign
(iso-ascii-display 168 "\"")  ; diaeresis
(iso-ascii-display 169 "C" "(C)")   ; copyright sign
(iso-ascii-display 170 "_a")  ; ordinal indicator, feminine
(iso-ascii-display 171 "<<")  ; left angle quotation mark
(iso-ascii-display 172 "~")   ; not sign
(iso-ascii-display 173 "-")   ; soft hyphen
(iso-ascii-display 174 "R" "(R)")   ; registered sign
(iso-ascii-display 175 "=")   ; macron
(iso-ascii-display 176 "o")   ; degree sign
(iso-ascii-display 177 "+-")  ; plus or minus sign
(iso-ascii-display 178 "2")   ; superscript two
(iso-ascii-display 179 "3")   ; superscript three
(iso-ascii-display 180 "'")   ; acute accent
(iso-ascii-display 181 "u")   ; micro sign
(iso-ascii-display 182 "P" "{P}")   ; pilcrow
(iso-ascii-display 183 ".")   ; middle dot
(iso-ascii-display 184 ",")   ; cedilla
(iso-ascii-display 185 "1")   ; superscript one
(iso-ascii-display 186 "_o")  ; ordinal indicator, masculine
(iso-ascii-display 187 ">>")  ; right angle quotation mark
(iso-ascii-display 188 "1/4") ; fraction one-quarter
(iso-ascii-display 189 "1/2") ; fraction one-half
(iso-ascii-display 190 "3/4") ; fraction three-quarters
(iso-ascii-display 191 "?")   ; inverted question mark
(iso-ascii-display 192 "`A")  ; A with grave accent
(iso-ascii-display 193 "'A")  ; A with acute accent
(iso-ascii-display 194 "^A")  ; A with circumflex accent
(iso-ascii-display 195 "~A")  ; A with tilde
(iso-ascii-display 196 "\"A") ; A with diaeresis or umlaut mark
(iso-ascii-display 197 "AA")  ; A with ring
(iso-ascii-display 198 "AE")  ; AE diphthong
(iso-ascii-display 199 ",C")  ; C with cedilla
(iso-ascii-display 200 "`E")  ; E with grave accent
(iso-ascii-display 201 "'E")  ; E with acute accent
(iso-ascii-display 202 "^E")  ; E with circumflex accent
(iso-ascii-display 203 "\"E") ; E with diaeresis or umlaut mark
(iso-ascii-display 204 "`I")  ; I with grave accent
(iso-ascii-display 205 "'I")  ; I with acute accent
(iso-ascii-display 206 "^I")  ; I with circumflex accent
(iso-ascii-display 207 "\"I") ; I with diaeresis or umlaut mark
(iso-ascii-display 208 "-D")  ; D with stroke, Icelandic eth
(iso-ascii-display 209 "~N")  ; N with tilde
(iso-ascii-display 210 "`O")  ; O with grave accent
(iso-ascii-display 211 "'O")  ; O with acute accent
(iso-ascii-display 212 "^O")  ; O with circumflex accent
(iso-ascii-display 213 "~O")  ; O with tilde
(iso-ascii-display 214 "\"O") ; O with diaeresis or umlaut mark
(iso-ascii-display 215 "x")   ; multiplication sign
(iso-ascii-display 216 "/O")  ; O with slash
(iso-ascii-display 217 "`U")  ; U with grave accent
(iso-ascii-display 218 "'U")  ; U with acute accent
(iso-ascii-display 219 "^U")  ; U with circumflex accent
(iso-ascii-display 220 "\"U") ; U with diaeresis or umlaut mark
(iso-ascii-display 221 "'Y")  ; Y with acute accent
(iso-ascii-display 222 "TH")  ; capital thorn, Icelandic
(iso-ascii-display 223 "ss")  ; small sharp s, German
(iso-ascii-display 224 "`a")  ; a with grave accent
(iso-ascii-display 225 "'a")  ; a with acute accent
(iso-ascii-display 226 "^a")  ; a with circumflex accent
(iso-ascii-display 227 "~a")  ; a with tilde
(iso-ascii-display 228 "\"a") ; a with diaeresis or umlaut mark
(iso-ascii-display 229 "aa")  ; a with ring
(iso-ascii-display 230 "ae")  ; ae diphthong
(iso-ascii-display 231 ",c")  ; c with cedilla
(iso-ascii-display 232 "`e")  ; e with grave accent
(iso-ascii-display 233 "'e")  ; e with acute accent
(iso-ascii-display 234 "^e")  ; e with circumflex accent
(iso-ascii-display 235 "\"e") ; e with diaeresis or umlaut mark
(iso-ascii-display 236 "`i")  ; i with grave accent
(iso-ascii-display 237 "'i")  ; i with acute accent
(iso-ascii-display 238 "^i")  ; i with circumflex accent
(iso-ascii-display 239 "\"i") ; i with diaeresis or umlaut mark
(iso-ascii-display 240 "-d")  ; d with stroke, Icelandic eth
(iso-ascii-display 241 "~n")  ; n with tilde
(iso-ascii-display 242 "`o")  ; o with grave accent
(iso-ascii-display 243 "'o")  ; o with acute accent
(iso-ascii-display 244 "^o")  ; o with circumflex accent
(iso-ascii-display 245 "~o")  ; o with tilde
(iso-ascii-display 246 "\"o") ; o with diaeresis or umlaut mark
(iso-ascii-display 247 "/")   ; division sign
(iso-ascii-display 248 "/o")  ; o with slash
(iso-ascii-display 249 "`u")  ; u with grave accent
(iso-ascii-display 250 "'u")  ; u with acute accent
(iso-ascii-display 251 "^u")  ; u with circumflex accent
(iso-ascii-display 252 "\"u") ; u with diaeresis or umlaut mark
(iso-ascii-display 253 "'y")  ; y with acute accent
(iso-ascii-display 254 "th")  ; small thorn, Icelandic
(iso-ascii-display 255 "\"y") ; small y with diaeresis or umlaut mark

(provide 'iso-ascii)

;;; iso-ascii.el ends here