From d067480f26dcd17d9f99227d59b248b83be65ffd Mon Sep 17 00:00:00 2001 From: keiichi Date: Thu, 8 Oct 1998 00:37:33 +0000 Subject: [PATCH] Sync up with Semi-gnus 6.8.19. --- ChangeLog | 18 ++++++++++++++++++ lisp/gnus.el | 2 +- lisp/message.el | 20 +++++++++++++++++--- lisp/nnagent.el | 3 ++- lisp/nnheader.el | 14 ++++++++++++++ lisp/pop3-fma.el | 2 ++ 6 files changed, 54 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a693594..6137efa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +1998-10-08 Keiichi Suzuki + + * Sync up with Semi-gnus 6.8.19 + +1998-10-08 Katsumi Yamaoka + + * lisp/message.el (message-mode-map): Define key `C-x k'. + (message-kill-buffer): Change the prompt string. + (message-kill-buffer): Refer to + `message-kill-buffer-query-function'. + (message-kill-buffer-query-function): New user option. + + * lisp/nnheader.el (nnheader-Y-or-n-p): New function. + +1998-10-07 Yoshiki Hayashi + + * lisp/nnagent.el (nnagent-open-server): Small bug fix. + 1998-10-07 Keiichi Suzuki * lisp/gnus.el (gnus-version-number): Change to "6.8.19.2" diff --git a/lisp/gnus.el b/lisp/gnus.el index bb1ed1d..dc90593 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,7 +253,7 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "Nana-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.8.19.2" +(defconst gnus-version-number "6.8.19.3" "Version number for this version of gnus.") (defconst gnus-version diff --git a/lisp/message.el b/lisp/message.el index ab9229d..a878ef0 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -271,6 +271,15 @@ should return the new buffer name." :group 'message-buffers :type 'boolean) +(defcustom message-kill-buffer-query-function 'yes-or-no-p + "*A function called to query the user whether to kill buffer anyway or not. +If it is t, the buffer will be killed peremptorily." + :type '(radio (function-item yes-or-no-p) + (function-item y-or-n-p) + (function-item nnheader-Y-or-n-p) + (function :tag "Other" t)) + :group 'message-buffers) + (defvar gnus-local-organization) (defcustom message-user-organization (or (and (boundp 'gnus-local-organization) @@ -1284,7 +1293,9 @@ Return the number of headers removed." (define-key message-mode-map "\C-c\C-z" 'message-kill-to-signature) (define-key message-mode-map "\M-\r" 'message-newline-and-reformat) - (define-key message-mode-map "\t" 'message-tab)) + (define-key message-mode-map "\t" 'message-tab) + + (define-key message-mode-map "\C-xk" 'message-kill-buffer)) (easy-menu-define message-mode-menu message-mode-map "Message Menu." @@ -1952,14 +1963,17 @@ The text will also be indented the normal way." "Kill the current buffer." (interactive) (when (or (not (buffer-modified-p)) - (yes-or-no-p "Message modified; kill anyway? ")) + (eq t message-kill-buffer-query-function) + (funcall message-kill-buffer-query-function + "The buffer modified; kill anyway? ")) (let ((actions message-kill-actions) (frame (selected-frame)) (org-frame message-original-frame)) (setq buffer-file-name nil) (kill-buffer (current-buffer)) (message-do-actions actions) - (message-delete-frame frame org-frame)))) + (message-delete-frame frame org-frame))) + (message "")) (defun message-delete-frame (frame org-frame) "Delete frame for editing message." diff --git a/lisp/nnagent.el b/lisp/nnagent.el index 714a07a..1989225 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -73,7 +73,8 @@ (ftp-error (setq err (format "%s" arg))))) (nnagent-close-server) (nnheader-report - 'nnagent (or err "No such file or directory: %s" dir))) + 'nnagent (or err + (format "No such file or directory: %s" dir)))) ((not (file-directory-p (file-truename dir))) (nnagent-close-server) (nnheader-report 'nnagent "Not a directory: %s" dir)) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index bc725b6..4c220ba 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -856,6 +856,20 @@ find-file-hooks, etc. (fset 'nnheader-cancel-timer 'cancel-timer) (fset 'nnheader-cancel-function-timers 'cancel-function-timers) +(defun nnheader-Y-or-n-p (prompt) + "Ask user a \"Y/n\" question. Return t if answer is neither \"n\", \"N\" nor \"C-g\"." + (if (and (featurep 'xemacs) (should-use-dialog-box-p)) + (yes-or-no-p-dialog-box prompt) + (let ((cursor-in-echo-area t) + (echo-keystrokes 0) + (log-message-max-size 0) + (inhibit-quit t) + message-log-max ans) + (while (not (memq ans '(?\ ?N ?Y ?\C-g ?\e ?\n ?\r ?n ?y))) + (message "%s(Y/n) " prompt) + (setq ans (read-char-exclusive))) + (not (memq ans '(?\C-g ?N ?n)))))) + (when (string-match "XEmacs\\|Lucid" emacs-version) (require 'nnheaderxm)) diff --git a/lisp/pop3-fma.el b/lisp/pop3-fma.el index 18638a1..25c942a 100644 --- a/lisp/pop3-fma.el +++ b/lisp/pop3-fma.el @@ -343,3 +343,5 @@ Argument PROMPT ." (provide 'pop3-fma) ;; ;; pop3-fma.el ends here. + + -- 1.7.10.4