about summary refs log tree commit diff stats
path: root/lisp/+chicken.el
blob: 55fc48e803c1098bb917b0a7381e3a4f5f147cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;;; +chicken.el --- Chicken Scheme additions -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:

;; Reload [[https://wiki.call-cc.org/eggref/5/awful][awful]] with a keybinding

(defun +chicken-awful-reload ()
  "Reload awful by visiting /reload."
  (interactive)
  (save-buffer)
  (condition-case e
      (url-retrieve-synchronously "http://localhost:8080/reload")
    (file-error (progn
                  (message "Couldn't ping awful's server.  Starting...")
                  (start-process "awful" (generate-new-buffer "*awful*")
                                 "awful" "--development-mode" (buffer-file-name))))
    (t (message "Some awful error occurred!"))))

(provide '+chicken)
;;; +chicken.el ends here