branch: master commit 87f211dd3cd6a2cb2fe1063336462b9130feeb2f Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
* packages/javaimp/javaimp.el: Fix some compiler warnings --- packages/javaimp/javaimp.el | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/javaimp/javaimp.el b/packages/javaimp/javaimp.el index 68079c0..ca1a710 100644 --- a/packages/javaimp/javaimp.el +++ b/packages/javaimp/javaimp.el @@ -1,6 +1,6 @@ ;;; javaimp.el --- Add and reorder Java import statements in Maven projects -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. ;; Author: Filipp Gunbin <fgun...@fastmail.fm> ;; Maintainer: Filipp Gunbin <fgun...@fastmail.fm> @@ -90,6 +90,9 @@ ;;; User options +(defgroup javaimp () + "Add and reorder Java import statements in Maven projects.") + (defcustom javaimp-import-group-alist '(("\\`javax?\\." . 10)) "Specifies how to group classes and how to order resulting groups in the imports list. Each element should be of the form `(CLASSNAME-REGEXP @@ -191,6 +194,8 @@ class name. The order of classes which were not matched is defined by ;; An artifact is represented as a list: (GROUP-ID ARTIFACT-ID VERSION). +;; FIXME: use cl-defstruct! + (defun javaimp-make-artifact (group-id artifact-id version) (list group-id artifact-id version)) @@ -201,13 +206,13 @@ class name. The order of classes which were not matched is defined by (cadr artifact)) (defun javaimp-artifact-version (artifact) - (caddr artifact)) + (nth 2 artifact)) (defun javaimp-artifact-to-string (artifact) (format "%s:%s:%s" (javaimp-artifact-artifact-id artifact) (javaimp-artifact-group-id artifact) - (javaimp-artifact-version (artifact)))) + (javaimp-artifact-version artifact))) ;FIXME: `artifact' is not a function! (defun javaimp-parse-artifact (artifact) (apply #'javaimp-make-artifact (split-string artifact ":"))) @@ -271,7 +276,7 @@ with POM" (javaimp-call-mvn pom "help:effective-pom" (lambda () - (let (xml-start-pos xml-end-pos start-tag) + (let (xml-start-pos xml-end-pos) ;; find where we should start parsing XML (goto-char (point-min)) (re-search-forward "<\\?xml\\|<projects?>")