 
 
 (defun enh-menu-is-visible-on-ordinary-mode ()
-	(not evernote-browsing-mode))
+  (not evernote-browsing-mode))
 
 (defun enh-menu-is-visible-on-evernote-mode ()
-	(and evernote-mode (not evernote-browsing-mode)))
+  (and evernote-mode (not evernote-browsing-mode)))
 
 (defun enh-menu-is-visible-on-evernote-browsing-mode ()
-	evernote-browsing-mode)
+  evernote-browsing-mode)
 
 (let ((menu-bar-map (make-sparse-keymap "Evernote")))
-	(define-key-after global-map [menu-bar evernote]
-		`(menu-item "Evernote" ,menu-bar-map
-								:visible evernote-mode-display-menu)
-		'tools)
-	(define-key menu-bar-map [browser]
-		'(menu-item "Evernote Browser" evernote-browser
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [seperator-0]
-		'(menu-item "--" nil
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [toggle-read-only]
-		'(menu-item "Toggle Read Only" evernote-toggle-read-only
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [delete-note]
-		'(menu-item "Delete Note" evernote-delete-note
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [rename-note]
-		'(menu-item "Rename Note" evernote-rename-note
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [change-edit-mode]
-		'(menu-item "Change Edit Mode" evernote-change-edit-mode
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [edit-tag]
-		'(menu-item "Edit Tag" evernote-edit-tags
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [save-note]
-		'(menu-item "Save Note" evernote-save-note
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [seperator-1]
-		'(menu-item "--" nil
-								:visible (enh-menu-is-visible-on-evernote-mode)))
-	(define-key menu-bar-map [edit-search]
-		'(menu-item "Edit Saved Search" evernote-edit-search
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [create-search]
-		'(menu-item "Create Saved Search" evernote-create-search
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [do-saved-search]
-		'(menu-item "Do Saved Search" evernote-do-saved-search
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [search-note]
-		'(menu-item "Search Note" evernote-search-notes
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [seperator-2]
-		'(menu-item "--" nil
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [post-region]
-		'(menu-item "Post Region" evernote-post-region
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [write-note]
-		'(menu-item "Write Note" evernote-write-note
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [create-note]
-		'(menu-item "Create Note" evernote-create-note
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [open-note]
-		'(menu-item "Open Note" evernote-open-note
-								:visible (enh-menu-is-visible-on-ordinary-mode)))
-	(define-key menu-bar-map [browsing-prev-page]
-		'(menu-item "Prev Page" evernote-browsing-prev-page
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode)))
-	(define-key menu-bar-map [browsing-next-page]
-		'(menu-item "Next Page" evernote-browsing-next-page
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode)))
-	(define-key menu-bar-map [browsing-search-notes]
-		'(menu-item "Searche Notes" evernote-browsing-search-notes
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode)))
-	(define-key menu-bar-map [browsing-list-searches]
-		'(menu-item "List Saved Searches" evernote-browsing-list-searches
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode)))
-	(define-key menu-bar-map [browsing-list-tags]
-		'(menu-item "List Tags" evernote-browsing-list-tags
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode)))
-	(define-key menu-bar-map [browsing-list-notebooks]
-		'(menu-item "List Notebooks" evernote-browsing-list-notebooks
-								:visible (enh-menu-is-visible-on-evernote-browsing-mode))))
+  (define-key-after global-map [menu-bar evernote]
+    `(menu-item "Evernote" ,menu-bar-map
+                :visible evernote-mode-display-menu)
+    'tools)
+  (define-key menu-bar-map [browser]
+    '(menu-item "Evernote Browser" evernote-browser
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [seperator-0]
+    '(menu-item "--" nil
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [toggle-read-only]
+    '(menu-item "Toggle Read Only" evernote-toggle-read-only
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [delete-note]
+    '(menu-item "Delete Note" evernote-delete-note
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [rename-note]
+    '(menu-item "Rename Note" evernote-rename-note
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [change-edit-mode]
+    '(menu-item "Change Edit Mode" evernote-change-edit-mode
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [edit-tag]
+    '(menu-item "Edit Tag" evernote-edit-tags
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [save-note]
+    '(menu-item "Save Note" evernote-save-note
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [seperator-1]
+    '(menu-item "--" nil
+                :visible (enh-menu-is-visible-on-evernote-mode)))
+  (define-key menu-bar-map [edit-search]
+    '(menu-item "Edit Saved Search" evernote-edit-search
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [create-search]
+    '(menu-item "Create Saved Search" evernote-create-search
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [do-saved-search]
+    '(menu-item "Do Saved Search" evernote-do-saved-search
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [search-note]
+    '(menu-item "Search Note" evernote-search-notes
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [seperator-2]
+    '(menu-item "--" nil
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [post-region]
+    '(menu-item "Post Region" evernote-post-region
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [write-note]
+    '(menu-item "Write Note" evernote-write-note
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [create-note]
+    '(menu-item "Create Note" evernote-create-note
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [open-note]
+    '(menu-item "Open Note" evernote-open-note
+                :visible (enh-menu-is-visible-on-ordinary-mode)))
+  (define-key menu-bar-map [browsing-prev-page]
+    '(menu-item "Prev Page" evernote-browsing-prev-page
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode)))
+  (define-key menu-bar-map [browsing-next-page]
+    '(menu-item "Next Page" evernote-browsing-next-page
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode)))
+  (define-key menu-bar-map [browsing-search-notes]
+    '(menu-item "Searche Notes" evernote-browsing-search-notes
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode)))
+  (define-key menu-bar-map [browsing-list-searches]
+    '(menu-item "List Saved Searches" evernote-browsing-list-searches
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode)))
+  (define-key menu-bar-map [browsing-list-tags]
+    '(menu-item "List Tags" evernote-browsing-list-tags
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode)))
+  (define-key menu-bar-map [browsing-list-notebooks]
+    '(menu-item "List Notebooks" evernote-browsing-list-notebooks
+                :visible (enh-menu-is-visible-on-evernote-browsing-mode))))
 
 
 (defun evernote-mode (&optional guid)

        (setq evernote-note-modified-edit-mode
              (enutil-aget 'modified-edit-mode evernote-mode-info-for-changing-major-mode))
        (evernote-mode ; this must be after setting evernote-note-modified-xxx
              (enutil-aget 'guid evernote-mode-info-for-changing-major-mode))
        (setq evernote-note-xhtml-mode-content
              (enutil-aget 'note-xhtml-mode-content evernote-mode-info-for-changing-major-mode))
        (setq evernote-mode-info-for-changing-major-mode nil))))

  (when evernote-password-cache
    (with-current-buffer (get-buffer-create enh-password-cache-buffer)
      (write-region (prin1-to-string user-password) nil
                    enh-password-cache-file))))


(defun enh-password-cache-close ()
