1 |
commit: 9cac3b80338e44d6b6406eae1d541617f9304c1e |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 4 21:40:28 2017 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 4 21:40:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=9cac3b80 |
7 |
|
8 |
Add https:// to completions for HOMEPAGE and SRC_URI. |
9 |
|
10 |
* ebuild-mode.el (ebuild-mode-protocols-homepage) |
11 |
(ebuild-mode-protocols-src_uri): New variables. |
12 |
(ebuild-mode-insert-skeleton): Add https:// to completions |
13 |
for HOMEPAGE and SRC_URI. |
14 |
|
15 |
ChangeLog | 5 +++++ |
16 |
ebuild-mode.el | 15 ++++++++++++--- |
17 |
2 files changed, 17 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/ChangeLog b/ChangeLog |
20 |
index 4f8877b..63838a4 100644 |
21 |
--- a/ChangeLog |
22 |
+++ b/ChangeLog |
23 |
@@ -1,5 +1,10 @@ |
24 |
2017-03-04 Ulrich Müller <ulm@g.o> |
25 |
|
26 |
+ * ebuild-mode.el (ebuild-mode-protocols-homepage) |
27 |
+ (ebuild-mode-protocols-src_uri): New variables. |
28 |
+ (ebuild-mode-insert-skeleton): Add https:// to completions |
29 |
+ for HOMEPAGE and SRC_URI. |
30 |
+ |
31 |
* ebuild-mode.el (ebuild-mode-update-copyright): Modify the buffer |
32 |
only if necessary. Warn about equal first and last year. |
33 |
|
34 |
|
35 |
diff --git a/ebuild-mode.el b/ebuild-mode.el |
36 |
index b11b5d9..859257f 100644 |
37 |
--- a/ebuild-mode.el |
38 |
+++ b/ebuild-mode.el |
39 |
@@ -141,6 +141,12 @@ of lines." |
40 |
(defvar ebuild-mode-cvs-header-regexp |
41 |
"^#[ \t]*\\$\\(Id\\|Header\\)\\(: .*\\)?\\$[ \t]*$") |
42 |
|
43 |
+(defvar ebuild-mode-protocols-homepage |
44 |
+ '("http://" "https://" "ftp://")) |
45 |
+ |
46 |
+(defvar ebuild-mode-protocols-src_uri |
47 |
+ '("http://" "https://" "ftp://" "mirror://")) |
48 |
+ |
49 |
(defvar ebuild-mode-licenses |
50 |
(condition-case nil |
51 |
(directory-files (concat ebuild-mode-portdir "/licenses") |
52 |
@@ -472,10 +478,13 @@ and `all-completions' for details." |
53 |
& -1 & "\n\n" | -8 |
54 |
;; first variables block |
55 |
"DESCRIPTION=\"" (skeleton-read "Description: ") "\"\n" |
56 |
- "HOMEPAGE=\"" (completing-read "Homepage: " '(("http://"))) "\"\n" |
57 |
+ "HOMEPAGE=\"" |
58 |
+ (completing-read "Homepage: " |
59 |
+ (mapcar 'list ebuild-mode-protocols-homepage)) |
60 |
+ "\"\n" |
61 |
"SRC_URI=\"" |
62 |
- (completing-read |
63 |
- "Source URI: " (mapcar 'list '("http://" "ftp://" "mirror://"))) |
64 |
+ (completing-read "Source URI: " |
65 |
+ (mapcar 'list ebuild-mode-protocols-src_uri)) |
66 |
"\"\n" |
67 |
"\n" |
68 |
;; second variables block |