Mercurial > emacs
changeset 91749:e1f7f307ce9e
(Fdelete_terminal): Clean up the `force' path.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 11 Feb 2008 03:51:39 +0000 |
parents | 1402dc2e8440 |
children | 02006e2b1e2a |
files | src/ChangeLog src/terminal.c |
diffstat | 2 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Feb 11 03:29:34 2008 +0000 +++ b/src/ChangeLog Mon Feb 11 03:51:39 2008 +0000 @@ -1,3 +1,7 @@ +2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * terminal.c (Fdelete_terminal): Clean up the `force' path. + 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca> * frame.c (Qnoelisp): New symbol.
--- a/src/terminal.c Mon Feb 11 03:29:34 2008 +0000 +++ b/src/terminal.c Mon Feb 11 03:51:39 2008 +0000 @@ -305,19 +305,20 @@ (terminal, force) Lisp_Object terminal, force; { - struct terminal *t, *p; - - t = get_terminal (terminal, 0); + struct terminal *t = get_terminal (terminal, 0); if (!t) return Qnil; - p = terminal_list; - while (p && (p == t || !TERMINAL_ACTIVE_P (p))) - p = p->next_terminal; - - if (NILP (force) && !p) - error ("Attempt to delete the sole active display terminal"); + if (NILP (force)) + { + struct terminal *p = terminal_list; + while (p && (p == t || !TERMINAL_ACTIVE_P (p))) + p = p->next_terminal; + + if (!p) + error ("Attempt to delete the sole active display terminal"); + } if (t->delete_terminal_hook) (*t->delete_terminal_hook) (t);