aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2005-03-25 14:57:46 +0000
committerStefan Monnier2005-03-25 14:57:46 +0000
commitd850b038c365891af9b9c67c7d06b06b4e3a7137 (patch)
tree7d2126de641f3fd2245b7a843ccdaf1e23b6dc63 /src
parent95c9ef20be9b423abdca5bf817aea34642b5bccd (diff)
downloademacs-d850b038c365891af9b9c67c7d06b06b4e3a7137.tar.gz
emacs-d850b038c365891af9b9c67c7d06b06b4e3a7137.zip
(Fminibuffer_complete_and_exit, Fself_insert_and_exit): Use Fexit_minibuffer.
(Fexit_minibuffer): Mark it as no-return, deactivate the mark.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index b6db7f1db21..b47d075de4a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1,5 +1,5 @@
1/* Minibuffer input and completion. 1/* Minibuffer input and completion.
2 Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04 2 Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04,05
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -2080,6 +2080,8 @@ complete_and_exit_2 (ignore)
2080 return make_number (1); 2080 return make_number (1);
2081} 2081}
2082 2082
2083EXFUN (Fexit_minibuffer, 0) NO_RETURN;
2084
2083DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, 2085DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit,
2084 Sminibuffer_complete_and_exit, 0, 0, "", 2086 Sminibuffer_complete_and_exit, 0, 0, "",
2085 doc: /* If the minibuffer contents is a valid completion then exit. 2087 doc: /* If the minibuffer contents is a valid completion then exit.
@@ -2142,7 +2144,7 @@ a repetition of this command will exit. */)
2142 return Qnil; 2144 return Qnil;
2143 } 2145 }
2144 exit: 2146 exit:
2145 return Fthrow (Qexit, Qnil); 2147 return Fexit_minibuffer ();
2146 /* NOTREACHED */ 2148 /* NOTREACHED */
2147} 2149}
2148 2150
@@ -2549,14 +2551,21 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0,
2549 else 2551 else
2550 bitch_at_user (); 2552 bitch_at_user ();
2551 2553
2552 return Fthrow (Qexit, Qnil); 2554 return Fexit_minibuffer ();
2553} 2555}
2554 2556
2555DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", 2557DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "",
2556 doc: /* Terminate this minibuffer argument. */) 2558 doc: /* Terminate this minibuffer argument. */)
2557 () 2559 ()
2558{ 2560{
2559 return Fthrow (Qexit, Qnil); 2561 /* If the command that uses this has made modifications in the minibuffer,
2562 we don't want them to cause deactivation of the mark in the original
2563 buffer.
2564 A better solution would be to make deactivate-mark buffer-local
2565 (or to turn it into a list of buffers, ...), but in the mean time,
2566 this should do the trick in most cases. */
2567 Vdeactivate_mark = Qnil;
2568 Fthrow (Qexit, Qnil);
2560} 2569}
2561 2570
2562DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, 2571DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0,