Created
December 11, 2012 09:14
Revisions
-
re5et revised this gist
Aug 30, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ (setq bad-commit-message "Commit message should begin with a capital letter.")) (end-of-line) (if (> (current-column) 50) (setq bad-commit-message "First line is too long, keep it to under 50.")) (goto-line 2) (if (and (= (line-number-at-pos) 2) -
re5et revised this gist
Aug 30, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ (add-hook 'magit-log-edit-mode-hook (lambda () (flyspell-mode) ;; spelling is important bro. (set-fill-column 72))) -
re5et revised this gist
Aug 30, 2012 . 2 changed files with 24 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,25 @@ (defadvice magit-log-edit-commit (around magit-commit-babysitter) "Make sure we have a nice commit message." (let ((bad-commit-message nil) (case-fold-search nil)) (save-excursion (beginning-of-buffer) (unless (string-match "[A-Z]" (string (char-after (point-min)))) (setq bad-commit-message "Commit message should begin with a capital letter.")) (end-of-line) (if (> (current-column) 50) (setq bad-commit-message "First line is too long, keep it to under 50")) (goto-line 2) (if (and (= (line-number-at-pos) 2) (not (equal (point-at-bol) (point-at-eol))) (setq bad-commit-message "The second line should be blank if there is more than one line."))) (while (not (equal (point) (point-max))) (forward-line) (end-of-line) (if (> (current-column) 72) (setq bad-commit-message "You have lines that are too long, keep them under 72."))) (if bad-commit-message (message bad-commit-message) ad-do-it)))) (ad-activate 'magit-log-edit-commit) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,4 @@ 'magit-log-edit-mode-hook (lambda () (flyspell-mode) (set-fill-column 72))) -
re5et revised this gist
Aug 30, 2012 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
re5et created this gist
Aug 30, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ (defadvice magit-log-edit-commit (around magit-commit-babysitter) "Make sure we have a nice commit message." (let ((bad-commit-message nil) (case-fold-search nil)) (save-excursion (beginning-of-buffer) (unless (string-match "[A-Z]" (string (char-after (point-min)))) (setq bad-commit-message "Commit message should begin with a capital letter.")) (end-of-line) (if (> (current-column) 50) (setq bad-commit-message "First line is too long, keep it to under 50")) (goto-line 2) (if (and (= (line-number-at-pos) 2) (not (equal (point-at-bol) (point-at-eol))) (setq bad-commit-message "The second line should be blank if there is more than one line."))) (while (not (equal (point) (point-max))) (forward-line) (end-of-line) (if (> (current-column) 72) (setq bad-commit-message "You have lines that are too long, keep them under 72."))) (if bad-commit-message (message bad-commit-message) ad-do-it)))) (ad-activate 'magit-log-edit-commit) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ (add-hook 'magit-log-edit-mode-hook (lambda () (flyspell-mode) (set-fill-column 72)))