From 922d7c12d70f6d7a80c74849f96f7bda9aca7b31 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Tue, 29 Jun 2021 22:52:50 +0200 Subject: [PATCH] Remove dependency on f.el and s.el --- archwiki.el | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/archwiki.el b/archwiki.el index a67130a..3392d57 100644 --- a/archwiki.el +++ b/archwiki.el @@ -2,8 +2,8 @@ ;; Author: Lucien Cartier-Tilet ;; Maintainer: Lucien Cartier-Tilet -;; Version: 0.1.0 -;; Package-Requires: ((emacs "25") (f "0.20") (s "1")) +;; Version: 0.1.1 +;; Package-Requires: ((emacs "25")) ;; Homepage: https://labs.phundrak.com/phundrak/archwiki.el ;; Keywords: keywords @@ -37,11 +37,8 @@ ;;; Code: -(require 'f) -(require 's) - (defgroup archwiki nil - "browse the Arch Wiki from Emacs." + "Browse the Arch Wiki from Emacs." :prefix "archwiki-" :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 () "List web pages of the Arch Wiki." - (mapcar - (lambda (file) (replace-regexp-in-string "_" " " (f-no-ext (f-filename file)))) - (f-files archwiki-local-path - (lambda (path) - (s-ends-with-p "html" path t)) - nil))) + (mapcar (lambda (file) (replace-regexp-in-string "_" "_" (file-name-sans-extension file))) + (directory-files archwiki-local-path + nil + (rx (+ ascii) + ".html")))) ;;;###autoload (defun archwiki (page)