Permalink
Browse files

Rewrote simplenote-browser-refresh so as to play well with save-excur…

…sion
  • Loading branch information...
1 parent e003dec commit cd4471acb62dd6b37964a949ff68b2e0a8eb2996 @cefstat committed May 20, 2010
Showing with 6 additions and 8 deletions.
  1. +6 −8 simplenote.el
View
@@ -441,13 +441,8 @@ setting."
(set-file-times new-filename mod-time)))))
;; Refresh the browser
- (let (curr-buf)
- (setq curr-buf (current-buffer))
- (when (get-buffer "*Simplenote*")
- (save-excursion
- (simplenote-browser-refresh))
- (switch-to-buffer curr-buf))))))
-
+ (save-excursion
+ (simplenote-browser-refresh)))))
;;; Simplenote browser
@@ -480,7 +475,10 @@ setting."
(defun simplenote-browser-refresh ()
(interactive)
- (simplenote-browse))
+ (when (get-buffer "*Simplenote*")
+ (set-buffer "*Simplenote*")
+ (simplenote-menu-setup)))
+
(defun simplenote-menu-setup ()
(let ((inhibit-read-only t))

0 comments on commit cd4471a

Please sign in to comment.