From 3162c98a1116cebb3e2c2de42b6221bcfb016ee1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 17 Apr 2017 02:30:35 -0400 Subject: [PATCH] core-lib: reduce s.el autoloads, add subr-x autoloads --- core/core-lib.el | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 4399fd3ba..91d79cffb 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -2,10 +2,6 @@ (require 'cl-lib) -;; -(autoload 'when-let "subr-x") -(autoload 'if-let "subr-x") - ;; I don't use use-package for these to save on the `fboundp' lookups it does ;; for its :commands property. I use dolists instead of mapc to avoid extra ;; stackframes allocated for lambdas. This is _definitely_ premature @@ -17,22 +13,15 @@ persistent-soft-flush persistent-soft-store)) (autoload sym "persistent-soft")) -(dolist (sym '(s-trim s-trim-left s-trim-right s-chomp s-collapse-whitespace - s-word-wrap s-center s-pad-left s-pad-right s-truncate s-left - s-right s-chop-suffix s-chop-suffixes s-chop-prefix - s-chop-prefixes s-shared-start s-shared-end s-repeat s-concat - s-prepend s-append s-lines s-match s-match-strings-all - s-matched-positions-all s-slice-at s-split s-split-up-to s-join - s-equals? s-less? s-matches? s-blank? s-present? s-ends-with? - s-starts-with? s-contains? s-lowercase? s-uppercase? s-mixedcase? - s-capitalized? s-numeric? s-replace s-replace-all s-downcase - s-upcase s-capitalize s-titleize s-with s-index-of s-reverse - s-presence s-format s-lex-format s-count-matches s-wrap - s-split-words s-lower-camel-case s-upper-camel-case s-snake-case - s-dashed-words s-capitalized-words s-titleized-words - s-word-initials)) +(dolist (sym '(s-center s-pad-left s-pad-right s-truncate s-chop-suffix + s-chop-suffixes s-chop-prefix s-chop-prefixes s-join s-replace + s-replace-all s-capitalize s-titleize s-split-words + s-capitalized-words s-titleized-words)) (autoload sym "s")) +(dolist (sym '(when-let if-let string-trim string-join string-blank-p string-lessp)) + (autoload sym "subr-x")) + ;; ;; Helpers