From 59433c91cb8d51fa178e8c9be8d2d08d16eb999d Mon Sep 17 00:00:00 2001 From: djcb Date: Fri, 22 Jun 2012 09:45:28 +0300 Subject: [PATCH] * minor --- emacs/mu4e-headers.el | 11 +++++------ emacs/mu4e-proc.el | 4 ++-- emacs/mu4e-view.el | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/emacs/mu4e-headers.el b/emacs/mu4e-headers.el index 60b41d2e..832eb323 100644 --- a/emacs/mu4e-headers.el +++ b/emacs/mu4e-headers.el @@ -1168,17 +1168,16 @@ to ensure we don't disturb other windows." (headers-visible)) (walk-windows (lambda (win) - ;; if we find a view window connected to this one, kill it + ;; if we the view window connected to this one, kill it (when (eq mu4e~headers-view-win win) (delete-window win) (setq mu4e~headers-view-win nil)) ;; and kill any _other_ (non-selected) window that shows the current ;; buffer - (when - (and - (eq curbuf (window-buffer win)) ;; does win show curbuf? - (not (eq curwin win)) ;; but it's not the curwin? - (not (one-window-p))) ;; and not the last one on the frame? + (when (and + (eq curbuf (window-buffer win)) ;; does win show curbuf? + (not (eq curwin win)) ;; it's not the curwin? + (not (one-window-p))) ;; and not the last one? (delete-window win)))) ;; delete it! ;; now, all *other* windows should be gone. kill ourselves, and return ;; to the main view diff --git a/emacs/mu4e-proc.el b/emacs/mu4e-proc.el index b4e48aa9..b66cabf8 100644 --- a/emacs/mu4e-proc.el +++ b/emacs/mu4e-proc.el @@ -77,7 +77,7 @@ the length (in hex).") (defun mu4e~proc-kill () "Kill the mu server process." (let* ((buf (get-buffer mu4e~proc-name)) - (proc (and buf (get-buffer-process buf)))) + (proc (and (buffer-live-p buf) (get-buffer-process buf)))) (when proc (let ((delete-exited-processes t)) ;; the mu server signal handler will make it quit after 'quit' @@ -283,7 +283,7 @@ terminates." ((eq code 11) (mu4e-message "Database is locked by another process")) ((eq code 19) - (mu4e-message "Database empty or non-existent; try indexing some messages")) + (mu4e-message "Database empty; try indexing some messages")) (t (mu4e-message "mu server process ended with exit code %d" code)))) (t (mu4e-message "Something bad happened to the mu server process"))))) diff --git a/emacs/mu4e-view.el b/emacs/mu4e-view.el index 9dbc41e9..d49c3f9e 100644 --- a/emacs/mu4e-view.el +++ b/emacs/mu4e-view.el @@ -218,7 +218,7 @@ REFRESH is for re-showing an already existing message. As a side-effect, a message that is being viewed loses its 'unread' marking if it still had that." - (let ((buf (get-buffer-create mu4e~view-buffer-name))) + (let ((buf (generate-new-buffer mu4e~view-buffer-name))) (with-current-buffer buf (mu4e-view-mode) (let ((inhibit-read-only t)) @@ -668,12 +668,12 @@ number them so they can be opened using `mu4e-view-go-to-url'." current message." `(progn (unless '(buffer-live-p mu4e~view-headers-buffer) - (error "no headers buffer available.")) + (error "no headers-buffer connected")) (let* ((docid (mu4e-field-at-point :docid))) (with-current-buffer mu4e~view-headers-buffer (if (and docid (mu4e~headers-goto-docid docid)) ,@body - (error "Cannot find corresponding message in headers + (error "cannot find corresponding message in headers buffer.")))))) (defun mu4e-view-headers-next(&optional n)