From db2d4a7213cb3bc5d056dae82b22d059a9703808 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 1 Sep 2010 17:21:19 +0200 Subject: Remove offlineimap-get-buffer --- offlineimap.el | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'offlineimap.el') diff --git a/offlineimap.el b/offlineimap.el index 6251845..c6a4007 100644 --- a/offlineimap.el +++ b/offlineimap.el @@ -82,14 +82,11 @@ ("^Copy message .*$" . 'offlineimap-copy-message-face)) "Faces used to highlight things in OfflineIMAP mode.") -(defun offlineimap-get-buffer () +(defun offlineimap-make-buffer () "Get the offlineimap buffer." - (let ((buffer (get-buffer offlineimap-buffer-name))) - (unless buffer - (let ((buffer (get-buffer-create offlineimap-buffer-name))) - (with-current-buffer buffer - (offlineimap-mode)) - buffer)) + (let ((buffer (get-buffer-create offlineimap-buffer-name))) + (with-current-buffer buffer + (offlineimap-mode)) buffer)) ;;;###autoload @@ -97,7 +94,7 @@ "Start OfflineIMAP." (interactive) (comint-exec - (offlineimap-get-buffer) + (offlineimap-make-buffer) "offlineimap" shell-file-name nil `("-c" ,offlineimap-command))) @@ -110,7 +107,7 @@ (defun offlineimap-resync () "Send a USR1 signal to OfflineIMAP to force accounts synchronization." (interactive) - (signal-process (get-buffer-process (offlineimap-get-buffer) 'SIGUSR1)) + (signal-process (get-buffer-process (get-buffer offlineimap-buffer-name) 'SIGUSR1)) (define-derived-mode offlineimap-mode comint-mode "OfflineIMAP" "A major mode for OfflineIMAP interaction." -- cgit v1.2.3