Use `compilation-start` rather than custom buffer initialization.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 16 Jul 2017 19:24:40 +0000 (21:24 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 16 Jul 2017 19:24:40 +0000 (21:24 +0200)
pelican-mode.el

index dce4bb8..df0503f 100644 (file)
 (defun pelican-make (target)
   "Execute TARGET in a Makefile at the root of the site."
   (interactive "sMake Pelican target: ")
 (defun pelican-make (target)
   "Execute TARGET in a Makefile at the root of the site."
   (interactive "sMake Pelican target: ")
-  (if-let ((default-directory (pelican-find-root)))
-      (let ((output (get-buffer-create "*Pelican Output*")))
-        (display-buffer output)
-        (pop-to-buffer output)
-        (compilation-mode)
-        (start-process "Pelican Makefile" output "make" target))
+  (if-let (default-directory (pelican-find-root))
+      (compilation-start (format "make %s" target)
+                         nil (lambda (_) "*pelican*"))
     (message "This doesn't look like a Pelican site.")))
 
 (defun pelican-make-html ()
     (message "This doesn't look like a Pelican site.")))
 
 (defun pelican-make-html ()