diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2017-03-13 18:51:13 +0000 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2017-04-28 13:40:54 +0100 |
commit | 682e808ae7463d6a54862afc6d5bf6bf73b51be6 (patch) | |
tree | 59f19750356edc64242c130bd69bbf87d283382d /s.el | |
parent | d1f20fd835a65b5c01e58f2050c8f4051e3fc5f0 (diff) |
Conditionally require ucs-normalize
Defer requiring ucs-normalize until variable
ucs-normalize-combining-chars is used in function s-reverse. This
should result in s.el loading faster.
Addresses issue #77
Diffstat (limited to 's.el')
-rw-r--r-- | s.el | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -27,8 +27,6 @@ ;;; Code: -(require 'ucs-normalize) - (defun s-trim-left (s) "Remove whitespace at the beginning of S." (save-match-data @@ -380,7 +378,8 @@ attention to case differences." "Return the reverse of S." (if (multibyte-string-p s) (let ((input (string-to-list s)) - (output ())) + output) + (require 'ucs-normalize) (while input ;; Handle entire grapheme cluster as a single unit (let ((grapheme (list (pop input)))) |