Malabarba / aggressive-indent-mode

Emacs minor mode that keeps your code always indented. More reliable than electric-indent-mode.
850 stars 36 forks source link

Silence the compiler #154

Closed dr-scsi closed 1 year ago

dr-scsi commented 2 years ago

Hi,

many thanks for this package. Is it possible to apply this small change in order to silence the Emacs compiler? TIA.

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 0234fcf..e8dd6cd 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -485,9 +485,13 @@ If BODY finishes, `while-no-input' returns whatever value BODY produced."
           (run-with-idle-timer aggressive-indent-sit-for-time t #'aggressive-indent--indent-if-changed (current-buffer)))))

 ;;; Minor modes
+
+;; Silence the compiler for the variable which will be defined below:
+(defvar global-aggressive-indent-mode)
+
 ;;;###autoload
 (define-minor-mode aggressive-indent-mode
-  nil nil " =>"
+  :lighter " =>"
   `((,(kbd "C-c C-q") . aggressive-indent-indent-defun)
     ([backspace]
      menu-item "maybe-delete-indentation" ignore :filter
seagle0128 commented 2 years ago

Any update for this issue, pls?

dr-scsi commented 2 years ago

@Malabarba - I see now that there is also PR #150. You can ignore my suggestion above if you install that change (which is even more elegant). Sorry for missing it in the first place.