>>>>> "Ramkumar" == Ramkumar Ramachandra <[email protected]> writes:
> Florian Ragwitz (rafl) has written a git-commit-mode [1], a major mode > for editing log messages that people might like to use in conjunction > with Magit. So, add this project as a submodule to the Magit project, > and make magit-log-edit-mode derive this mode. > [1]: https://github.com/rafl/git-commit-mode Thanks, I'll give it a try. What about the metadata magit puts in the log-edit buffer before submitting ? Are there equivalent flags with git-commit-mode ? > .gitmodules | 3 +++ Is there a reason why we'd like to maintain a submodule within magit? I mean, it won't be a strong dependency anyway. So we should probably just mention the location of git-commit-mode (or better an elpa package) and leave the rest to the user. > -(define-derived-mode magit-log-edit-mode text-mode "Magit Log Edit" > - ;; Recognize changelog-style paragraphs > - (set (make-local-variable 'paragraph-start) > - (concat paragraph-start "\\|*\\|("))) > +(if (require 'git-commit nil 'noerror) > + (define-derived-mode magit-log-edit-mode git-commit-mode "Magit Log Edit" > + (define-key magit-log-edit-mode-map (kbd "C-c C-s") > + 'git-commit-signoff) > + ;; Recognize changelog-style paragraphs > + (set (make-local-variable 'paragraph-start) > + (concat paragraph-start "\\|*\\|("))) > + (define-derived-mode magit-log-edit-mode text-mode "Magit Log Edit" > + (set (make-local-variable 'paragraph-start) > + (concat paragraph-start "\\|*\\|(")))) I'd prefer we don't use git-commit-mode automatically when it exists, but rather when the user asks for it (with a call to `magit-git-commit-mode-insinuate' or something). We should also provide a way to fallback to regular mode upon user request. Yann. -- We tend to become like the worst in those we oppose. -- Bene Gesserit Coda
