;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*-
-;; Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005, 2006, 2007
-;; Free Software Foundation, Inc.
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Copyright (C) 1997-1998, 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 2005, 2006
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; 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.
+;; the Free Software Foundation, either version 3 of the License, 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
;; 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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
(require 'robin)
-(defvar rmail-current-message)
-(defvar rmail-message-vector)
-
;; Information for exiting Ethiopic environment.
(defvar exit-ethiopic-environment-data nil)
([f4] . ethio-sera-to-fidel-buffer)
([S-f4] . ethio-sera-to-fidel-region)
([C-f4] . ethio-sera-to-fidel-marker)
- ([S-f5] . ethio-toggle-punctuation)
+ ;; ([S-f5] . ethio-toggle-punctuation)
([S-f6] . ethio-modify-vowel)
([S-f7] . ethio-replace-space)
;; ([S-f8] . ethio-input-special-character) ; deprecated
;;
(defvar ethio-primary-language 'tigrigna
- "*Symbol that defines the primary language in SERA --> FIDEL conversion.
+ "Symbol that defines the primary language in SERA --> FIDEL conversion.
The value should be one of: `tigrigna', `amharic' or `english'.")
(defvar ethio-secondary-language 'english
- "*Symbol that defines the secondary language in SERA --> FIDEL conversion.
+ "Symbol that defines the secondary language in SERA --> FIDEL conversion.
The value should be one of: `tigrigna', `amharic' or `english'.")
(defvar ethio-use-colon-for-colon nil
- "*Non-nil means associate ASCII colon with Ethiopic colon.
+ "Non-nil means associate ASCII colon with Ethiopic colon.
If nil, associate ASCII colon with Ethiopic word separator, i.e., two
vertically stacked dots. All SERA <--> FIDEL converters refer this
variable.")
(defvar ethio-use-three-dot-question nil
- "*Non-nil means associate ASCII question mark with Ethiopic old style question mark (three vertically stacked dots).
+ "Non-nil means associate ASCII question mark with Ethiopic old style question mark (three vertically stacked dots).
If nil, associate ASCII question mark with Ethiopic stylized question
mark. All SERA <--> FIDEL converters refer this variable.")
(defvar ethio-quote-vowel-always nil
- "*Non-nil means always put an apostrophe before an isolated vowel (except at word initial) in FIDEL --> SERA conversion.
+ "Non-nil means always put an apostrophe before an isolated vowel (except at word initial) in FIDEL --> SERA conversion.
If nil, put an apostrophe only between a 6th-form consonant and an
isolated vowel.")
(defvar ethio-W-sixth-always nil
- "*Non-nil means convert the Wu-form of a 12-form consonant to \"W'\" instead of \"Wu\" in FIDEL --> SERA conversion.")
+ "Non-nil means convert the Wu-form of a 12-form consonant to \"W'\" instead of \"Wu\" in FIDEL --> SERA conversion.")
(defvar ethio-numeric-reduction 0
- "*Degree of reduction in converting Ethiopic digits into Arabic digits.
+ "Degree of reduction in converting Ethiopic digits into Arabic digits.
Should be 0, 1 or 2.
For example, ({10}{9}{100}{80}{7}) is converted into:
- `10`9`100`80`7 if `ethio-numeric-reduction' is 0,
- `109100807 if `ethio-numeric-reduction' is 1,
- `10900807 if `ethio-numeric-reduction' is 2.")
+ \\=`10\\=`9\\=`100\\=`80\\=`7 if `ethio-numeric-reduction' is 0,
+ \\=`109100807 if `ethio-numeric-reduction' is 1,
+ \\=`10900807 if `ethio-numeric-reduction' is 2.")
(defvar ethio-java-save-lowercase nil
- "*Non-nil means save Ethiopic characters in lowercase hex numbers to Java files.
+ "Non-nil means save Ethiopic characters in lowercase hex numbers to Java files.
If nil, use uppercases.")
(defun ethio-prefer-amharic-p ()
(narrow-to-region p (point))
(robin-invert-region (point-min) (point-max) "ethiopic-sera")
- ;; ethio-quote-vowel-alwyas
+ ;; ethio-quote-vowel-always
(goto-char (point-min))
(while (re-search-forward "'[eauio]" nil t)
(save-excursion
(forward-char 1)
(insert "}")))
- ;; Special Ethiopic punctuations.
+ ;; Special Ethiopic punctuation.
(goto-char (point-min))
(while (re-search-forward "\\ce[»\\.\\?]\\|«\\ce" nil t)
(cond
(goto-char (point-min))
(while (re-search-forward "[ሀ-፼]" nil t)
(setq ucode (preceding-char))
- (delete-backward-char 1)
+ (delete-char -1)
(insert
(format (if ethio-java-save-lowercase "\\u%4x" "\\u%4X")
ucode)))))
;;;###autoload
(defun ethio-find-file nil
- "Transliterate file content into Ethiopic dependig on filename suffix."
+ "Transliterate file content into Ethiopic depending on filename suffix."
(cond
((string-match "\\.sera$" (buffer-file-name))
;;
;;;###autoload
-(defun ethio-composition-function (pos &optional string)
+(defun ethio-composition-function (pos to font-object string)
(setq pos (1- pos))
(let ((pattern "\\ce\\(፟\\|\\)"))
(if string
(provide 'ethio-util)
;;; ethio-util.el ends here
-
-;;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140
-;;; ethio-util.el ends here