[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnus-mock 6f22e65 23/27: [gnus-mock] Protect value of g
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnus-mock 6f22e65 23/27: [gnus-mock] Protect value of gnus-mock-data-dir, bump to 0.4.3 |
Date: |
Tue, 1 Dec 2020 10:11:41 -0500 (EST) |
branch: externals/gnus-mock
commit 6f22e651ec64525167582c0a2f6fdb42b1a2fa58
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
[gnus-mock] Protect value of gnus-mock-data-dir, bump to 0.4.3
* packages/gnus-mock/gnus-mock.el (gnus-mock-data-dir): This file
might be loaded in such a way that load-file-name is nil. Avoid an
error in that case, and ask the user to set it themselves.
---
gnus-mock.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gnus-mock.el b/gnus-mock.el
index dd4ed07..6119785 100644
--- a/gnus-mock.el
+++ b/gnus-mock.el
@@ -5,7 +5,7 @@
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>
;; Package-Type: multi
-;; Version: 0.4.2
+;; Version: 0.4.3
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -119,9 +119,10 @@ installation."
:type 'string)
(defconst gnus-mock-data-dir
- (file-name-as-directory (expand-file-name
- "data"
- (file-name-directory load-file-name)))
+ (when load-file-name
+ (file-name-as-directory (expand-file-name
+ "data"
+ (file-name-directory load-file-name))))
"Source directory for Gnus mock data.")
;;;###autoload
@@ -131,6 +132,8 @@ The new Emacs process will be started as \"-Q\", with the
mock
Gnus settings pre-loaded. Any of the normal Gnus entry points
will start a mock Gnus session."
(interactive)
+ (unless gnus-mock-data-dir
+ (error "Set `gnus-mock-data-dir' to the \"gnus-mock/data\" directory"))
(let ((mock-tmp-dir (make-temp-file "emacs-gnus-mock-" t)))
(condition-case-unless-debug err
(let ((init-file (expand-file-name "init.el" mock-tmp-dir)))
- [elpa] externals/gnus-mock ab39a00 12/27: [gnus-mock] Conditionally add nnimap server, bump to 0.2.0, (continued)
- [elpa] externals/gnus-mock ab39a00 12/27: [gnus-mock] Conditionally add nnimap server, bump to 0.2.0, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 0e8663e 14/27: [gnus-mock] Add Cyrillic group to the nnimap server, bump to 0.3.0, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 5c2d129 19/27: [gnus-mock] Create empty draft/queue directories in advance, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 91b3515 25/27: [gnus-mock] Munge maildir article filenames, bump to 0.4.5, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock d6b2564 18/27: Add nnml server with non-ASCII group name, bump to 0.4.1, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 5e503c7 21/27: [gnus-mock] Skeleton code for Gnus Mock interactive tests, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 4d53dcf 22/27: * gnus-mock.el: Remove redundant :group args, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 84c6b96 27/27: * .gitignore: New file, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 7c1d7b1 16/27: [gnus-mock] Set a value of default-directory for child Emacs process, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock bfaa249 17/27: [gnus-mock] Set gnus-verbose to max by default, bump to 0.4.0, Stefan Monnier, 2020/12/01
- [elpa] externals/gnus-mock 6f22e65 23/27: [gnus-mock] Protect value of gnus-mock-data-dir, bump to 0.4.3,
Stefan Monnier <=