summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2019-11-05 15:05:38 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2019-11-05 15:05:38 -0500
commitedec35aa9472dca3a80966c62131f00e5288ee49 (patch)
tree99b9f798ac5d92a75a3fec5fa4b1879713e7437b /admin
parentec5433f676035a5ad3ad8fcb22884cf0e0c290f6 (diff)
downloademacs-edec35aa9472dca3a80966c62131f00e5288ee49.tar.gz
* admin/unidata/uvs.el: Use lexical-binding
Diffstat (limited to 'admin')
-rw-r--r--admin/unidata/uvs.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/admin/unidata/uvs.el b/admin/unidata/uvs.el
index dfea4796528..2d0f92422bb 100644
--- a/admin/unidata/uvs.el
+++ b/admin/unidata/uvs.el
@@ -1,4 +1,4 @@
-;;; uvs.el --- utility for UVS (format 14) cmap subtables in OpenType fonts.
+;;; uvs.el --- utility for UVS (format 14) cmap subtables in OpenType fonts -*- lexical-binding:t -*-
;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
@@ -30,7 +30,7 @@
;;; Code:
(defun uvs-fields-total-size (fields)
- (apply '+ (mapcar (lambda (field) (get field 'uvs-field-size)) fields)))
+ (apply #'+ (mapcar (lambda (field) (get field 'uvs-field-size)) fields)))
;;; Fields in Format 14 header.
(defconst uvs-format-14-header-fields
@@ -85,7 +85,8 @@ where selectors and bases are sorted in ascending order."
"\\(?:" (regexp-quote collection-id) "\\)"
"[[:blank:]]*;[[:blank:]]*"
"\\([^\n[:blank:]]+\\)"
- "[[:blank:]]*$") nil t)
+ "[[:blank:]]*$")
+ nil t)
(let* ((base (string-to-number (match-string 1) 16))
(selector (string-to-number (match-string 2) 16))
(sequence-id (match-string 3))
@@ -105,7 +106,7 @@ where selectors and bases are sorted in ascending order."
"Convert integer VALUE to a list of SIZE bytes.
The most significant byte comes first."
(let (result)
- (dotimes (i size)
+ (dotimes (_ size)
(push (logand value #xff) result)
(setq value (ash value -8)))
result))
@@ -118,7 +119,7 @@ respectively. Byte length of each value is determined by the
(while fields
(let ((field (car fields))
(value (car values)))
- (insert (apply 'unibyte-string
+ (insert (apply #'unibyte-string
(uvs-int-to-bytes value (get field 'uvs-field-size))))
(setq fields (cdr fields) values (cdr values)))))
@@ -126,9 +127,9 @@ respectively. Byte length of each value is determined by the
"Insert UVS-ALIST as a sequence of bytes to the current buffer."
(let* ((nrecords (length uvs-alist)) ; # of selectors
(total-nmappings
- (apply '+ (mapcar
- (lambda (selector-bgs) (length (cdr selector-bgs)))
- uvs-alist)))
+ (apply #'+ (mapcar
+ (lambda (selector-bgs) (length (cdr selector-bgs)))
+ uvs-alist)))
(non-default-offset
(+ uvs-format-14-header-size
(* uvs-variation-selector-record-size nrecords))))
@@ -158,15 +159,15 @@ respectively. Byte length of each value is determined by the
(car base-glyph)
(cdr base-glyph))))))
-(defun uvs-dump (&optional bytes-per-line separator separator-eol line-prefix)
+(defun uvs-dump (&optional bytes-per-line separator separator-eol bol-prefix)
"Print the current buffer as in representation of C array contents."
(or bytes-per-line (setq bytes-per-line 8))
(or separator (setq separator ", "))
(or separator-eol (setq separator-eol ","))
- (or line-prefix (setq line-prefix " "))
+ (or bol-prefix (setq bol-prefix " "))
(goto-char (point-min))
(while (> (- (point-max) (point)) bytes-per-line)
- (princ line-prefix)
+ (princ bol-prefix)
(princ (mapconcat (lambda (byte) (format "0x%02x" byte))
(string-to-unibyte
(buffer-substring (point) (+ (point) bytes-per-line)))
@@ -174,7 +175,7 @@ respectively. Byte length of each value is determined by the
(princ separator-eol)
(terpri)
(forward-char bytes-per-line))
- (princ line-prefix)
+ (princ bol-prefix)
(princ (mapconcat (lambda (byte) (format "0x%02x" byte))
(string-to-unibyte
(buffer-substring (point) (point-max)))