From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 28C62139694 for ; Sun, 5 Mar 2017 17:51:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D49AB21C06D; Sun, 5 Mar 2017 17:51:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A793E21C06D for ; Sun, 5 Mar 2017 17:51:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B19034178B for ; Sun, 5 Mar 2017 17:51:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E930C5D79 for ; Sun, 5 Mar 2017 17:51:43 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1488665020.f642f71894e5cc98063083713606b1655d2e8434.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:ebuild-mode commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog ebuild-mode.el X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: f642f71894e5cc98063083713606b1655d2e8434 X-VCS-Branch: ebuild-mode Date: Sun, 5 Mar 2017 17:51:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e33d5ca1-699f-44f1-a6d8-6d03fbbddb04 X-Archives-Hash: 69377c2547ffa87f531c850bf1cea53f commit: f642f71894e5cc98063083713606b1655d2e8434 Author: Ulrich Müller gentoo org> AuthorDate: Sat Mar 4 22:03:40 2017 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Mar 4 22:03:40 2017 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=f642f718 Default to most recent EAPI in ebuild skeleton. * ebuild-mode.el (ebuild-mode-eapi-list): New custom variable. (ebuild-mode-insert-skeleton): Use it in a completing-read. ChangeLog | 3 +++ ebuild-mode.el | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63838a4..845283e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2017-03-04 Ulrich Müller + * ebuild-mode.el (ebuild-mode-eapi-list): New custom variable. + (ebuild-mode-insert-skeleton): Use it in a completing-read. + * ebuild-mode.el (ebuild-mode-protocols-homepage) (ebuild-mode-protocols-src_uri): New variables. (ebuild-mode-insert-skeleton): Add https:// to completions diff --git a/ebuild-mode.el b/ebuild-mode.el index 3e00080..7b927e6 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -69,6 +69,13 @@ A formfeed is not considered whitespace by this function." :type 'string :group 'ebuild-mode) +(defcustom ebuild-mode-eapi-list + '("5" "6") + "List of supported EAPIs. +The most recent EAPI must be listed last." + :type '(repeat string) + :group 'ebuild-mode) + (defcustom ebuild-mode-fix-whitespace t "If non-nil, fix whitespace before writing a file. Namely, delete trailing whitespace and tabify whitespace at beginning @@ -465,10 +472,12 @@ and `all-completions' for details." "# Copyright 1999-" (format-time-string "%Y") " Gentoo Foundation\n" "# Distributed under the terms of the GNU General Public License v2\n" "\n" - ;; EAPI "EAPI=" - (skeleton-read "EAPI: ") - & "\n\n" | -5 + (completing-read + "EAPI: " (mapcar 'list ebuild-mode-eapi-list) + nil nil (car (last ebuild-mode-eapi-list))) ; default to most recent EAPI + "\n" + "\n" ;; inherited eclasses "inherit " ((completing-read "Eclass (null string to terminate): "