From 4b6fc89a24436e29b019f3c9e0a5acd3c14c60c3 Mon Sep 17 00:00:00 2001 From: toctan Date: Sun, 19 May 2013 19:16:43 +0800 Subject: [PATCH] Do not show the tip if cursor is in the minibuffer --- core/prelude-core.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index 5fe8cc2..87d5721 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -352,10 +352,11 @@ Doesn't mess with special buffers." (defun prelude-tip-of-the-day () "Display a random entry from `prelude-tips'." (interactive) - ;; pick a new random seed - (random t) - (message - (concat "Prelude tip: " (nth (random (length prelude-tips)) prelude-tips)))) + (unless (window-minibuffer-p) + ;; pick a new random seed + (random t) + (message + (concat "Prelude tip: " (nth (random (length prelude-tips)) prelude-tips))))) (defun prelude-eval-after-init (form) "Add `(lambda () FORM)' to `after-init-hook'.