Commit a4acb88d authored by Julien Danjou's avatar Julien Danjou Committed by Katsumi Yamaoka

gnus/{sieve-mode,sieve}.el: Close buffers by default

parent 8dc2e44a
2012-07-18 Julien Danjou <>
* sieve-mode.el (sieve-mode-map): Bind C-c C-c to
* sieve.el (sieve-bury-buffer): Remove function.
(sieve-manage-mode-map): Map "q" to `kill-buffer'.
(sieve-upload-and-kill): New function, mapped to C-c C-c.
2012-07-17 Andreas Schwab <>
* shr.el (shr-expand-url): Handle URL starting with `//'.
......@@ -173,7 +173,7 @@
(defvar sieve-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-l" 'sieve-upload)
(define-key map "\C-c\C-c" 'sieve-upload-and-bury)
(define-key map "\C-c\C-c" 'sieve-upload-and-kill)
(define-key map "\C-c\C-m" 'sieve-manage)
"Key map used in sieve mode.")
......@@ -109,7 +109,7 @@ require \"fileinto\";
;; various
(define-key map "?" 'sieve-help)
(define-key map "h" 'sieve-help)
(define-key map "q" 'sieve-bury-buffer)
(define-key map "q" 'kill-buffer)
;; activating
(define-key map "m" 'sieve-activate)
(define-key map "u" 'sieve-deactivate)
......@@ -250,29 +250,6 @@ Used to bracket operations which move point in the sieve-buffer."
(message "%s" (substitute-command-keys
"`\\[sieve-edit-script]':edit `\\[sieve-activate]':activate `\\[sieve-deactivate]':deactivate `\\[sieve-remove]':remove"))))
(defun sieve-bury-buffer (buf &optional mainbuf)
"Hide the buffer BUF that was temporarily popped up.
BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
(interactive (list (current-buffer)))
(let ((win (if (eq buf (window-buffer (selected-window))) (selected-window)
(get-buffer-window buf t))))
(when win
(if (window-dedicated-p win)
(condition-case ()
(delete-window win)
(error (iconify-frame (window-frame win))))
(if (and mainbuf (get-buffer-window mainbuf))
(delete-window win)))))
(with-current-buffer buf
(bury-buffer (unless (and (eq buf (window-buffer (selected-window)))
(not (window-dedicated-p (selected-window))))
(when mainbuf
(let ((mainwin (or (get-buffer-window mainbuf)
(get-buffer-window mainbuf 'visible))))
(when mainwin (select-window mainwin))))))
;; Create buffer:
(defun sieve-setup-buffer (server port)
......@@ -389,6 +366,12 @@ Server : " server ":" (or port "2000") "
(sieve-upload name)
(defun sieve-upload-and-kill (&optional name)
(sieve-upload name)
(provide 'sieve)
;; sieve.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment