1862 |
,@body) |
,@body) |
1863 |
(quit (setq quit-flag t) nil))) |
(quit (setq quit-flag t) nil))) |
1864 |
|
|
1865 |
|
(defmacro while-no-input (&rest body) |
1866 |
|
"Execute BODY only as long as there's no pending input. |
1867 |
|
If input arrives, that ends the execution of BODY, |
1868 |
|
and `while-no-input' returns nil. If BODY finishes, |
1869 |
|
`while-no-input' returns whatever value BODY produced." |
1870 |
|
(declare (debug t) (indent 0)) |
1871 |
|
(let ((catch-sym (make-symbol "input"))) |
1872 |
|
`(with-local-quit |
1873 |
|
(catch ',catch-sym |
1874 |
|
(let ((throw-on-input ',catch-sym)) |
1875 |
|
(when (sit-for 0 0 t) |
1876 |
|
,@body)))))) |
1877 |
|
|
1878 |
(defmacro combine-after-change-calls (&rest body) |
(defmacro combine-after-change-calls (&rest body) |
1879 |
"Execute BODY, but don't call the after-change functions till the end. |
"Execute BODY, but don't call the after-change functions till the end. |
1880 |
If BODY makes changes in the buffer, they are recorded |
If BODY makes changes in the buffer, they are recorded |