emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b0e96e5: Use lexical-binding in of all lisp/language


From: Stefan Monnier
Subject: master b0e96e5: Use lexical-binding in of all lisp/language
Date: Wed, 27 Jan 2021 11:14:31 -0500 (EST)

branch: master
commit b0e96e554c0e78c17ee6e092e307112e814e5a65
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    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.
    (<toplevel>): 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/international/titdic-cnv.el |  6 ++--
 lisp/language/burmese.el         |  4 +--
 lisp/language/cham.el            |  2 +-
 lisp/language/china-util.el      |  2 +-
 lisp/language/cyril-util.el      |  2 +-
 lisp/language/ethio-util.el      | 11 ++++---
 lisp/language/ethiopic.el        |  4 +--
 lisp/language/hanja-util.el      |  2 +-
 lisp/language/hebrew.el          |  6 ++--
 lisp/language/ind-util.el        | 14 ++++-----
 lisp/language/indian.el          |  2 +-
 lisp/language/japan-util.el      |  8 ++---
 lisp/language/khmer.el           |  2 +-
 lisp/language/korea-util.el      |  6 ++--
 lisp/language/korean.el          |  4 +--
 lisp/language/lao-util.el        |  8 ++---
 lisp/language/lao.el             |  2 +-
 lisp/language/misc-lang.el       |  8 ++---
 lisp/language/sinhala.el         |  2 +-
 lisp/language/tai-viet.el        |  2 +-
 lisp/language/thai-util.el       |  8 ++---
 lisp/language/thai-word.el       |  5 ++-
 lisp/language/tibet-util.el      | 66 ++++++++++++++++++++--------------------
 lisp/language/tibetan.el         |  2 +-
 lisp/language/tv-util.el         |  4 +--
 lisp/language/viet-util.el       |  2 +-
 26 files changed, 93 insertions(+), 91 deletions(-)

diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 58c81bf..753139e 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -1212,8 +1212,10 @@ The library is named pinyin.el, and contains the constant
         (dst-file (cadr command-line-args-left))
         (coding-system-for-write 'utf-8-unix))
     (with-temp-file dst-file
-      (insert ";; This file is automatically generated from pinyin.map,\
- by the\n;; function pinyin-convert.\n\n")
+      (insert ";;; " (file-name-nondirectory dst-file)
+              "   -*- lexical-binding:t -*-
+;; This file is automatically generated from pinyin.map, by the
+;; function pinyin-convert.\n\n")
       (insert "(defconst pinyin-character-map\n'(")
       (let ((pos (point)))
         (insert-file-contents src-file)
diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el
index d689e87..373f25a 100644
--- a/lisp/language/burmese.el
+++ b/lisp/language/burmese.el
@@ -51,7 +51,7 @@
                                               regexp t t))))
     regexp))
 
