Bugfix: honor package :toggle spec when provided

This commit is contained in:
bmag 2016-03-03 18:22:05 +02:00 committed by Eivind Fonn
parent 65702c9285
commit b224c9f1e1
1 changed files with 2 additions and 0 deletions

View File

@ -367,12 +367,14 @@ Properties that can be copied are `:location', `:step' and `:excluded'."
(location (when (listp pkg) (plist-get (cdr pkg) :location)))
(step (when (listp pkg) (plist-get (cdr pkg) :step)))
(excluded (when (listp pkg) (plist-get (cdr pkg) :excluded)))
(toggle (when (listp pkg) (plist-get (cdr pkg) :toggle)))
(protected (when (listp pkg) (plist-get (cdr pkg) :protected)))
(copyp (not (null obj)))
(obj (if obj obj (cfgl-package name-str :name name-sym))))
(when location (oset obj :location location))
(when step (oset obj :step step))
(oset obj :excluded excluded)
(when toggle (oset obj :toggle toggle))
;; cannot override protected packages
(unless copyp
(oset obj :protected protected)