commit: 9cac3b80338e44d6b6406eae1d541617f9304c1e Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Mar 4 21:40:28 2017 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Mar 4 21:40:28 2017 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=9cac3b80
Add https:// to completions for HOMEPAGE and SRC_URI. * ebuild-mode.el (ebuild-mode-protocols-homepage) (ebuild-mode-protocols-src_uri): New variables. (ebuild-mode-insert-skeleton): Add https:// to completions for HOMEPAGE and SRC_URI. ChangeLog | 5 +++++ ebuild-mode.el | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f8877b..63838a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-03-04 Ulrich Müller <[email protected]> + * ebuild-mode.el (ebuild-mode-protocols-homepage) + (ebuild-mode-protocols-src_uri): New variables. + (ebuild-mode-insert-skeleton): Add https:// to completions + for HOMEPAGE and SRC_URI. + * ebuild-mode.el (ebuild-mode-update-copyright): Modify the buffer only if necessary. Warn about equal first and last year. diff --git a/ebuild-mode.el b/ebuild-mode.el index b11b5d9..859257f 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -141,6 +141,12 @@ of lines." (defvar ebuild-mode-cvs-header-regexp "^#[ \t]*\\$\\(Id\\|Header\\)\\(: .*\\)?\\$[ \t]*$") +(defvar ebuild-mode-protocols-homepage + '("http://" "https://" "ftp://")) + +(defvar ebuild-mode-protocols-src_uri + '("http://" "https://" "ftp://" "mirror://")) + (defvar ebuild-mode-licenses (condition-case nil (directory-files (concat ebuild-mode-portdir "/licenses") @@ -472,10 +478,13 @@ and `all-completions' for details." & -1 & "\n\n" | -8 ;; first variables block "DESCRIPTION=\"" (skeleton-read "Description: ") "\"\n" - "HOMEPAGE=\"" (completing-read "Homepage: " '(("http://"))) "\"\n" + "HOMEPAGE=\"" + (completing-read "Homepage: " + (mapcar 'list ebuild-mode-protocols-homepage)) + "\"\n" "SRC_URI=\"" - (completing-read - "Source URI: " (mapcar 'list '("http://" "ftp://" "mirror://"))) + (completing-read "Source URI: " + (mapcar 'list ebuild-mode-protocols-src_uri)) "\"\n" "\n" ;; second variables block
