;;; map-ynp.el --- general-purpose boolean question-asker
-;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 2000, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
;; Maintainer: FSF
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(let ((object (if help (capitalize (nth 0 help))))
(objects (if help (capitalize (nth 1 help))))
(action (if help (capitalize (nth 2 help)))))
- (setq map `(("Yes" . act) ("No" . skip) ("Quit" . exit)
- (,(if help (concat action " " object " And Quit")
- "Do it and Quit") . act-and-exit)
- (,(if help (concat action " All " objects)
- "Do All") . automatic)
+ (setq map `(("Yes" . act) ("No" . skip)
,@(mapcar (lambda (elt)
- (cons (capitalize (nth 2 elt))
+ (cons (with-syntax-table
+ text-mode-syntax-table
+ (capitalize (nth 2 elt)))
(vector (nth 1 elt))))
- action-alist))
+ action-alist)
+ (,(if help (concat action " This But No More")
+ "Do This But No More") . act-and-exit)
+ (,(if help (concat action " All " objects)
+ "Do All") . automatic)
+ ("No For All" . exit))
use-menus t
mouse-event last-nonmenu-event))
(setq user-keys (if action-alist
(concat
(format "Type SPC or `y' to %s the current %s;
DEL or `n' to skip the current %s;
-RET or `q' to exit (skip all remaining %s);
-C-g to quit (cancel the operation);
+RET or `q' to give up on the %s (skip all remaining %s);
+C-g to quit (cancel the whole command);
! to %s all remaining %s;\n"
- action object object objects action
+ action object object action objects action
objects)
(mapconcat (function
(lambda (elt)
;; Return the number of actions that were taken.
actions))
+;;; arch-tag: 1d0a3201-a151-4c10-b231-4da47c9e6dc3
;;; map-ynp.el ends here