diff options
| author | Thien-Thi Nguyen <ttn@gnu.org> | 2017-10-03 22:01:41 +0200 |
|---|---|---|
| committer | Thien-Thi Nguyen <ttn@gnu.org> | 2017-10-03 22:01:41 +0200 |
| commit | 461be39e9996469b43a83d10d7b0fc7d20d23f33 (patch) | |
| tree | ad544c80457f2f7c9d52d164402a8be260136250 | |
| parent | 3bbc23c19f70b23d547323b439be78d25995c747 (diff) | |
[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’.
| -rw-r--r-- | ascii-art-to-unicode.el | 9 |
1 files 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 #'gethash ;; 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: aa2u-components 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))) |
