Skip to content

Commit d417295

Browse files
committed
fix(hook): comments in COMMIT_EDITMSG are discarded, no need to enable mode
1 parent 4448d7c commit d417295

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ the mode for conventional commits like this:
3131
(add-hook
3232
'find-file-hook
3333
(lambda (&rest _)
34-
(conventional-comments-mode)
35-
(when (string= (file-name-base buffer-file-name) "COMMIT_EDITMSG")
36-
(conventional-commits-mode))))
34+
(if (string= (file-name-base buffer-file-name) "COMMIT_EDITMSG")
35+
(conventional-commits-mode)
36+
(conventional-comments-mode))))
3737
```
3838

3939
[melpa-badge]: http://melpa.org/packages/conventional-badge.svg

conventional.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
;; (add-hook
3636
;; 'find-file-hook
3737
;; (lambda (&rest _)
38-
;; (conventional-comments-mode)
39-
;; (when (string= (file-name-base buffer-file-name) "COMMIT_EDITMSG")
40-
;; (conventional-commits-mode))))
38+
;; (if (string= (file-name-base buffer-file-name) "COMMIT_EDITMSG")
39+
;; (conventional-commits-mode)
40+
;; (conventional-comments-mode))))
4141
;;
4242
;; The hook worked for me both with plain term and with magit (with EDITOR env)
4343

0 commit comments

Comments
 (0)