From 990160ab96b63075f04a0a662fa35fe207ee2964 Mon Sep 17 00:00:00 2001 From: keiichi Date: Fri, 16 Oct 1998 01:27:32 +0000 Subject: [PATCH] * lisp/gnus.el (gnus-version-number): Change to 6.8.19.5. * Sync up with Semi-gnus 6.8.19 --- ChangeLog | 21 +++++++++++++++++++++ lisp/gnus.el | 2 +- lisp/nnheader.el | 21 ++++++++++++--------- lisp/nnheaderxm.el | 21 +++++++++++++++++++++ lisp/pop3-fma.el | 26 +++++++++++++++++++++----- 5 files changed, 76 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index f828ab6..db00c16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-10-16 Keiichi Suzuki + + * lisp/gnus.el (gnus-version-number): Change to 6.8.19.5. + + * Sync up with Semi-gnus 6.8.19 + 1998-10-15 Keiichi Suzuki * lisp/gnus.el (gnus-version-number): Change to 6.8.19.4. @@ -6,6 +12,21 @@ update `gnus-format-specs' when `gnus-version' is differ from saved version. +1998-10-14 Katsumi Yamaoka + + * lisp/pop3-fma.el (pop3-fma-read-char-exclusive): New macro. Use + `next-command-event' instead of `read-char-exclusive' under XEmacs. + (pop3-fma-read-noecho): Use it. + +1998-10-13 Katsumi Yamaoka + + * lisp/nnheaderxm.el (nnheader-xmas-Y-or-n-p): New function. + It will be used for the substitute of `nnheader-Y-or-n-p' under + XEmacs. + + * lisp/nnheader.el (nnheader-Y-or-n-p): Rewrite for Emacs 19 or + later except for XEmacs. + 1998-10-08 Keiichi Suzuki * Sync up with Semi-gnus 6.8.19 diff --git a/lisp/gnus.el b/lisp/gnus.el index da65088..67b3452 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.4" +(defconst gnus-version-number "6.8.19.5" "Version number for this version of gnus.") (defconst gnus-version diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 4c220ba..f0835cd 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -858,17 +858,20 @@ find-file-hooks, etc. (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) + (let ((cursor-in-echo-area t) + (echo-keystrokes 0) + (inhibit-quit t) + ans) + (let (message-log-max) (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)))))) + (setq ans (read-char-exclusive)))) + (if (memq ans '(?\C-g ?N ?n)) + (progn + (message "%s(Y/n) No" prompt) + nil) + (message "%s(Y/n) Yes" prompt) + t))) (when (string-match "XEmacs\\|Lucid" emacs-version) (require 'nnheaderxm)) diff --git a/lisp/nnheaderxm.el b/lisp/nnheaderxm.el index f788042..7c1435c 100644 --- a/lisp/nnheaderxm.el +++ b/lisp/nnheaderxm.el @@ -32,9 +32,30 @@ (,function ,@args)) time repeat)) +(defun nnheader-xmas-Y-or-n-p (prompt) + "Ask user a \"Y/n\" question. Return t if answer is neither \"n\", \"N\" nor \"C-g\"." + (if (should-use-dialog-box-p) + (yes-or-no-p-dialog-box prompt) + (let ((cursor-in-echo-area t) + (echo-keystrokes 0) + (inhibit-quit t) + event) + (message "%s(Y/n) " prompt) + (while (or (not (key-press-event-p (setq event (next-command-event)))) + (not (or (eq (event-key event) 'escape) + (memq (event-to-character event) + '(?\ ?N ?Y ?\C-g ?\e ?\n ?\r ?n ?y)))))) + (if (memq (event-key event) '(?\C-g ?N ?n)) + (progn + (message "%s(Y/n) No" prompt) + nil) + (message "%s(Y/n) Yes" prompt) + t)))) + (fset 'nnheader-run-at-time 'nnheader-xmas-run-at-time) (fset 'nnheader-cancel-timer 'delete-itimer) (fset 'nnheader-cancel-function-timers 'ignore) +(fset 'nnheader-Y-or-n-p 'nnheader-xmas-Y-or-n-p) (provide 'nnheaderxm) diff --git a/lisp/pop3-fma.el b/lisp/pop3-fma.el index 25c942a..9801644 100644 --- a/lisp/pop3-fma.el +++ b/lisp/pop3-fma.el @@ -272,6 +272,22 @@ Please do not set this valiable non-nil if you do not use Meadow.") (car spool)) pop3-fma-spool-file-alist)))) ;; +(defmacro pop3-fma-read-char-exclusive () + (cond ((featurep 'xemacs) + '(let ((table (quote ((backspace . ?\C-h) (delete . ?\C-?) + (left . ?\C-h)))) + event key) + (while (not + (and + (key-press-event-p (setq event (next-command-event))) + (setq key (or (event-to-character event) + (cdr (assq (event-key event) table))))))) + key)) + ((fboundp 'read-char-exclusive) + '(read-char-exclusive)) + (t + '(read-char)))) +;; (defun pop3-fma-read-noecho (prompt &optional stars) "Read a single line of text from user without echoing, and return it. Argument PROMPT ." @@ -290,15 +306,15 @@ Argument PROMPT ." (and (> truncate 0) (setq msg (concat "$" (substring msg (1+ truncate)))))) (message msg) - (setq c (read-char-exclusive)) - (cond ((= c ?\C-g) + (setq c (pop3-fma-read-char-exclusive)) + (cond ((eq ?\C-g c) (setq quit-flag t done t)) - ((or (= c ?\r) (= c ?\n) (= c ?\e)) + ((memq c '(?\r ?\n ?\e)) (setq done t)) - ((= c ?\C-u) + ((eq ?\C-u c) (setq ans "")) - ((and (/= c ?\b) (/= c ?\177)) + ((and (/= ?\b c) (/= ?\177 c)) (setq ans (concat ans (char-to-string c)))) ((> (length ans) 0) (setq ans (substring ans 0 -1))))) -- 1.7.10.4