/[emacs]/emacs/lispref/minibuf.texi
ViewVC logotype

Diff of /emacs/lispref/minibuf.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by rms, Sat Dec 7 21:42:16 2002 UTC revision 1.32 by lektu, Tue Feb 4 14:47:54 2003 UTC
# Line 1  Line 1 
1  @c -*-texinfo-*-  @c -*-texinfo-*-
2  @c This is part of the GNU Emacs Lisp Reference Manual.  @c This is part of the GNU Emacs Lisp Reference Manual.
3  @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001  @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001
4  @c   Free Software Foundation, Inc.  @c   Free Software Foundation, Inc.
5  @c See the file elisp.texi for copying conditions.  @c See the file elisp.texi for copying conditions.
6  @setfilename ../info/minibuf  @setfilename ../info/minibuf
7  @node Minibuffers, Command Loop, Read and Print, Top  @node Minibuffers, Command Loop, Read and Print, Top
# Line 374  text which is a valid form already: Line 374  text which is a valid form already:
374  @group  @group
375  (edit-and-eval-command "Please edit: " '(forward-word 1))  (edit-and-eval-command "Please edit: " '(forward-word 1))
376    
377  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
378  ;;   @r{the following appears in the minibuffer:}  ;;   @r{the following appears in the minibuffer:}
379  @end group  @end group
380    
# Line 582  is @code{t}. Line 582  is @code{t}.
582    
583  @smallexample  @smallexample
584  @group  @group
585  (try-completion  (try-completion
586   "foo"   "foo"
587   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)))   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4)))
588       @result{} "fooba"       @result{} "fooba"
# Line 612  too short).  Both of those begin with th Line 612  too short).  Both of those begin with th
612    
613  @smallexample  @smallexample
614  @group  @group
615  (defun test (s)  (defun test (s)
616    (> (length (car s)) 6))    (> (length (car s)) 6))
617       @result{} test       @result{} test
618  @end group  @end group
619  @group  @group
620  (try-completion  (try-completion
621   "foo"   "foo"
622   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))
623   'test)   'test)
624       @result{} "foobar"       @result{} "foobar"
625  @end group  @end group
# Line 642  example for @code{try-completion}: Line 642  example for @code{try-completion}:
642    
643  @smallexample  @smallexample
644  @group  @group
645  (defun test (s)  (defun test (s)
646    (> (length (car s)) 6))    (> (length (car s)) 6))
647       @result{} test       @result{} test
648  @end group  @end group
649    
650  @group  @group
651  (all-completions    (all-completions
652   "foo"   "foo"
653   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))
654   'test)   'test)
# Line 658  example for @code{try-completion}: Line 658  example for @code{try-completion}:
658  @end defun  @end defun
659    
660  @defvar completion-ignore-case  @defvar completion-ignore-case
661  If the value of this variable is  If the value of this variable is
662  non-@code{nil}, Emacs does not consider case significant in completion.  non-@code{nil}, Emacs does not consider case significant in completion.
663  @end defvar  @end defvar
664    
# Line 738  Here's an example of using @code{complet Line 738  Here's an example of using @code{complet
738  @end group  @end group
739    
740  @group  @group
741  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
742  ;;   @r{the following appears in the minibuffer:}  ;;   @r{the following appears in the minibuffer:}
743    
744  ---------- Buffer: Minibuffer ----------  ---------- Buffer: Minibuffer ----------
# Line 923  only buffer name starting with the given Line 923  only buffer name starting with the given
923  @example  @example
924  (read-buffer "Buffer name? " "foo" t)  (read-buffer "Buffer name? " "foo" t)
925  @group  @group
926  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
927  ;;   @r{the following prompt appears,}  ;;   @r{the following prompt appears,}
928  ;;   @r{with an empty minibuffer:}  ;;   @r{with an empty minibuffer:}
929  @end group  @end group
# Line 965  enters null input, the return value is @ Line 965  enters null input, the return value is @
965  (read-command "Command name? ")  (read-command "Command name? ")
966    
967  @group  @group
968  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
969  ;;   @r{the following prompt appears with an empty minibuffer:}  ;;   @r{the following prompt appears with an empty minibuffer:}
970  @end group  @end group
971    
972  @group  @group
973  ---------- Buffer: Minibuffer ----------  ---------- Buffer: Minibuffer ----------
974  Command name?    Command name?
975  ---------- Buffer: Minibuffer ----------  ---------- Buffer: Minibuffer ----------
976  @end group  @end group
977  @end example  @end example
# Line 990  complete in the set of extant Lisp symbo Line 990  complete in the set of extant Lisp symbo
990  @group  @group
991  (read-command @var{prompt})  (read-command @var{prompt})
992  @equiv{}  @equiv{}
993  (intern (completing-read @var{prompt} obarray  (intern (completing-read @var{prompt} obarray
994                           'commandp t nil))                           'commandp t nil))
995  @end group  @end group
996  @end example  @end example
# Line 1010  user enters null input, the return value Line 1010  user enters null input, the return value
1010  @group  @group
1011  (read-variable "Variable name? ")  (read-variable "Variable name? ")
1012    
1013  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
1014  ;;   @r{the following prompt appears,}  ;;   @r{the following prompt appears,}
1015  ;;   @r{with an empty minibuffer:}  ;;   @r{with an empty minibuffer:}
1016  @end group  @end group
1017    
# Line 1080  case, point goes at the beginning of @va Line 1080  case, point goes at the beginning of @va
1080  @var{initial} does, try the command @kbd{C-x C-v}.  @strong{Note:} we  @var{initial} does, try the command @kbd{C-x C-v}.  @strong{Note:} we
1081  recommend using @var{default} rather than @var{initial} in most cases.  recommend using @var{default} rather than @var{initial} in most cases.
1082    
1083  Here is an example:  Here is an example:
1084    
1085  @example  @example
1086  @group  @group
1087  (read-file-name "The file is ")  (read-file-name "The file is ")
1088    
1089  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
1090  ;;   @r{the following appears in the minibuffer:}  ;;   @r{the following appears in the minibuffer:}
1091  @end group  @end group
1092    
# Line 1275  invalid.  At the next prompt the user ty Line 1275  invalid.  At the next prompt the user ty
1275  @group  @group
1276  (y-or-n-p "Do you need a lift? ")  (y-or-n-p "Do you need a lift? ")
1277    
1278  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
1279  ;;   @r{the following prompt appears in the echo area:}  ;;   @r{the following prompt appears in the echo area:}
1280  @end group  @end group
1281    
1282  @group  @group
1283  ---------- Echo area ----------  ---------- Echo area ----------
1284  Do you need a lift? (y or n)  Do you need a lift? (y or n)
1285  ---------- Echo area ----------  ---------- Echo area ----------
1286  @end group  @end group
1287    
# Line 1289  Do you need a lift? (y or n) Line 1289  Do you need a lift? (y or n)
1289    
1290  @group  @group
1291  ---------- Echo area ----------  ---------- Echo area ----------
1292  Please answer y or n.  Do you need a lift? (y or n)  Please answer y or n.  Do you need a lift? (y or n)
1293  ---------- Echo area ----------  ---------- Echo area ----------
1294  @end group  @end group
1295    
# Line 1335  Here is an example: Line 1335  Here is an example:
1335  @group  @group
1336  (yes-or-no-p "Do you really want to remove everything? ")  (yes-or-no-p "Do you really want to remove everything? ")
1337    
1338  ;; @r{After evaluation of the preceding expression,}  ;; @r{After evaluation of the preceding expression,}
1339  ;;   @r{the following prompt appears,}  ;;   @r{the following prompt appears,}
1340  ;;   @r{with an empty minibuffer:}  ;;   @r{with an empty minibuffer:}
1341  @end group  @end group
1342    
1343  @group  @group
1344  ---------- Buffer: minibuffer ----------  ---------- Buffer: minibuffer ----------
1345  Do you really want to remove everything? (yes or no)  Do you really want to remove everything? (yes or no)
1346  ---------- Buffer: minibuffer ----------  ---------- Buffer: minibuffer ----------
1347  @end group  @end group
1348  @end smallexample  @end smallexample

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26