Conform many modules to new conventions

This commit is contained in:
Henrik Lissner 2019-07-23 12:30:47 +02:00
parent 20e2aa0b18
commit c795a988e6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
26 changed files with 161 additions and 165 deletions

View file

@ -98,7 +98,7 @@ Stolen shamelessly from go-mode"
(if fmt (cons (intern fmt) t))))
;;;###autoload
(defun +format*probe (orig-fn)
(defun +format-probe-a (orig-fn)
"Use `+format-with' instead, if it is set."
(if +format-with
(list +format-with t)
@ -119,7 +119,7 @@ formatted text, ERRORS are any errors in string format, and FIRST-DIFF is the
position of the first change in the buffer.
See `+format/buffer' for the interactive version of this function, and
`+format|buffer' to use as a `before-save-hook' hook."
`+format-buffer-h' to use as a `before-save-hook' hook."
(if (not formatter)
'no-formatter
(let ((f-function (gethash formatter format-all--format-table))
@ -228,12 +228,12 @@ is selected)."
;; Hooks
;;;###autoload
(defun +format|enable-on-save ()
(defun +format-enable-on-save-h ()
"Enables formatting on save."
(add-hook 'before-save-hook #'+format|buffer nil t))
(add-hook 'before-save-hook #'+format-buffer-h nil t))
;;;###autoload
(defalias '+format|buffer #'+format/buffer
(defalias '+format-buffer-h #'+format/buffer
"Format the source code in the current buffer with minimal feedback.
Meant for `before-save-hook'.")