emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 0ead54c 4/4: Merge commit 'dea0ba6347f2eb5be310826e7917eff


From: Artur Malabarba
Subject: [elpa] master 0ead54c 4/4: Merge commit 'dea0ba6347f2eb5be310826e7917effb73e1e600'
Date: Mon, 12 Jan 2015 11:29:55 +0000

branch: master
commit 0ead54c6ffb0e744fbbc32c9dd8614856ebbc354
Merge: 8cec226 dea0ba6
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Merge commit 'dea0ba6347f2eb5be310826e7917effb73e1e600'
---
 packages/names/names.el |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/packages/names/names.el b/packages/names/names.el
index 2f9087b..54b97ee 100644
--- a/packages/names/names.el
+++ b/packages/names/names.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <address@hidden>
 ;; Maintainer: Artur Malabarba <address@hidden>
 ;; URL: http://github.com/Bruce-Connor/names
-;; Version: 20141119
+;; Version: 20150114
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: extensions lisp
 ;; Prefix: names
@@ -185,7 +185,7 @@ Used to define a constant and a command.")
 (defconst names--keyword-list
   '((:group
      1 (lambda (x)
-         (if (symbolp x)
+         (if (or (symbolp x) (listp x))
              (setq names--group-parent x)
            (names--warn
             "Argument given to :group is not a symbol: %s" x)))
@@ -194,6 +194,10 @@ The name of the group is the package name (see :package 
keyword).
 This keyword should be given one argument, the name of the PARENT
 group as an unquoted symbol.
 
+Alternatively, the argument can be a list, in which case it is a
+list of arguments to be passed to `defgroup' (essentially, a full
+group definition without the leading `defgroup').
+
 If this keyword is provided, besides including a defgroup, Names
 will also include a :group keyword in every `defcustom' (and
 similar forms) that don't already contain one.")
@@ -546,10 +550,12 @@ Decide package name based on several factors. In order:
 
 (defun names--generate-defgroup ()
   "Return a `defgroup' form for the current namespace."
-  (list 'defgroup (names--package-name) nil
-        (format "Customization group for %s." (names--package-name))
-        :prefix (symbol-name names--name)
-        :group `',names--group-parent))
+  (if (listp names--group-parent)
+      (cons 'defgroup names--group-parent)
+    (list 'defgroup (names--package-name) nil
+          (format "Customization group for %s." (names--package-name))
+          :prefix (symbol-name names--name)
+          :group `',names--group-parent)))
 
 (defun names--generate-version ()
   "Return a `defun' and a `defconst' forms declaring the package version.
@@ -563,6 +569,8 @@ Also adds `version' to `names--fbound' and `names--bound'."
    (list 'defun (names--prepend 'version) nil
          (format "Version of the %s package." (names--package-name))
          '(interactive)
+         `(message
+           ,(format "%s version: %s" (names--package-name) names--version))
          names--version)))
 
 (defun names--add-macro-to-environment (form)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]