From 1fd94b7cc2f2437635e65ab18a73e5d7663bd625 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 17 Jan 1996 05:35:06 +0000 Subject: [PATCH] (mu-register/citation-name): use function `y-or-n-p' (mu-register/citation-name-quietly): use function `y-or-n-p' --- mu-register.el | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/mu-register.el b/mu-register.el index 676a54d..fdbc2fe 100644 --- a/mu-register.el +++ b/mu-register.el @@ -7,7 +7,7 @@ ;;; modified by MORIOKA Tomohiko ;;; Created: 1995/12/27 by MINOURA Makoto ;;; Version: -;;; $Id: mu-register.el,v 1.11 1996-01-16 21:54:27 morioka Exp $ +;;; $Id: mu-register.el,v 1.12 1996-01-17 05:35:06 morioka Exp $ ;;; ;;; This file is part of tl (Tiny Library). ;;; @@ -125,18 +125,11 @@ (tl:read-string "Citation name? " return1 'mu-register/minibuffer-history)) - (if (not (string-equal return return1)) - (let ((ans) - (cursor-in-echo-area t)) - (while (null ans) - (message (format "Register \"%s\" (y/n)? " return)) - (setq ans (read-event)) - (if (not (or (eq ans ?y) - (eq ans ?n))) - (setq ans nil))) - (message "") - (if (eq ans ?y) - (mu-register/add-citation-name return from)))) + (if (and (not (string-equal return return1)) + (y-or-n-p (format "Register \"%s\"? " return)) + ) + (mu-register/add-citation-name return from) + ) return)) (defun mu-register/citation-name-quietly () @@ -155,21 +148,11 @@ (tl:read-string "Citation name? " fullname 'mu-register/minibuffer-history)) - (if (not (string-equal return return1)) - (let ((ans) - (cursor-in-echo-area t)) - (while (null ans) - (message (format "Register \"%s\" (y/n)? " return)) - (setq ans (read-event)) - (if (not (or (eq ans ?y) - (eq ans ?n))) - (setq ans nil))) - (message "") - (if (eq ans ?y) - (mu-register/add-citation-name return from) - ) - )) - ) + (if (and (not (string-equal return return1)) + (y-or-n-p (format "Register \"%s\"? " return)) + ) + (mu-register/add-citation-name return from) + )) (setq return return1) ) return)) -- 1.7.10.4