diff options
Diffstat (limited to 'lib/unicode-tokens.el')
-rw-r--r-- | lib/unicode-tokens.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el index 4d1d0d35..41f478d1 100644 --- a/lib/unicode-tokens.el +++ b/lib/unicode-tokens.el @@ -46,7 +46,7 @@ ;;; Code: -(require 'cl) +(require 'cl-lib) (require 'quail) (eval-when-compile @@ -429,12 +429,12 @@ This function also initialises the important tables for the mode." ;; hairy logic based on Coq-style vs Isabelle-style configs (if (string= "" (format unicode-tokens-token-format "")) ;; no special token format, parse separate words/symbols - (let* ((tokextra (remove* "^\\(?:\\sw\\|\\s_\\)+$" toks :test 'string-match)) - (toksymbwrd (set-difference toks tokextra)) + (let* ((tokextra (cl-remove "^\\(?:\\sw\\|\\s_\\)+$" toks :test 'string-match)) + (toksymbwrd (cl-set-difference toks tokextra)) ;; indentifier that are not pure words - (toksymb (remove* "^\\(?:\\sw\\)+$" toksymbwrd :test 'string-match)) + (toksymb (cl-remove "^\\(?:\\sw\\)+$" toksymbwrd :test 'string-match)) ;; pure words - (tokwrd (set-difference toksymbwrd toksymb)) + (tokwrd (cl-set-difference toksymbwrd toksymb)) (idorop (concat "\\(\\_<" (regexp-opt toksymb) @@ -461,9 +461,9 @@ This function also initialises the important tables for the mode." The check is with `char-displayable-p'." (cond ((stringp comp) - (reduce (lambda (x y) (and x (char-displayable-p y))) - comp - :initial-value t)) + (cl-reduce (lambda (x y) (and x (char-displayable-p y))) + comp + :initial-value t)) ((characterp comp) (char-displayable-p comp)) (comp ;; assume any other non-null is OK @@ -518,7 +518,7 @@ The face property is set to the :family and :slant attriubutes taken from (car props) (cadr props)) (setq props (cddr props))))) (unless (or unicode-tokens-show-symbols - (intersection unicode-tokens-fonts propsyms)) + (cl-intersection unicode-tokens-fonts propsyms)) (font-lock-append-text-property start end 'face ;; just use family and slant to enhance merging with other faces @@ -680,7 +680,7 @@ Calculated from `unicode-tokens-token-name-alist' and `unicode-tokens-shortcut-alist'." (let ((unicode-tokens-quail-define-rules (list 'quail-define-rules))) - (let ((ulist (copy-list unicode-tokens-shortcut-alist)) + (let ((ulist (copy-sequence unicode-tokens-shortcut-alist)) ustring shortcut) (setq ulist (sort ulist 'unicode-tokens-map-ordering)) (while ulist @@ -714,7 +714,7 @@ Available annotations chosen from `unicode-tokens-control-regions'." "Annotate region with: " unicode-tokens-control-regions nil 'requirematch)))) - (assert (assoc name unicode-tokens-control-regions)) + (cl-assert (assoc name unicode-tokens-control-regions)) (let* ((entry (assoc name unicode-tokens-control-regions)) (beg (region-beginning)) (end (region-end)) @@ -736,7 +736,7 @@ Available annotations chosen from `unicode-tokens-control-regions'." "Insert control symbol: " unicode-tokens-control-characters nil 'requirematch))) - (assert (assoc name unicode-tokens-control-characters)) + (cl-assert (assoc name unicode-tokens-control-characters)) (insert (format unicode-tokens-control-char-format (cadr (assoc name unicode-tokens-control-characters))))) @@ -833,7 +833,8 @@ but multiple characters in the underlying buffer." (error "Cannot find token before point")) (when token (let* ((tokennumber - (search (list token) unicode-tokens-token-list :test 'equal)) + (cl-search (list token) unicode-tokens-token-list + :test #'equal)) (numtoks (hash-table-count unicode-tokens-hash-table)) (newtok @@ -943,7 +944,7 @@ Starts from point." 'face 'header-line)) (insert " ")) - (incf count) + (cl-incf count) (if (null toks) (insert " ") (insert-text-button |