Remove use of ‘if-let’ for Emacs 26+ compatibility
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 1 Apr 2018 08:48:50 +0000 (10:48 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sun, 1 Apr 2018 08:48:50 +0000 (10:48 +0200)
pelican-mode.el

index f2f2357..9886e8c 100644 (file)
@@ -269,10 +269,11 @@ has no status."
 (defun pelican-make (target)
   "Execute TARGET in a Makefile at the root of the site."
   (interactive "sMake Pelican target: ")
-  (if-let (default-directory (pelican-mode-find-root))
-      (compilation-start (format "make %s" target)
-                         nil (lambda (_) "*pelican*"))
-    (user-error "No Pelican site root could be found")))
+  (let ((default-directory (pelican-mode-find-root)))
+    (if default-directory
+        (compilation-start (format "make %s" target)
+                           nil (lambda (_) "*pelican*"))
+      (user-error "No Pelican site root could be found"))))
 
 (defun pelican-make-html ()
   "Generate HTML via a Makefile at the root of the site."