From c713d2b8360af88f6570f7131084f93ea4fe4b78 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 28 Nov 2020 16:36:29 -0800 Subject: [PATCH 1/2] Move bundle-gem-list-cache before its first use This silences a byte-compiler warning. --- bundler.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundler.el b/bundler.el index 07edc11..83327a5 100644 --- a/bundler.el +++ b/bundler.el @@ -113,6 +113,10 @@ (interactive "sBundle Exec: ") (run-bundled-command command)) +(defvar bundle-gem-list-cache + (make-hash-table) + "Holds a hash table of gem lists per directory.") + ;;;###autoload (defun bundle-gemfile (&optional gemfile) "Set BUNDLE_GEMFILE environment variable." @@ -201,10 +205,6 @@ found." bundler-stdout) "/"))))) -(defvar bundle-gem-list-cache - (make-hash-table) - "Holds a hash table of gem lists per directory.") - (cl-defun bundle-locate-gemfile (&optional (dir default-directory)) (let ((has-gemfile (directory-files dir nil "^Gemfile$")) (is-root (equal dir "/"))) From 915a4ff9947011064e53b4ae463806d9ff53df09 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 28 Nov 2020 16:37:07 -0800 Subject: [PATCH 2/2] bundle-show: fix 'if' statement The parens are misplaced. --- bundler.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundler.el b/bundler.el index 83327a5..2d85188 100644 --- a/bundler.el +++ b/bundler.el @@ -156,9 +156,9 @@ "Shows all gems that are part of the bundle, or the path to a given gem." (interactive) (let* ((ver (bundle-major-version)) - (cmd (if (and ver (< 2 ver) - "bundle show" - "bundle list")))) + (cmd (if (and ver (< 2 ver)) + "bundle show" + "bundle list"))) (bundle-command cmd))) ;;;###autoload