-(let ((elt (list (vector burmese-composable-pattern 0 'font-shape-gstring)
-                (vector "." 0 'font-shape-gstring))))
+(let ((elt (list (vector burmese-composable-pattern 0 #'font-shape-gstring)
+                (vector "." 0 #'font-shape-gstring))))
   (set-char-table-range composition-function-table '(#x1000 . #x107F) elt)
   (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt))
diff --git a/lisp/language/cham.el b/lisp/language/cham.el
index aa820dc..3aac986 100644
--- a/lisp/language/cham.el
+++ b/lisp/language/cham.el
@@ -29,7 +29,7 @@
 
 (set-char-table-range composition-function-table
                      '(#xAA00 . #xAA5F)
-                     (list (vector "[\xAA00-\xAA5F]+" 0 'font-shape-gstring)))
+                     (list (vector "[\xAA00-\xAA5F]+" 0 #'font-shape-gstring)))
 
 (set-language-info-alist
  "Cham" '((charset unicode)
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index 4bc2eaa..105e7a7 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -1,4 +1,4 @@
-;;; china-util.el --- utilities for Chinese  -*- coding: utf-8 -*-
+;;; china-util.el --- utilities for Chinese  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1995, 2001-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 72ceffd..04e681d 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -1,4 +1,4 @@
-;;; cyril-util.el --- utilities for Cyrillic scripts
+;;; cyril-util.el --- utilities for Cyrillic scripts  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 1997-1998, 2001-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 174b9ec..9b5fdf2 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,4 +1,4 @@
-;;; ethio-util.el --- utilities for Ethiopic   -*- coding: utf-8-emacs; -*-
+;;; ethio-util.el --- utilities for Ethiopic   -*- coding: utf-8-emacs; 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1997-1998, 2002-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
@@ -832,11 +832,12 @@ The 2nd and 3rd arguments BEGIN and END specify the 
region."
     (set-buffer-modified-p nil)))
 
 ;;;###autoload
-(defun ethio-tex-to-fidel-buffer nil
+(defun ethio-tex-to-fidel-buffer ()
   "Convert fidel-tex commands in the current buffer into fidel chars."
   (interactive)
-  (let ((buffer-read-only nil)
-       (p) (ch))
+  (let ((inhibit-read-only t)
+       ;; (p) (ch)
+       )
 
     ;; TeX macros to Ethiopic characters
     (robin-convert-region (point-min) (point-max) "ethiopic-tex")
@@ -1018,7 +1019,7 @@ With ARG, insert that many delimiters."
 ;;
 
 ;;;###autoload
-(defun ethio-composition-function (pos to font-object string _direction)
+(defun ethio-composition-function (pos _to _font-object string _direction)
   (setq pos (1- pos))
   (let ((pattern "\\ce\\(፟\\|����\\)"))
     (if string
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index 8573f61..209dcd5 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -79,8 +79,8 @@
 )))
 
 ;; For automatic composition
-(aset composition-function-table ?���� 'ethio-composition-function)
-(aset composition-function-table ?፟ 'ethio-composition-function)
+(aset composition-function-table ?���� #'ethio-composition-function)
+(aset composition-function-table ?፟ #'ethio-composition-function)
 
 (provide 'ethiopic)
 
diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el
index 313fc63..9e92135 100644
--- a/lisp/language/hanja-util.el
+++ b/lisp/language/hanja-util.el
@@ -1,4 +1,4 @@
-;;; hanja-util.el --- Korean Hanja util module  -*- coding: utf-8 -*-
+;;; hanja-util.el --- Korean Hanja util module  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index 3895656..c55d23f 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -245,9 +245,9 @@ Bidirectional editing is supported.")))
        (pattern2 (concat base "\u200D" combining)))
   (set-char-table-range
    composition-function-table '(#x591 . #x5C7)
-   (list (vector pattern2 3 'hebrew-shape-gstring)
-        (vector pattern2 2 'hebrew-shape-gstring)
-        (vector pattern1 1 'hebrew-shape-gstring)
+   (list (vector pattern2 3 #'hebrew-shape-gstring)
+        (vector pattern2 2 #'hebrew-shape-gstring)
+        (vector pattern1 1 #'hebrew-shape-gstring)
         [nil 0 hebrew-shape-gstring]))
   ;; Exclude non-combining characters.
   (set-char-table-range
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 4bd1cd7..8d4b2a8 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -1,4 +1,4 @@
-;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- 
coding: utf-8-emacs; -*-
+;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- 
coding: utf-8-emacs; lexical-binding: t; -*-
 
 ;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
@@ -40,7 +40,7 @@
 (defun indian-regexp-of-hashtbl-keys (hashtbl)
   "Return the regular expression of hash table keys."
   (let (keys)
-    (maphash (lambda (key val) (push key keys)) hashtbl)
+    (maphash (lambda (key _val) (push key keys)) hashtbl)
     (regexp-opt keys)))
 
 (defvar indian-dev-base-table
@@ -565,7 +565,7 @@
        (let ((regexp ,(indian-regexp-of-hashtbl-keys
                       (if encode-p (car (eval hashtable))
                         (cdr (eval hashtable))))))
-        (narrow-to-region from to)
+        (narrow-to-region ,from ,to)
         (goto-char (point-min))
         (while (re-search-forward regexp nil t)
           (let ((matchstr (gethash (match-string 0)
@@ -613,7 +613,7 @@
 
 ;; The followings provide conversion between IS 13194 (ISCII) and UCS.
 
-(let
+(dlet
     ;;Unicode vs IS13194  ;; only Devanagari is supported now.
     ((ucs-devanagari-to-is13194-alist
       '((?\x0900 . "[U+0900]")
@@ -820,11 +820,11 @@ Returns new end position."
     (save-restriction
       (narrow-to-region from to)
       (goto-char (point-min))
-      (let* ((current-repertory is13194-default-repertory))
+      ;; (let* ((current-repertory is13194-default-repertory))
        (while (re-search-forward indian-ucs-to-is13194-regexp nil t)
          (replace-match
           (get-char-code-property (string-to-char (match-string 0))
-                                  'iscii))))
+                                  'iscii)));; )
       (point-max))))
 
 (defun indian-iscii-to-ucs-region (from to)
@@ -1246,7 +1246,7 @@ Returns new end position."
   (interactive "r")
   (save-excursion
     (save-restriction
-      (let ((pos from)
+      (let (;; (pos from)
            (alist (char-table-extra-slot indian-2-column-to-ucs-chartable 0)))
        (narrow-to-region from to)
        (decompose-region from to)
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 5ff5796..6f9d270 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -381,7 +381,7 @@ South Indian language Malayalam is supported in this 
language environment."))
         (if slot
             (set-char-table-range
              composition-function-table key
-             (list (vector (cdr slot) 0 'font-shape-gstring))))))
+             (list (vector (cdr slot) 0 #'font-shape-gstring))))))
    char-script-table))
 
 (provide 'indian)
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 9dce17c..948bfef 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -1,4 +1,4 @@
-;;; japan-util.el --- utilities for Japanese
+;;; japan-util.el --- utilities for Japanese  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -236,7 +236,7 @@ of which charset is `japanese-jisx0201-kana'."
               (composition
                (and (not hankaku)
                     (get-char-code-property kana 'kana-composition)))
-              next slot)
+              slot) ;; next
          (if (and composition (setq slot (assq (following-char) composition)))
              (japanese-replace-region (match-beginning 0) (1+ (point))
                                       (cdr slot))
@@ -258,7 +258,7 @@ of which charset is `japanese-jisx0201-kana'."
       (while (re-search-forward "\\cK\\|\\ck" nil t)
        (let* ((kata (preceding-char))
               (composition (get-char-code-property kata 'kana-composition))
-              next slot)
+              slot) ;; next
          (if (and composition (setq slot (assq (following-char) composition)))
              (japanese-replace-region (match-beginning 0) (1+ (point))
                                       (get-char-code-property
@@ -305,7 +305,7 @@ Optional argument KATAKANA-ONLY non-nil means to convert 
only KATAKANA char."
                      (re-search-forward "\\ca\\|\\ck" nil t)))
        (let* ((hankaku (preceding-char))
               (composition (get-char-code-property hankaku 'kana-composition))
-              next slot)
+              slot) ;; next
          (if (and composition (setq slot (assq (following-char) composition)))
              (japanese-replace-region (match-beginning 0) (1+ (point))
                                       (cdr slot))
diff --git a/lisp/language/khmer.el b/lisp/language/khmer.el
index 37173c9..6f08e60 100644
--- a/lisp/language/khmer.el
+++ b/lisp/language/khmer.el
@@ -31,7 +31,7 @@
           (documentation . t)))
 
 (let ((val (list (vector "[\x1780-\x17FF\x19E0-\x19FF\x200C\x200D]+"
-                        0 'font-shape-gstring))))
+                        0 #'font-shape-gstring))))
   (set-char-table-range composition-function-table '(#x1780 . #x17FF) val)
   (set-char-table-range composition-function-table '(#x19E0 . #x19FF) val))
 
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index eb7b85b..c99ff3c 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -1,4 +1,4 @@
-;;; korea-util.el --- utilities for Korean
+;;; korea-util.el --- utilities for Korean  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -45,7 +45,7 @@
     (activate-input-method
      (concat "korean-hangul" default-korean-keyboard))))
 
-(defun quail-hangul-switch-symbol-ksc (&rest ignore)
+(defun quail-hangul-switch-symbol-ksc (&rest _ignore)
   "Switch to/from Korean symbol package."
   (interactive "i")
   (and current-input-method
@@ -54,7 +54,7 @@
                                          default-korean-keyboard))
         (activate-input-method "korean-symbol"))))
 
-(defun quail-hangul-switch-hanja (&rest ignore)
+(defun quail-hangul-switch-hanja (&rest _ignore)
   "Switch to/from Korean hanja package."
   (interactive "i")
   (and current-input-method
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index 22b33a4..bdf8240 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -92,10 +92,10 @@ and the following key bindings are available within Korean 
input methods:
        (pattern (concat choseong jungseong jongseong)))
   (set-char-table-range composition-function-table
                         '(#x1100 . #x115F)
-                        (list (vector pattern 0 'font-shape-gstring)))
+                        (list (vector pattern 0 #'font-shape-gstring)))
   (set-char-table-range composition-function-table
                         '(#xA960 . #xA97C)
-                        (list (vector pattern 0 'font-shape-gstring))))
+                        (list (vector pattern 0 #'font-shape-gstring))))
 
 (provide 'korean)
 
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 59c9850..c8c3fe4 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -1,4 +1,4 @@
-;;; lao-util.el --- utilities for Lao -*- coding: utf-8; -*-
+;;; lao-util.el --- utilities for Lao -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -498,10 +498,10 @@ syllable.  In that case, FROM and TO are indexes to STR."
       (compose-gstring-for-graphic gstring direction)
     (or (font-shape-gstring gstring direction)
        (let ((glyph-len (lgstring-glyph-len gstring))
-             (i 0)
-             glyph)
+             (i 0)) ;; glyph
          (while (and (< i glyph-len)
-                     (setq glyph (lgstring-glyph gstring i)))
+                     ;; (setq glyph
+                     (lgstring-glyph gstring i)) ;;)
            (setq i (1+ i)))
          (compose-glyph-string-relative gstring 0 i 0.1)))))
 
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index 5252f1e..c699d57 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -66,7 +66,7 @@
                                        (t (string c))))
                              (cdr l) ""))
           ;; Element of composition-function-table.
-          (elt (list (vector regexp 1 'lao-composition-function)
+          (elt (list (vector regexp 1 #'lao-composition-function)
                      fallback-rule))
           ch)
       (dotimes (i len)
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 0a274f1..a2ca678 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -137,9 +137,9 @@ thin (i.e. 1-dot width) space."
  composition-function-table
  '(#x600 . #x74F)
  (list (vector "[\u200C\u200D][\u0600-\u074F\u200C\u200D]+"
-               1 'arabic-shape-gstring)
+               1 #'arabic-shape-gstring)
        (vector "[\u0600-\u074F\u200C\u200D]+"
-               0 'arabic-shape-gstring)))
+               0 #'arabic-shape-gstring)))
 
 ;; The Egyptian Hieroglyph Format Controls were introduced in Unicode
 ;; Standard v12.0.  Apparently, they are not yet well supported in
@@ -186,13 +186,13 @@ thin (i.e. 1-dot width) space."
                  ;; doesn't support these controls, the glyphs are
                  ;; displayed individually, and not as a single
                  ;; grapheme cluster.
-                 1 'font-shape-gstring)))
+                 1 #'font-shape-gstring)))
   ;; Grouping controls
   (set-char-table-range
    composition-function-table
    #x13437
    (list (vector "\U00013437[\U00013000-\U0001343F]+"
-                 0 'egyptian-shape-grouping))))
+                 0 #'egyptian-shape-grouping))))
 
 (provide 'misc-lang)
 
diff --git a/lisp/language/sinhala.el b/lisp/language/sinhala.el
index 90fc41c..99a104e 100644
--- a/lisp/language/sinhala.el
+++ b/lisp/language/sinhala.el
@@ -43,6 +43,6 @@
         "[\u0D85-\u0D96][\u0D82-\u0D83]?\\|"
         ;; any other singleton characters
         "[\u0D80-\u0DFF]")
-       0 'font-shape-gstring)))
+       0 #'font-shape-gstring)))
 
 ;; sinhala.el ends here
diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el
index 17abf13..4549b11 100644
--- a/lisp/language/tai-viet.el
+++ b/lisp/language/tai-viet.el
@@ -30,7 +30,7 @@
 
 (set-char-table-range composition-function-table
                      '(#xAA80 . #xAADF)
-                     'tai-viet-composition-function)
+                     #'tai-viet-composition-function)
 
 (set-language-info-alist
  "TaiViet" '((charset unicode)
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el
index f9c57e8..e11a054 100644
--- a/lisp/language/thai-util.el
+++ b/lisp/language/thai-util.el
@@ -1,4 +1,4 @@
-;;; thai-util.el --- utilities for Thai -*- coding: utf-8; -*-
+;;; thai-util.el --- utilities for Thai -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -232,10 +232,10 @@ positions (integers or markers) specifying the region."
        (let ((glyph-len (lgstring-glyph-len gstring))
              (last-char (lgstring-char gstring
                                        (1- (lgstring-char-len gstring))))
-             (i 0)
-             glyph)
+             (i 0)) ;; glyph
          (while (and (< i glyph-len)
-                     (setq glyph (lgstring-glyph gstring i)))
+                     ;; (setq glyph
+                     (lgstring-glyph gstring i)) ;; )
            (setq i (1+ i)))
          (if (= last-char ?ำ)
              (setq i (1- i)))
diff --git a/lisp/language/thai-word.el b/lisp/language/thai-word.el
index 94c6ab9..ff1e802 100644
--- a/lisp/language/thai-word.el
+++ b/lisp/language/thai-word.el
@@ -1,4 +1,4 @@
-;;; thai-word.el -- find Thai word boundaries
+;;; thai-word.el -- find Thai word boundaries  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -10973,8 +10973,7 @@ If COUNT is negative, move point backward (- COUNT) 
words."
            ;; special instead of using forward-word.
            (let ((start (point))
                  (limit (match-end 0))
-                 boundaries
-                 tail)
+                 boundaries) ;; tail
              ;; If thai-forward-word has been called within a Thai
              ;; region, we must go back until the Thai region starts
              ;; to do the contextual analysis for finding word
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index e741af1..ddf4a0c 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)))
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index edd9d76..48c7638 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -605,7 +605,7 @@ This also matches some punctuation characters which need 
conversion.")
 ;; For automatic composition.
 (set-char-table-range
  composition-function-table '(#xF00 . #xFD1)
- (list (vector tibetan-composable-pattern 0 'font-shape-gstring)))
+ (list (vector tibetan-composable-pattern 0 #'font-shape-gstring)))
 
 (provide 'tibetan)
 
diff --git a/lisp/language/tv-util.el b/lisp/language/tv-util.el
index 7ce8ee1..1a530d3 100644
--- a/lisp/language/tv-util.el
+++ b/lisp/language/tv-util.el
@@ -1,4 +1,4 @@
-;;; tv-util.el --- support for Tai Viet                        -*- coding: 
utf-8 -*-
+;;; tv-util.el --- support for Tai Viet                -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -128,7 +128,7 @@
 
 
 ;;;###autoload
-(defun tai-viet-composition-function (from to font-object string _direction)
+(defun tai-viet-composition-function (from _to _font-object string _direction)
   (if string
       (if (string-match tai-viet-re string from)
          (tai-viet-compose-string from (match-end 0) string))
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 177b04b..bfaf0f3 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -1,4 +1,4 @@
-;;; viet-util.el --- utilities for Vietnamese  -*- coding: utf-8; -*-
+;;; viet-util.el --- utilities for Vietnamese  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1998, 2001-2021 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]