Remove dependency on f.el and s.el
This commit is contained in:
		
							parent
							
								
									cf3cc541a5
								
							
						
					
					
						commit
						922d7c12d7
					
				
							
								
								
									
										20
									
								
								archwiki.el
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								archwiki.el
									
									
									
									
									
								
							| @ -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) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user