[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104805: Add plstore-revert, hide buf
From: |
Daiki Ueno |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104805: Add plstore-revert, hide buffer from user. |
Date: |
Thu, 30 Jun 2011 18:45:44 +0900 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104805
committer: Daiki Ueno <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-30 18:45:44 +0900
message:
Add plstore-revert, hide buffer from user.
* plstore.el (plstore-revert): New function.
(plstore-open): Use it; hide the buffer from user.
modified:
lisp/gnus/ChangeLog
lisp/gnus/plstore.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-06-30 07:27:25 +0000
+++ b/lisp/gnus/ChangeLog 2011-06-30 09:45:44 +0000
@@ -1,5 +1,10 @@
2011-06-30 Daiki Ueno <address@hidden>
+ * plstore.el (plstore-revert): New function.
+ (plstore-open): Use it; hide the buffer from user.
+
+2011-06-30 Daiki Ueno <address@hidden>
+
* auth-source.el (auth-source-backend): New member "arg".
(auth-source-backend-parse): Handle new backend 'plstore.
* plstore.el: New file.
=== modified file 'lisp/gnus/plstore.el'
--- a/lisp/gnus/plstore.el 2011-06-30 07:27:25 +0000
+++ b/lisp/gnus/plstore.el 2011-06-30 09:45:44 +0000
@@ -117,18 +117,24 @@
nil ;secret plist (plist)
nil ;merged plist (plist)
)))
- (with-current-buffer (plstore--get-buffer store)
- (goto-char (point-min))
- (when (looking-at ";;; public entries\n")
+ (plstore-revert store)
+ store))
+
+(defun plstore-revert (plstore)
+ "Replace current data in PLSTORE with the file on disk."
+ (with-current-buffer (plstore--get-buffer plstore)
+ ;; make the buffer invisible from user
+ (rename-buffer (format " plstore %s" (buffer-file-name)))
+ (goto-char (point-min))
+ (when (looking-at ";;; public entries\n")
+ (forward-line)
+ (plstore--set-alist plstore (read (point-marker)))
+ (forward-sexp)
+ (forward-char)
+ (when (looking-at ";;; secret entries\n")
(forward-line)
- (plstore--set-alist store (read (point-marker)))
- (forward-sexp)
- (forward-char)
- (when (looking-at ";;; secret entries\n")
- (forward-line)
- (plstore--set-encrypted-data store (read (point-marker))))
- (plstore--merge-secret store)))
- store))
+ (plstore--set-encrypted-data plstore (read (point-marker))))
+ (plstore--merge-secret plstore))))
(defun plstore-close (plstore)
"Destroy a plstore instance PLSTORE."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104805: Add plstore-revert, hide buffer from user.,
Daiki Ueno <=