]> khamidou — GitHub mirrors - config-files.git/commitdiff
added a function to display a random message in *scratch*
authorkhamidou <karim@lambda-expr.org>
Tue, 14 Apr 2009 18:00:43 +0000 (20:00 +0200)
committerkhamidou <karim@lambda-expr.org>
Tue, 14 Apr 2009 18:00:43 +0000 (20:00 +0200)
.emacs

diff --git a/.emacs b/.emacs
index e8355207429515c12dee491fd53752bd023bd605..04585c8857a3557484b17c22e1f7c5bab6b18339 100755 (executable)
--- a/.emacs
+++ b/.emacs
 (setq inhibit-startup-message t)
 ; Add a message coming from the output of fortune in *scratch*
 (save-current-buffer
+  (emacs-lisp-mode)
   (set-buffer "*scratch*")
-  (call-process "fortune" nil (current-buffer)))
+  (call-process "fortune" nil (current-buffer))
+  (comment-region (point-min) (point-max)))
 
 (eval-after-load "dabbrev" '(defalias 'dabbrev-expand 'hippie-expand))