diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/terminal.c | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 782b2de8086..eec823906f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * terminal.c (Fdelete_terminal): Clean up the `force' path. | ||
| 4 | |||
| 1 | 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * frame.c (Qnoelisp): New symbol. | 7 | * frame.c (Qnoelisp): New symbol. |
diff --git a/src/terminal.c b/src/terminal.c index 2e0bcbb45a6..bbc2fd74c2e 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -305,19 +305,20 @@ but if the second argument FORCE is non-nil, you may do so. */) | |||
| 305 | (terminal, force) | 305 | (terminal, force) |
| 306 | Lisp_Object terminal, force; | 306 | Lisp_Object terminal, force; |
| 307 | { | 307 | { |
| 308 | struct terminal *t, *p; | 308 | struct terminal *t = get_terminal (terminal, 0); |
| 309 | |||
| 310 | t = get_terminal (terminal, 0); | ||
| 311 | 309 | ||
| 312 | if (!t) | 310 | if (!t) |
| 313 | return Qnil; | 311 | return Qnil; |
| 314 | 312 | ||
| 315 | p = terminal_list; | 313 | if (NILP (force)) |
| 316 | while (p && (p == t || !TERMINAL_ACTIVE_P (p))) | 314 | { |
| 317 | p = p->next_terminal; | 315 | struct terminal *p = terminal_list; |
| 318 | 316 | while (p && (p == t || !TERMINAL_ACTIVE_P (p))) | |
| 319 | if (NILP (force) && !p) | 317 | p = p->next_terminal; |
| 320 | error ("Attempt to delete the sole active display terminal"); | 318 | |
| 319 | if (!p) | ||
| 320 | error ("Attempt to delete the sole active display terminal"); | ||
| 321 | } | ||
| 321 | 322 | ||
| 322 | if (t->delete_terminal_hook) | 323 | if (t->delete_terminal_hook) |
| 323 | (*t->delete_terminal_hook) (t); | 324 | (*t->delete_terminal_hook) (t); |