diff lisp/dired.el @ 112163:b30a0deacfdf

New function read-char-choice for reading a restricted set of chars. * lisp/subr.el (read-char-choice): New function, factored out from dired-query and hack-local-variables-confirm. * lisp/dired-aux.el (dired-query): * lisp/files.el (hack-local-variables-confirm): Use it.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 08 Jan 2011 14:17:23 -0500
parents 707b726cfaed
children efdf56b1332d
line wrap: on
line diff
--- a/lisp/dired.el	Sat Jan 08 11:03:31 2011 -0800
+++ b/lisp/dired.el	Sat Jan 08 14:17:23 2011 -0500
@@ -3562,7 +3562,7 @@
 ;;;;;;  dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "2e8658304f56098052e312d01c8763a2")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "db61da0d98435f468e41e92c12f99d3b")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
@@ -3723,12 +3723,18 @@
 \(fn FILE)" nil nil)
 
 (autoload 'dired-query "dired-aux" "\
-Query user and return nil or t.
-Store answer in symbol VAR (which must initially be bound to nil).
-Format PROMPT with ARGS.
-Binding variable `help-form' will help the user who types the help key.
-
-\(fn QS-VAR QS-PROMPT &rest QS-ARGS)" nil nil)
+Format PROMPT with ARGS, query user, and store the result in SYM.
+The return value is either nil or t.
+
+The user may type y or SPC to accept once; n or DEL to skip once;
+! to accept this and subsequent queries; or q or ESC to decline
+this and subsequent queries.
+
+If SYM is already bound to a non-nil value, this function may
+return automatically without querying the user.  If SYM is !,
+return t; if SYM is q or ESC, return nil.
+
+\(fn SYM PROMPT &rest ARGS)" nil nil)
 
 (autoload 'dired-do-compress "dired-aux" "\
 Compress or uncompress marked (or next ARG) files.