[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix 3e1275d 7/7: use better "~" to replace "$HOME" en
From: |
Stefan Monnier |
Subject: |
[elpa] externals/kiwix 3e1275d 7/7: use better "~" to replace "$HOME" environment variable |
Date: |
Mon, 28 Dec 2020 13:56:18 -0500 (EST) |
branch: externals/kiwix
commit 3e1275df1a560b61ef1bf1aa3343f731c7cb8992
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
use better "~" to replace "$HOME" environment variable
Actually, it's the other way around: HOME is just an env-var and its
meaning is defined by the platform (it just happens to work fine with
the currently supported platforms), whereas "~/" is defined by Emacs so
we (Emacs maintainers) have to make sure it works on all platforms. ;-)
---
kiwix.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kiwix.el b/kiwix.el
index 17adbde..8d51af3 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -90,21 +90,20 @@
(defun kiwix-dir-detect ()
"Detect Kiwix profile directory exist."
- (let ((kiwix-dir (concat (getenv "HOME") "/.www.kiwix.org/kiwix")))
+ (let ((kiwix-dir "~/.www.kiwix.org/kiwix"))
(if (and (file-directory-p kiwix-dir) (file-readable-p kiwix-dir))
kiwix-dir
(warn "ERROR: Kiwix profile directory \"~/.www.kiwix.org/kiwix\" is not
accessible."))))
(defcustom kiwix-default-data-profile-name
(when (kiwix-dir-detect)
- (car (directory-files
- (concat (getenv "HOME") "/.www.kiwix.org/kiwix") nil
".*\\.default")))
+ (car (directory-files "~/.www.kiwix.org/kiwix" nil ".*\\.default")))
"Specify the default Kiwix data profile path."
:type 'string)
(defcustom kiwix-default-data-path
(when (kiwix-dir-detect)
- (concat (getenv "HOME") "/.www.kiwix.org/kiwix/"
kiwix-default-data-profile-name))
+ (concat "~/.www.kiwix.org/kiwix/" kiwix-default-data-profile-name))
"Specify the default Kiwix data path."
:type 'string
:safe #'stringp)
- [elpa] externals/kiwix updated (2619c65 -> 3e1275d), Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix 346b9df 4/7: remove useless ivy detection and requirement, Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix d84644b 1/7: format code, Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix f718e2d 5/7: remove redundant :group 'kiwix-mode, Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix 31d0d8d 3/7: fix commentary semicolons as subheadings, Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix 3e1275d 7/7: use better "~" to replace "$HOME" environment variable,
Stefan Monnier <=
- [elpa] externals/kiwix c057b35 2/7: remove unnecessary cl-lib package dependency, Stefan Monnier, 2020/12/28
- [elpa] externals/kiwix a90d6db 6/7: replace file-accessible-directory-p function, Stefan Monnier, 2020/12/28