1 ;;; footnote-cyrillic.el --- Cyrillic lettering for footnote mode
3 ;; Copyright (C) 1997 by Free Software Foundation, Inc.
5 ;; Author: Steven L Baur <steve@xemacs.org>
6 ;; Keywords: mule, news, mail
9 ;; This file is part of XEmacs.
11 ;; XEmacs is free software; you can redistribute it and/or modify it
12 ;; under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; XEmacs is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 ;;; Synched up with: Not in FSF
30 ;; This file provides support for Cyrillic lettering in footnote mode.
31 ;; It requires an Emacs or XEmacs with MULE internationalization.
35 ;; Apr-05-1997: Replicate letters when footnote numbers hit the end of
37 ;; Apr-18-1997: Added regexp to the footnote style alist.
43 (defconst footnote-cyrillic-lower "
\e-LÐÑæÔÕäÓåØÙÚÛÜÝÞßïàáâãÖÒìë×èíéçê"
\e-A
44 "Cyrillic lower case alphabet.")
46 (defconst footnote-cyrillic-lower-regexp
47 (concat "[" footnote-cyrillic-lower "]")
48 "Regexp for lower case cyrillic.")
50 (defconst footnote-cyrillic-upper "
\e-L°±Æ´µÄ³Å¸¹º»¼½¾¿ÏÀÁÂö²ÌË·ÈÍÉÇÊ"
\e-A
51 "Cyrillic upper case alphabet.")
53 (defconst footnote-cyrillic-upper-regexp
54 (concat "[" footnote-cyrillic-upper "]")
55 "Regexp for upper case cyrillic.")
57 (defun Footnote-cyrillic-lower (n)
58 "Return a Cyrillic lower case letter.
59 Wrapping around the alphabet implies successive repetitions of letters."
60 (let* ((ltr (mod (1- n) (length footnote-cyrillic-lower)))
61 (rep (/ (1- n) (length footnote-cyrillic-lower)))
62 (chr (char-to-string (aref footnote-cyrillic-lower ltr)))
65 (setq rc (concat rc chr))
69 (defun Footnote-cyrillic-upper (n)
70 "Return a Cyrillic upper case letter.
71 Wrapping around the alphabet implies successive repetitions of letters."
72 (let* ((ltr (mod (1- n) (length footnote-cyrillic-upper)))
73 (rep (/ (1- n) (length footnote-cyrillic-upper)))
74 (chr (char-to-string (aref footnote-cyrillic-upper ltr)))
77 (setq rc (concat rc chr))
81 (setq footnote-style-alist
82 (append (list `(cyrillic-lower
83 Footnote-cyrillic-lower
84 ,footnote-cyrillic-lower-regexp)) footnote-style-alist))
86 (setq footnote-style-alist
87 (append (list `(cyrillic-upper
88 Footnote-cyrillic-upper
89 ,footnote-cyrillic-upper-regexp)) footnote-style-alist))
91 (provide 'footnote-cyrillic)
93 ;;; footnote-cyrillic.el ends here