[Top][All Lists]

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

[elpa] externals/ascii-art-to-unicode 461be39 31/42: [aa2u slog] Fix bot

From: Stefan Monnier
Subject: [elpa] externals/ascii-art-to-unicode 461be39 31/42: [aa2u slog] Fix botched bifurcation.
Date: Sun, 29 Nov 2020 18:57:08 -0500 (EST)

branch: externals/ascii-art-to-unicode
commit 461be39e9996469b43a83d10d7b0fc7d20d23f33
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [aa2u slog] Fix botched bifurcation.
    Bug introduced 2017-10-03, "Handle ‘ucs-names’ that
    returns a hash table".  Culprit: No testing (sigh).
    * packages/ascii-art-to-unicode/ascii-art-to-unicode.el
    (aa2u--lookup): Delete alias.
    (aa2u--lookup-char): New alias.
    (aa2u-1c): Use ‘aa2u--lookup-char’.
 ascii-art-to-unicode.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ascii-art-to-unicode.el b/ascii-art-to-unicode.el
index be40d88..ade0713 100644
--- a/ascii-art-to-unicode.el
+++ b/ascii-art-to-unicode.el
@@ -111,13 +111,14 @@ This specifies the weight of all the lines.")
 ;;; support
-(defalias 'aa2u--lookup
+(defalias 'aa2u--lookup-char
   ;; Keep some slack: don't ‘eval-when-compile’ here.
   (if (hash-table-p (ucs-names))
       ;; Emacs 26 and later
     ;; prior to Emacs 26
-    #'assoc-string))
+    (lambda (string alist)
+      (cdr (assoc-string string alist)))))
 (defsubst aa2u--text-p (pos)
   (get-text-property pos 'aa2u-text))
@@ -153,8 +154,8 @@ The char is a string (of length one), with two properties:
 Their values are STRINGIFIER and COMPONENTS, respectively."
-  (let ((s (string (cdr (aa2u--lookup (apply stringifier components)
-                                      (ucs-names))))))
+  (let ((s (string (aa2u--lookup-char (apply stringifier components)
+                                      (ucs-names)))))
     (propertize s
                 'aa2u-stringifier stringifier
                 'aa2u-components components)))

reply via email to

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