2302 |
@section Quitting |
@section Quitting |
2303 |
@cindex @kbd{C-g} |
@cindex @kbd{C-g} |
2304 |
@cindex quitting |
@cindex quitting |
2305 |
|
@cindex interrupt Lisp functions |
2306 |
|
|
2307 |
Typing @kbd{C-g} while a Lisp function is running causes Emacs to |
Typing @kbd{C-g} while a Lisp function is running causes Emacs to |
2308 |
@dfn{quit} whatever it is doing. This means that control returns to the |
@dfn{quit} whatever it is doing. This means that control returns to the |
2345 |
case of @code{read-quoted-char}, this is so that @kbd{C-q} can be used |
case of @code{read-quoted-char}, this is so that @kbd{C-q} can be used |
2346 |
to quote a @kbd{C-g}. |
to quote a @kbd{C-g}. |
2347 |
|
|
2348 |
|
@cindex prevent quitting |
2349 |
You can prevent quitting for a portion of a Lisp function by binding |
You can prevent quitting for a portion of a Lisp function by binding |
2350 |
the variable @code{inhibit-quit} to a non-@code{nil} value. Then, |
the variable @code{inhibit-quit} to a non-@code{nil} value. Then, |
2351 |
although @kbd{C-g} still sets @code{quit-flag} to @code{t} as usual, the |
although @kbd{C-g} still sets @code{quit-flag} to @code{t} as usual, the |