diff options
| author | Richard M. Stallman | 1996-09-13 18:25:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-13 18:25:17 +0000 |
| commit | be15a5185343840c5c7278e2a0c2c9bb05b198d8 (patch) | |
| tree | 7d950734cc706cda99b2f95611ed751719ce83a6 /src | |
| parent | adabc3a9af7cb74372a16e2f6e6cd4e403fb69ed (diff) | |
| download | emacs-be15a5185343840c5c7278e2a0c2c9bb05b198d8.tar.gz emacs-be15a5185343840c5c7278e2a0c2c9bb05b198d8.zip | |
(read_minibuf): If not in minibuffer window,
cancel the active minibuffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index db6d5f05cff..b9fc7fa5dd6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -191,9 +191,15 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 191 | prompt = build_string (""); | 191 | prompt = build_string (""); |
| 192 | 192 | ||
| 193 | if (!enable_recursive_minibuffers | 193 | if (!enable_recursive_minibuffers |
| 194 | && minibuf_level > 0 | 194 | && minibuf_level > 0) |
| 195 | && (EQ (selected_window, minibuf_window))) | 195 | { |
| 196 | error ("Command attempted to use minibuffer while in minibuffer"); | 196 | if (EQ (selected_window, minibuf_window)) |
| 197 | error ("Command attempted to use minibuffer while in minibuffer"); | ||
| 198 | else | ||
| 199 | /* If we're in another window, cancel the minibuffer that's active. */ | ||
| 200 | Fthrow (Qexit, | ||
| 201 | build_string ("Command attempted to use minibuffer while in minibuffer")); | ||
| 202 | } | ||
| 197 | 203 | ||
| 198 | /* Choose the minibuffer window and frame, and take action on them. */ | 204 | /* Choose the minibuffer window and frame, and take action on them. */ |
| 199 | 205 | ||