* lisp/emacs-lisp/package.el (package-desc): Simplify.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Oct 2013 15:52:53 +0000 (11:52 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Oct 2013 15:52:53 +0000 (11:52 -0400)
Fixes: debbugs:15495

lisp/ChangeLog
lisp/emacs-lisp/package.el

index facdb23..8707c02 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/package.el (package-desc): Simplify (bug#15495).
+
 2013-10-01  Mitchel Humpherys  <mitch.special@gmail.com>  (tiny change)
 
        * vc/vc-git.el (vc-git-grep): Disable pager.
index e46f047..ec01d16 100644 (file)
@@ -309,13 +309,12 @@ contrast, `package-user-dir' contains packages for personal use."
                  (kind (plist-get rest-plist :kind))
                  (archive (plist-get rest-plist :archive))
                  (extras (let (alist)
-                           (cl-remf rest-plist :kind)
-                           (cl-remf rest-plist :archive)
                            (while rest-plist
-                             (let ((value (cadr rest-plist)))
-                               (when value
-                                 (push (cons (car rest-plist) value)
-                                       alist)))
+                             (unless (memq (car rest-plist) '(:kind :archive))
+                               (let ((value (cadr rest-plist)))
+                                 (when value
+                                   (push (cons (car rest-plist) value)
+                                         alist))))
                              (setq rest-plist (cddr rest-plist)))
                            alist)))))
   "Structure containing information about an individual package.