~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to src/minibuf.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Minibuffer input and completion.
2
2
   Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
3
                 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4
 
                 2008  Free Software Foundation, Inc.
 
4
                 2008, 2009  Free Software Foundation, Inc.
5
5
 
6
6
This file is part of GNU Emacs.
7
7
 
187
187
      if (MINI_WINDOW_P (XWINDOW (FRAME_SELECTED_WINDOW (XFRAME (frame))))
188
188
          && !(EQ (frame, selected_frame)
189
189
               && minibuf_level > 0))
190
 
        Fset_frame_selected_window (frame, Fframe_first_window (frame));
 
190
        Fset_frame_selected_window (frame, Fframe_first_window (frame), Qnil);
191
191
  }
192
192
}
193
193
 
525
525
                build_string ("Command attempted to use minibuffer while in minibuffer"));
526
526
    }
527
527
 
528
 
  if (noninteractive && NILP (Vexecuting_kbd_macro))
 
528
  if ((noninteractive
 
529
       /* In case we are running as a daemon, only do this before
 
530
          detaching from the terminal.  */
 
531
       || (IS_DAEMON && (daemon_pipe[1] >= 0)))
 
532
      && NILP (Vexecuting_kbd_macro))
529
533
    {
530
534
      val = read_minibuf_noninteractive (map, initial, prompt,
531
535
                                         make_number (pos),
1177
1181
Prompt with PROMPT.
1178
1182
Optional second arg DEF is value to return if user enters an empty line.
1179
1183
 If DEF is a list of default values, return its first element.
1180
 
If optional third arg REQUIRE-MATCH is non-nil,
1181
 
 only existing buffer names are allowed.
 
1184
Optional third arg REQUIRE-MATCH determines whether non-existing
 
1185
 buffer names are allowed.  It has the same meaning as the
 
1186
 REQUIRE-MATCH argument of `confirm-after-completion'.
1182
1187
The argument PROMPT should be a string ending with a colon and a space.
1183
1188
If `read-buffer-completion-ignore-case' is non-nil, completion ignores
1184
1189
case while reading the buffer name.
1723
1728
- t means that the user is not allowed to exit unless
1724
1729
  the input is (or completes to) an element of COLLECTION or is null.
1725
1730
- nil means that the user can exit with any input.
1726
 
- `confirm-only' means that the user can exit with any input, but she will
1727
 
  need to confirm her choice if the input is not an element of COLLECTION.
 
1731
- `confirm' means that the user can exit with any input, but she needs
 
1732
  to confirm her choice if the input is not an element of COLLECTION.
 
1733
- `confirm-after-completion' means that the user can exit with any
 
1734
  input, but she needs to confirm her choice if she called
 
1735
  `minibuffer-complete' right before `minibuffer-complete-and-exit'
 
1736
  and the input is not an element of COLLECTION.
1728
1737
- anything else behaves like t except that typing RET does not exit if it
1729
1738
  does non-null completion.
1730
1739
 
2187
2196
  Vminibuffer_completion_predicate = Qnil;
2188
2197
 
2189
2198
  DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm,
2190
 
               doc: /* Non-nil means to demand confirmation of completion before exiting minibuffer.  */);
 
2199
               doc: /* Whether to demand confirmation of completion before exiting minibuffer.
 
2200
If nil, confirmation is not required.
 
2201
If the value is `confirm', the user may exit with an input that is not
 
2202
 a valid completion alternative, but Emacs asks for confirmation.
 
2203
If the value is `confirm-after-completion', the user may exit with an
 
2204
 input that is not a valid completion alternative, but Emacs asks for
 
2205
 confirmation if the user submitted the input right after any of the
 
2206
 completion commands listed in `minibuffer-confirm-exit-commands'.  */);
2191
2207
  Vminibuffer_completion_confirm = Qnil;
2192
2208
 
2193
2209
  DEFVAR_LISP ("minibuffer-completing-file-name",