Remove dependency on f.el and s.el

This commit is contained in:
Lucien Cartier-Tilet 2021-06-29 22:52:50 +02:00
parent cf3cc541a5
commit 922d7c12d7
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 8 additions and 12 deletions

View File

@ -2,8 +2,8 @@
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com> ;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com> ;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
;; Version: 0.1.0 ;; Version: 0.1.1
;; Package-Requires: ((emacs "25") (f "0.20") (s "1")) ;; Package-Requires: ((emacs "25"))
;; Homepage: https://labs.phundrak.com/phundrak/archwiki.el ;; Homepage: https://labs.phundrak.com/phundrak/archwiki.el
;; Keywords: keywords ;; Keywords: keywords
@ -37,11 +37,8 @@
;;; Code: ;;; Code:
(require 'f)
(require 's)
(defgroup archwiki nil (defgroup archwiki nil
"browse the Arch Wiki from Emacs." "Browse the Arch Wiki from Emacs."
:prefix "archwiki-" :prefix "archwiki-"
:link '(url-link :tag "Gitea" "https://labs.phundrak.com/phundrak/archwiki.el")) :link '(url-link :tag "Gitea" "https://labs.phundrak.com/phundrak/archwiki.el"))
@ -67,12 +64,11 @@ If its value is an empty string, use `xdg-open'."
(defun archwiki--list-web-pages () (defun archwiki--list-web-pages ()
"List web pages of the Arch Wiki." "List web pages of the Arch Wiki."
(mapcar (mapcar (lambda (file) (replace-regexp-in-string "_" "_" (file-name-sans-extension file)))
(lambda (file) (replace-regexp-in-string "_" " " (f-no-ext (f-filename file)))) (directory-files archwiki-local-path
(f-files archwiki-local-path nil
(lambda (path) (rx (+ ascii)
(s-ends-with-p "html" path t)) ".html"))))
nil)))
;;;###autoload ;;;###autoload
(defun archwiki (page) (defun archwiki (page)