Last active
August 29, 2015 14:05
-
-
Save itiut/5ebe51a4b4f7a527fe09 to your computer and use it in GitHub Desktop.
エコーエリアや *Messages* バッファにメッセージを表示させたくない ref: http://qiita.com/itiut@github/items/d917eafd6ab255629346
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro with-suppressed-message (&rest body) | |
"Suppress new messages temporarily in the echo area and the `*Messages*' buffer while BODY is evaluated." | |
(declare (indent 0)) | |
(let ((message-log-max nil)) | |
`(with-temp-message (or (current-message) "") ,@body))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-suppressed-message | |
(message "foo") | |
(message "bar") | |
(message "baz")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(run-with-idle-timer 30 t '(lambda () | |
(with-suppressed-message (recentf-save-list)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment