comparison lisp/international/ogonek.el @ 21646:ec243644b3fb

Customize. Add `;;; Code' line. ogonek-encoding-choices: new variable as helper for customizing.
author Stephen Eglen <stephen@gnu.org>
date Sat, 18 Apr 1998 16:38:50 +0000
parents 31e4a16368c9
children bb90823eec2c
comparison
equal deleted inserted replaced
21645:40670d13dd48 21646:ec243644b3fb
28 ;; To use this library load it using 28 ;; To use this library load it using
29 ;; M-x load-library [enter] ogonek 29 ;; M-x load-library [enter] ogonek
30 ;; Then, you may get a short info by calling one of 30 ;; Then, you may get a short info by calling one of
31 ;; M-x ogonek-jak -- in Polish 31 ;; M-x ogonek-jak -- in Polish
32 ;; M-x ogonek-how -- in English " 32 ;; M-x ogonek-how -- in English "
33
34 ;;; Code:
35
36 (defgroup ogonek nil
37 "Change the encoding of Polish diacritic characters."
38 :prefix "ogonek-"
39 :group 'i18n)
33 40
34 (defconst ogonek-name-encoding-alist 41 (defconst ogonek-name-encoding-alist
35 '(("ascii" . (?A ?C ?E ?L ?N ?O ?S ?Z ?Z 42 '(("ascii" . (?A ?C ?E ?L ?N ?O ?S ?Z ?Z
36 ?a ?c ?e ?l ?n ?o ?s ?z ?z)) 43 ?a ?c ?e ?l ?n ?o ?s ?z ?z))
37 ("iso8859-2" . (161 198 202 163 209 211 166 172 175 44 ("iso8859-2" . (161 198 202 163 209 211 166 172 175
258 (insert ogonek-information) 265 (insert ogonek-information)
259 (switch-to-buffer " *ogonek-how*") 266 (switch-to-buffer " *ogonek-how*")
260 (beginning-of-buffer)) 267 (beginning-of-buffer))
261 268
262 ;; ---- Variables keeping the suggested answers to dialogue questions ----- 269 ;; ---- Variables keeping the suggested answers to dialogue questions -----
263 270 (defvar ogonek-encoding-choices
264 (defvar ogonek-from-encoding "iso8859-2" 271 (cons 'choice
265 "*Encoding in the source file of recoding.") 272 (mapcar (lambda (x) (list 'const (car x)))
266 (defvar ogonek-to-encoding "ascii" 273 ogonek-name-encoding-alist))
267 "*Encoding in the target file of recoding.") 274 "List of ogonek encodings. Used only for customization.")
268 (defvar ogonek-prefix-char ?/ 275 (defcustom ogonek-from-encoding "iso8859-2"
269 "*Prefix character for prefix encodings.") 276 "*Encoding in the source file of recoding."
270 (defvar ogonek-prefix-from-encoding "iso8859-2" 277 :type ogonek-encoding-choices
271 "*Encoding in the source file subject to prefixifation.") 278 :group 'ogonek)
272 (defvar ogonek-prefix-to-encoding "iso8859-2" 279 (defcustom ogonek-to-encoding "ascii"
273 "*Encoding in the target file subject to deprefixifation.") 280 "*Encoding in the target file of recoding."
281 :type ogonek-encoding-choices
282 :group 'ogonek)
283 (defcustom ogonek-prefix-char ?/
284 "*Prefix character for prefix encodings."
285 :type 'character
286 :group 'ogonek)
287 (defcustom ogonek-prefix-from-encoding "iso8859-2"
288 "*Encoding in the source file subject to prefixifation."
289 :type ogonek-encoding-choices
290 :group 'ogonek)
291 (defcustom ogonek-prefix-to-encoding "iso8859-2"
292 "*Encoding in the target file subject to deprefixifation."
293 :type ogonek-encoding-choices
294 :group 'ogonek)
274 295
275 ;; ---- Auxiliary functions for reading parameters in interactive mode ---- 296 ;; ---- Auxiliary functions for reading parameters in interactive mode ----
276 297
277 (defun ogonek-read-encoding (prompt default-name-var) 298 (defun ogonek-read-encoding (prompt default-name-var)
278 "Read encoding name with completion based on `ogonek-name-encoding-alist'. 299 "Read encoding name with completion based on `ogonek-name-encoding-alist'.