elisp-format
elisp-format copied to clipboard
Adds trailing whitespace to wrapped expressions
For example,
-(defun elisp-format-string-length ()⏎
+(defun elisp-format-string-length () ⏎
"Return string length."⏎
- (- (elisp-format-string-end-position)⏎
+ (- (elisp-format-string-end-position) ⏎
(elisp-format-string-beg-position)))⏎
If you run elisp-format on itself and git diff
, you’ll see many more examples of this.
(I’m using Emacs 26.1 on Ubuntu 18.04.)
This is a solution:
(add-hook 'before-save-hook (lambda()
(elisp-format-buffer)
(whitespace-cleanup)) t t)
Sorry late reply. Recently, I don't write elisp codes...
If someone can make PR, then I can verify, and accept.