about summary refs log tree commit diff stats
path: root/lisp/+scratch.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/+scratch.el')
-rw-r--r--lisp/+scratch.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/+scratch.el b/lisp/+scratch.el index b724a94..bd16ec2 100644 --- a/lisp/+scratch.el +++ b/lisp/+scratch.el
@@ -24,5 +24,16 @@ For `kill-buffer-query-functions'."
24 (next-line 2)) 24 (next-line 2))
25 (rename-buffer (concat "*scratch<" mode ">*") t))) 25 (rename-buffer (concat "*scratch<" mode ">*") t)))
26 26
27(defun +scratch-fortune ()
28 (let* ((fmt (if (executable-find "fmt")
29 (format "| fmt -%d -s" (- fill-column 2))
30 ""))
31 (s (string-trim
32 (if (executable-find "fortune")
33 (shell-command-to-string (concat "fortune -s" fmt))
34 "ABANDON ALL HOPE YE WHO ENTER HERE"))))
35 (concat (replace-regexp-in-string "^" ";; " s)
36 "\n\n")))
37
27(provide '+scratch) 38(provide '+scratch)
28;;; +scratch.el ends here 39;;; +scratch.el ends here