Skip to content

Instantly share code, notes, and snippets.

@itiut
Last active August 29, 2015 14:05
Show Gist options
  • Save itiut/5ebe51a4b4f7a527fe09 to your computer and use it in GitHub Desktop.
Save itiut/5ebe51a4b4f7a527fe09 to your computer and use it in GitHub Desktop.
エコーエリアや *Messages* バッファにメッセージを表示させたくない ref: http://qiita.com/itiut@github/items/d917eafd6ab255629346
(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)))
(with-suppressed-message
(message "foo")
(message "bar")
(message "baz"))
(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