From b0e96e554c0e78c17ee6e092e307112e814e5a65 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 26 Jan 2021 21:11:49 -0500 Subject: Use lexical-binding in of all lisp/language * lisp/international/titdic-cnv.el (pinyin-convert): Enable lexical-binding in the generated file(s). * lisp/language/ethio-util.el: Use lexical-binding. (ethio-tex-to-fidel-buffer): Use `inhibit-read-only`. Remove unused vars `p` and `ch`. * lisp/language/hanja-util.el: Use lexical-binding. * lisp/language/ind-util.el: Use lexical-binding. (indian-translate-region): Actually use the `from` and `to` arguments. (): Use `dlet`. Remove unused var `current-repertory`. (indian-2-column-to-ucs-region): Remove unused var `pos`. * lisp/language/japan-util.el: Use lexical-binding. (japanese-katakana-region, japanese-hiragana-region) (japanese-zenkaku-region): Remove unused var `next`. * lisp/language/korea-util.el: Use lexical-binding. * lisp/language/lao-util.el: Use lexical-binding. (lao-composition-function): Remove unused var `glyph`. * lisp/language/thai-util.el: Use lexical-binding. (thai-composition-function): Remove unused var `glyph`. * lisp/language/thai-word.el: Use lexical-binding. (thai-forward-word): Remove unused var `tail`. * lisp/language/tibet-util.el: Use lexical-binding. (tibetan-add-components): Remove unused var `tmp`. (tibetan-compose-region): Remove unused vars `str`, `result`, `chars`. * lisp/language/viet-util.el: * lisp/language/tv-util.el: * lisp/language/cyril-util.el: * lisp/language/china-util.el: Use lexical-binding. --- lisp/language/tibet-util.el | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'lisp/language/tibet-util.el') diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el index e741af18740..ddf4a0c0fb1 100644 --- a/lisp/language/tibet-util.el +++ b/lisp/language/tibet-util.el @@ -1,4 +1,4 @@ -;;; tibet-util.el --- utilities for Tibetan -*- coding: utf-8-emacs; -*- +;;; tibet-util.el --- utilities for Tibetan -*- coding: utf-8-emacs; lexical-binding: t; -*- ;; Copyright (C) 1997, 2001-2021 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -126,42 +126,42 @@ The returned string has no composition information." (setq t-str-list (cons (substring str idx) t-str-list))) (apply 'concat (nreverse t-str-list)))) -;;; +;; ;;; Functions for composing/decomposing Tibetan sequence. -;;; -;;; A Tibetan syllable is typically structured as follows: -;;; -;;; [Prefix] C [C+] V [M] [Suffix [Post suffix]] -;;; -;;; where C's are all vertically stacked, V appears below or above -;;; consonant cluster and M is always put above the C[C+]V combination. -;;; (Sanskrit visarga, though it is a vowel modifier, is considered -;;; to be a punctuation.) -;;; -;;; Here are examples of the words "bsgrubs" and "hfauM" -;;; -;;; བསྒྲུབས ཧཱུཾ -;;; -;;; M -;;; b s b s h -;;; g fa -;;; r u -;;; u -;;; -;;; Consonants `'' (འ), `w' (ཝ), `y' (ཡ), `r' (ར) take special -;;; forms when they are used as subjoined consonant. Consonant `r' -;;; takes another special form when used as superjoined in such a case -;;; as "rka", while it does not change its form when conjoined with -;;; subjoined `'', `w' or `y' as in "rwa", "rya". - -;; Append a proper composition rule and glyph to COMPONENTS to compose -;; CHAR with a composition that has COMPONENTS. +;; +;; A Tibetan syllable is typically structured as follows: +;; +;; [Prefix] C [C+] V [M] [Suffix [Post suffix]] +;; +;; where C's are all vertically stacked, V appears below or above +;; consonant cluster and M is always put above the C[C+]V combination. +;; (Sanskrit visarga, though it is a vowel modifier, is considered +;; to be a punctuation.) +;; +;; Here are examples of the words "bsgrubs" and "hfauM" +;; +;; བསྒྲུབས ཧཱུཾ +;; +;; M +;; b s b s h +;; g fa +;; r u +;; u +;; +;; Consonants `'' (འ), `w' (ཝ), `y' (ཡ), `r' (ར) take special +;; forms when they are used as subjoined consonant. Consonant `r' +;; takes another special form when used as superjoined in such a case +;; as "rka", while it does not change its form when conjoined with +;; subjoined `'', `w' or `y' as in "rwa", "rya". + +; Append a proper composition rule and glyph to COMPONENTS to compose +; CHAR with a composition that has COMPONENTS. (defun tibetan-add-components (components char) (let ((last (last components)) (stack-upper '(tc . bc)) (stack-under '(bc . tc)) - rule comp-vowel tmp) + rule comp-vowel) ;; Special treatment for 'a chung. ;; If 'a follows a consonant, turn it into the subjoined form. ;; * Disabled by Tomabechi 2000/06/09 * @@ -246,7 +246,7 @@ The returned string has no composition information." (defun tibetan-compose-region (beg end) "Compose Tibetan text the region BEG and END." (interactive "r") - (let (str result chars) + ;; (let (str result chars) (save-excursion (save-restriction (narrow-to-region beg end) @@ -272,7 +272,7 @@ The returned string has no composition information." (while (< (point) to) (tibetan-add-components components (following-char)) (forward-char 1)) - (compose-region from to components))))))) + (compose-region from to components)))))) ;; ) (defvar tibetan-decompose-precomposition-alist (mapcar (lambda (x) (cons (string-to-char (cdr x)) (car x))) -- cgit v1.2.3