emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding git-commit highlight mode?


From: Jonas Bernoulli
Subject: Re: Adding git-commit highlight mode?
Date: Fri, 03 Jan 2025 14:08:44 +0100

> I'm copying in Jonas Bernoulli, in case he has any comments.

I was under the impression that log-edit.el is Emacs's git-commit.el.
I haven't looked at it in a long time, so maybe I don't remember this
correctly, but doesn't that cover about the same ground?  Modulo some
quality of life improvements and bells and whistles maybe. 

One idea from git-commit.el that you might want to adapt in your
alternative is to *not* center the package around a single major-mode.
git-commit.el instead adds to find-file-hook a function, which checks if
the visited file is one of those files used by Git to have to user write
a commit message.  If so, it enables the *minor*-mode git-commit-mode
(which adds some additional font-lock and key bindings) but first *some*
major-mode.  The major-mode can be different for different repositories,
which is quite useful, considering that different projects follow vastly
different commit message conventions.

     Cheers,
     Jonas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]