diff options
| author | Stefan Monnier | 2008-02-11 03:51:39 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-02-11 03:51:39 +0000 |
| commit | 5b8de9c5e6ae9df7de19ad97143553eeb8a2573a (patch) | |
| tree | c5b1a91c2311c1be51852719793a5c30bdf08bde /src | |
| parent | d725f53da2a3956ea64a9b2bb4e94180c2015b63 (diff) | |
| download | emacs-5b8de9c5e6ae9df7de19ad97143553eeb8a2573a.tar.gz emacs-5b8de9c5e6ae9df7de19ad97143553eeb8a2573a.zip | |
(Fdelete_terminal): Clean up the `force' path.
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); |