]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/make-deps.el
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / emacs / make-deps.el
index a1cd731fb08e46aa924a4559bcbf5afa35d16377..8c9e0a27e988abf1e1da9d1230ea702c856bcdf7 100644 (file)
@@ -1,4 +1,4 @@
-;; make-deps.el --- compute make dependencies for Elisp sources
+;;; make-deps.el --- compute make dependencies for Elisp sources  -*- lexical-binding: t -*-
 ;;
 ;; Copyright © Austin Clements
 ;;
 ;; General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.
+;; along with Notmuch.  If not, see <https://www.gnu.org/licenses/>.
 ;;
 ;; Authors: Austin Clements <aclements@csail.mit.edu>
 
+;;; Code:
+
 (defun batch-make-deps ()
   "Invoke `make-deps' for each file on the command line."
-
   (setq debug-on-error t)
   (dolist (file command-line-args-left)
     (let ((default-directory command-line-default-directory))
@@ -35,8 +36,8 @@
 This prints make dependencies to `standard-output' based on the
 top-level `require' expressions in the current buffer.  Paths in
 rules will be given relative to DIR, or `default-directory'."
-
-  (setq dir (or dir default-directory))
+  (unless dir
+    (setq dir default-directory))
   (save-excursion
     (goto-char (point-min))
     (condition-case nil
@@ -64,3 +65,5 @@ rules will be given relative to DIR, or `default-directory'."
                                 (file-name-sans-extension
                                  (file-relative-name fname dir)))))))))
       (end-of-file nil))))
+
+;;; make-deps.el ends here