@@ -69,8 +69,8 @@ dash separator. For example, the following:
6969will return `lint-checkdoc' with a dash between two subcommands."
7070 (let* ((script-dir (file-name-directory eask--script))
7171 (script-file (file-name-sans-extension (file-name-nondirectory eask--script)))
72- (module-name (s-replace eask-lisp-root " " script-dir))
73- (module-name (s-replace " /" " " module-name)))
72+ (module-name (eask- s-replace eask-lisp-root " " script-dir))
73+ (module-name (eask- s-replace " /" " " module-name)))
7474 ; ; Ignore if it's inside core module
7575 (if (member module-name '(" core" " checker" )) script-file
7676 (concat module-name " -" script-file))))
@@ -148,6 +148,12 @@ the `eask-start' execution.")
148148 (mapc (lambda (elm ) (setq result (max result (length (eask-2str elm))))) sequence)
149149 result))
150150
151+ (defun eask-s-replace (old new s )
152+ " Replace OLD with NEW in S each time it occurs."
153+ (if (fboundp #'string-replace )
154+ (string-replace old new s)
155+ (replace-regexp-in-string (regexp-quote old) new s t t )))
156+
151157; ;
152158; ;; Archive
153159
@@ -592,7 +598,7 @@ Eask file in the workspace."
592598
593599(defun eask-root-del (filename )
594600 " Remove Eask file root path from FILENAME."
595- (when (stringp filename) (s-replace eask-file-root " " filename)))
601+ (when (stringp filename) (eask- s-replace eask-file-root " " filename)))
596602
597603(defun eask-file-load (location &optional noerror )
598604 " Load Eask file in the LOCATION."
@@ -793,7 +799,7 @@ Eask file in the workspace."
793799 (when (and location
794800 (gnutls-available-p )
795801 (not (eask-network-insecure-p)))
796- (setq location (s-replace " https://" " http://" location)))
802+ (setq location (eask- s-replace " https://" " http://" location)))
797803 (add-to-list 'package-archives (cons name location) t ))
798804
799805(defun eask-f-source-priority (archive-id &optional priority )
@@ -987,8 +993,8 @@ Standard is, 0 (error), 1 (warning), 2 (info), 3 (log), 4 or above (debug)."
987993
988994(defun eask--msg-paint-kwds (string )
989995 " Paint keywords from STRING."
990- (let* ((string (s-replace " ✓" (ansi-green " ✓" ) string))
991- (string (s-replace " ✗" (ansi-red " ✗" ) string)))
996+ (let* ((string (eask- s-replace " ✓" (ansi-green " ✓" ) string))
997+ (string (eask- s-replace " ✗" (ansi-red " ✗" ) string)))
992998 string))
993999
9941000(defun eask--format-paint-kwds (msg &rest args )
@@ -1292,7 +1298,6 @@ Standard is, 0 (error), 1 (warning), 2 (info), 3 (log), 4 or above (debug)."
12921298(with-eval-after-load 'ansi (eask-load " extern/ansi" )) ; override
12931299(eask-load " extern/package" )
12941300(eask-load " extern/package-build" )
1295- (eask-load " extern/s" )
12961301
12971302; ;
12981303; ;; Requirement
0 commit comments