mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
uni-script.el: Fix failure when loading the file directly
* lisp/international/textsec.el (textsec--create-script-table): Autoload and don't define while compiling. (uni-script): Require only when loading, not when compiling.
This commit is contained in:
parent
c05037ba1c
commit
52e484742d
|
|
@ -33,15 +33,16 @@
|
|||
|
||||
(defvar textsec--char-scripts nil)
|
||||
|
||||
(eval-and-compile
|
||||
(defun textsec--create-script-table (data)
|
||||
"Create the textsec--char-scripts char table."
|
||||
(setq textsec--char-scripts (make-char-table nil))
|
||||
(dolist (scripts data)
|
||||
(dolist (range (cadr scripts))
|
||||
(set-char-table-range textsec--char-scripts
|
||||
range (car scripts)))))
|
||||
(require 'uni-scripts))
|
||||
;;;###autoload
|
||||
(defun textsec--create-script-table (data)
|
||||
"Create the textsec--char-scripts char table."
|
||||
(setq textsec--char-scripts (make-char-table nil))
|
||||
(dolist (scripts data)
|
||||
(dolist (range (cadr scripts))
|
||||
(set-char-table-range textsec--char-scripts
|
||||
range (car scripts)))))
|
||||
|
||||
(if t (require 'uni-scripts))
|
||||
|
||||
(defun textsec-scripts (string)
|
||||
"Return a list of Unicode scripts used by characters in STRING.
|
||||
|
|
|
|||
Loading…
Reference in a new issue