diff --git a/oni-elisp/oni-elisp.el b/oni-elisp/oni-elisp.el index 3d79b80..18c6426 100644 --- a/oni-elisp/oni-elisp.el +++ b/oni-elisp/oni-elisp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0616.214723 +;; Version: 2020.0616.215511 ;; Package-Requires: (oni-company oni-flycheck oni-paredit oni-fci oni-yasnippet oni-hydra rainbow-delimiters nameless erefactor flycheck-relint handle elisp-format) ;; This program is free software; you can redistribute it and/or modify @@ -52,9 +52,10 @@ (add-to-list 'yas-snippet-dirs oni-elisp-snippets-dir t)) (yas-load-directory oni-elisp-snippets-dir)) -(defun oni-elisp--auto-fill-mode () - "Enable ‘auto-fill-mode’ only for comments." +(defun oni-elisp-auto-fill-mode () + "Enable ‘auto-fill-mode’ only for comments and inhibit for Package-Requires." (setq-local comment-auto-fill-only-comments t) + (setq-local auto-fill-inhibit-regexp (rx line-start ";; Package-Requires: ")) (auto-fill-mode)) (defhydra oni-elisp-hydra (:color teal :hint nil) @@ -65,6 +66,7 @@ _eb_: Buffer " ("eb" eval-buffer)) +(add-hook 'emacs-lisp-mode-hook #'oni-elisp-auto-fill-mode) (add-hook 'emacs-lisp-mode-hook 'company-mode) (add-hook 'emacs-lisp-mode-hook 'electric-quote-local-mode) (add-hook 'emacs-lisp-mode-hook 'erefactor-lazy-highlight-turn-on) @@ -73,7 +75,6 @@ _eb_: Buffer (add-hook 'emacs-lisp-mode-hook 'nameless-mode) (add-hook 'emacs-lisp-mode-hook 'paredit-mode) (add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode) -(add-hook 'emacs-lisp-mode-hook 'oni-elisp--auto-fill-mode) (add-hook 'ielm-mode-hook 'company-mode) (add-hook 'ielm-mode-hook 'paredit-mode)