Skip to content

Commit

Permalink
Status file fixes, now that we deal with a package symbol.
Browse files Browse the repository at this point in the history
There's a difference between 'package and :package even if both are symbolp.
  • Loading branch information
dimitri committed Sep 23, 2011
1 parent f760b1a commit 976ca29
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 6 additions & 0 deletions el-get-core.el
Expand Up @@ -77,6 +77,12 @@ returning a list that contains it (and only it)."
(if (listp element-or-list) element-or-list
(list element-or-list)))

(defun el-get-source-name (source)
"Return the package name (stringp) given an `el-get-sources'
entry."
(if (symbolp source) (symbol-name source)
(format "%s" (plist-get source :name))))


;;
;; Common support bits
Expand Down
7 changes: 0 additions & 7 deletions el-get-custom.el
Expand Up @@ -44,13 +44,6 @@
)
;;; END "Fuzzy" data structure support

(defun el-get-source-name (source)
"Return the package name (stringp) given an `el-get-sources'
entry."
(if (symbolp source) (symbol-name source)
(format "%s" (plist-get source :name))))


(defconst el-get-build-recipe-body
'(choice :tag "Format"

Expand Down
6 changes: 4 additions & 2 deletions el-get-status.el
Expand Up @@ -23,7 +23,9 @@

(defun el-get-package-symbol (package-name)
"Returns a symbol :package."
(if (symbolp package-name) package-name
(if (and (symbolp package-name)
(string= (substring (symbol-name package-name) 0 1) ":"))
package-name
(intern (format ":%s" package-name))))

(defun el-get-package-name (package-symbol)
Expand Down Expand Up @@ -56,7 +58,7 @@
(defun el-get-list-package-names-with-status (&rest status)
"Return package names that are currently in given status"
(loop for (p s) on (el-get-read-all-packages-status) by 'cddr
if (member s status) collect (el-get-package-name p)))
when (member s status) collect (el-get-package-name p)))

(defun el-get-read-package-with-status (action &rest status)
"Read a package name in given status"
Expand Down

0 comments on commit 976ca29

Please sign in to comment.