From: Michael Albinus Date: Mon, 27 Dec 2010 17:52:17 +0000 (+0100) Subject: * net/secrets.el (secrets-delete-alias): New defun. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~278^2~57 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c145d5d06aff906d311f95bff3ccc2cb424580a;p=emacs.git * net/secrets.el (secrets-delete-alias): New defun. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d49053085c1..d4023ba55cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-27 Michael Albinus + + * net/secrets.el (secrets-delete-alias): New defun. + 2010-12-27 Michael Albinus * net/tramp.el (tramp-default-user-alist): Do not add "ssh" based diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 4487407971f..33376418025 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -448,10 +448,9 @@ If there is no such COLLECTION, return nil." ;; Check the collections. (catch 'collection-found (dolist (collection-path (secrets-get-collections) nil) - (when - (string-equal - collection - (secrets-get-collection-property collection-path "Label")) + (when (string-equal + collection + (secrets-get-collection-property collection-path "Label")) (throw 'collection-found collection-path)))))) (defun secrets-create-collection (collection) @@ -490,6 +489,13 @@ For the time being, only the alias \"default\" is supported." secrets-interface-service "SetAlias" alias :object-path collection-path)))) +(defun secrets-delete-alias (alias) + "Delete ALIAS, referencing to a collection." + (dbus-call-method + :session secrets-service secrets-path + secrets-interface-service "SetAlias" + alias :object-path secrets-empty-path)) + (defun secrets-unlock-collection (collection) "Unlock collection labelled COLLECTION. If successful, return the object path of the collection."