Merge pull request #321 from toctan/master

Do not show the tip if the cursor is in the minibuffer window
This commit is contained in:
Bozhidar Batsov 2013-05-19 23:03:28 -07:00
commit ca4ae2e4f8
2 changed files with 7 additions and 5 deletions

3
.gitignore vendored
View file

@ -16,4 +16,5 @@ places
.smex-items .smex-items
savefile/ savefile/
/prelude-modules.el /prelude-modules.el
projectile-bookmarks.eld projectile-bookmarks.eld
session*

View file

@ -352,10 +352,11 @@ Doesn't mess with special buffers."
(defun prelude-tip-of-the-day () (defun prelude-tip-of-the-day ()
"Display a random entry from `prelude-tips'." "Display a random entry from `prelude-tips'."
(interactive) (interactive)
;; pick a new random seed (unless (window-minibuffer-p)
(random t) ;; pick a new random seed
(message (random t)
(concat "Prelude tip: " (nth (random (length prelude-tips)) prelude-tips)))) (message
(concat "Prelude tip: " (nth (random (length prelude-tips)) prelude-tips)))))
(defun prelude-eval-after-init (form) (defun prelude-eval-after-init (form)
"Add `(lambda () FORM)' to `after-init-hook'. "Add `(lambda () FORM)' to `after-init-hook'.