aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
AgeCommit message (Collapse)Author
2026-04-11Backport dabbrev-capf bugfix permanentlyJonas Bernoulli
Closes #5556.
2026-04-06git-commit-setup-capf: Work around bug in dabbrev-capfJonas Bernoulli
Our wrapper function backports a bugfix from debbug#80645 / a7d05207214. It isn't needed for recent 31.0.50 builds. Closes #5551.
2026-03-30git-commit--modified-defuns: New functionJonas Bernoulli
`magit-diff--modified-defuns' looks for a diff in the current buffer, but if "git commit" was called without "--verbose" then there is none. It also only support plain diffs, not the magit-section representation. This new function uses the in-buffer diff if any, else it inserts the diff into a temporary buffer and uses that.
2026-03-30git-commit-insert-changelog-{gnu,plain}: New commandsJonas Bernoulli
2026-03-30git-commit.el: Sort function declarationsJonas Bernoulli
2026-03-30git-commit-setup-capf: Force dabbrev initializationJonas Bernoulli
When using a package such as `company', which automatically performs completion, it isn't guaranteed that `dabbrev--reset-global-variables' has been called at least once, resulting in type error. So we have to take care of the initialization. Closes #5545.
2026-03-29Use Cond-Let's when$Jonas Bernoulli
2026-03-29Make Cond-Let's when$ availableJonas Bernoulli
2026-03-24git-commit-collapse-diff: Use an overlay for compatibilityJonas Bernoulli
`org-mode' and `markdown-mode' use font-lock to control the `invisible' property, causing our text-property to be discarded. Work around that by using an overlay. Re https://github.com/magit/magit/commit/e36e64dbd50060fc6f67ad. Suggested-by: Daniel Fleischer <danflscr@gmail.com>
2026-03-24Rename two internal git-commit functions to mark them as privateJonas Bernoulli
Users only encounter these if they look at the hooks to which we add them, in which case it would be nice to know what they do, so add basic docstrings.
2026-03-24Rename three git-commit-setup-hook functionsJonas Bernoulli
These hook functions specifically don't just enable the respective mode, else they would not exist, instead the mode functions would be used directly.
2026-03-22global-git-commit-mode: Move definitionJonas Bernoulli
2026-03-22git-commit.el: Add more top-level sectionsJonas Bernoulli
2026-03-22git-commit-setup-capf: New git-commit-setup-hook functionJonas Bernoulli
2026-03-22git-commit-collapse-diff: Add kludge to force redisplayJonas Bernoulli
When activating the button using the mouse, that results in a visibility change that can be observed with the human eye. When the same action is invoked using a key event, that is not so. Calling `redisplay' does not help. This silly dance does. This kludge is unnecessary if "buffer.el" is loaded uncompiled.
2026-03-22git-commit-collapse-diff: New git-commit-setup-hook functionJonas Bernoulli
Because the diff is also disabled in a separate buffer, with full Magit functionality, at the inline diff is all that useful as something for the user to look at. It is still useful for other purposes, see next few commits. Inserting but hiding is a good compromise.
2026-02-26magit-commit-diff: Do not error outside Git repositoryJonas Bernoulli
Closes #5526.
2026-01-01Improve indentation of interactiveJonas Bernoulli
Emacs 31.1 adds variable `lisp-indent-local-overrides'.
2026-01-01Improve indentation of condJonas Bernoulli
Emacs 31.1 adds variable `lisp-indent-local-overrides'.
2026-01-01Bump copyright yearsJonas Bernoulli
2025-12-15Collect git-commit-post-finish-hook and support in one placeJonas Bernoulli
The goal is to (at least semi-) deprecate this eventually, which is why I want it out of the way.
2025-11-25git-commit-propertize-diff: Skip refinements that won't surviveJonas Bernoulli
Closes #5483.
2025-11-08magit-wip-mode: Add to git-commit-post-finish-hook globallyJonas Bernoulli
2025-08-22Use cond-let and cond-let*Jonas Bernoulli
I've only recently implemented these forms, but before that I have been hoping they would be added to Emacs for a decade or so. Even so, I do not yet have any practice using them, and so my sense of when to use them, and when not, has yet to evolve.
2025-08-22Use Cond-Let's implementations of {if,when,and,while}-let{,*}Jonas Bernoulli
Cond-Let's `if-let', `if-let*', `when-let', `when-let*' and `and-let*' implementations behave differently from the built-in implementations, but because I have been careful not to depend on the idiosyncrasies, switching over should be mostly safe. Also add shorthands for the other `cond-let--...' macros. We will start using those (and `cond-let' and `cond-let*') in later commits.
2025-08-07Use _ in all non-binding entries in the varlist of COND-let formsJonas Bernoulli
This was not done until now because doing so resulted in a warning because the macro expansion did not actually leave any variables unused. This was fixed in Emacs 30.1 and I've added a backport to Transient, which this package can also take advantage of. Without consistently using `_' one would always have to count parens to be sure whether a member of the varlist does or does not bind a variable. It is very easy to make mistake when writing or reading such forms, if `_' is not consistently used in the non-binding cases.
2025-08-01magit-completing-read: Support requiring non-empty inputJonas Bernoulli
2025-07-25Use shorthand match-str instead of match-string-no-propertiesJonas Bernoulli
Almost always would it be better to use `match-string-no-properties' instead of `match-string', but because the name of the former is excruciatingly long for a function that one often wants to use in tight spaces and because it usually "does not really matter", I usually went for the latter. The problem is, it does matter. For example, even strings that are usually only used by code may end up obfuscating debug statements. So let's start doing the right thing, even though there surely will be people frowning at the use of a shorthand. The fake ("match-string" "match-string") shorthand is necessary to protect literal `match-string' and `match-string-no-properties' from being corrupted by interpreted as shorthand for the non-existent `match-stringing' and `match-string-no-propertiesing'. Unfortunately the shorthands have to be specified in each library individually. Using "dir-locals.el" only works if the libraries are compiled. At least this additional noise is neatly tucked away at the end of the files. It might turn out that out of the more than two hundred instances where this replaces `match-string' with `match-string-no-properties' we should have stuck with the former in an instance or two. That's the price of progress and can be fixed once such regressions are reported.
2025-07-14git-commit-post-finish-hook-timeout: Increase timeoutJonas Bernoulli
2025-07-14git-commit-run-post-finish-hook: Fix messageJonas Bernoulli
2025-07-14git-commit-run-post-finish-hook: CosmeticsJonas Bernoulli
2025-04-15Use ## moreJonas Bernoulli
2025-03-29Use ## moreJonas Bernoulli
2025-03-25git-commit-major-mode: Tweak a choice descriptionJonas Bernoulli
2025-03-25Use radio custom type to allow selecting a functionJonas Bernoulli
2025-03-16Instead of turn-on-* use minor-modes directlyJonas Bernoulli
For now only `turn-on-flyspell' is obsolete in Emacs 31.1. Get it over with and stop using `turn-on-auto-fill' as well.
2025-03-07git-commit-major-mode: Explicitly support log-edit-modeJonas Bernoulli
Suggested-by: Stefan Kangas <stefankangas@gmail.com>
2025-02-21Fix various docstringsJonas Bernoulli
2025-02-17git-commit-font-lock-keywords-1: Make trailer regex matches laxCurt Brune
The `git-commit--trailer-regexp' regex is written so that either groups 1 and 2 will match or groups 3 and 4 will match, but it is impossible for all 4 groups to match. This patch updates the font-lock regex checker to be lax about whether or not the group matched. Without this patch we have errors like: Error during redisplay: (jit-lock-function 77) signaled (error "No match 3 in highlight (3 'git-commit-trailer-token)") Signed-off-by: Curt Brune <curt@brune.net> Make-it-so: Jonas Bernoulli <jonas@bernoul.li>
2025-02-04Let the byte-compiler check more function referencesJonas Bernoulli
The sequel. Part 1 was [1: 7f47299581]. 1: 2025-01-05 7f47299581abb6f77870cb5abdae159fcd35b3d5 Let the byte-compiler check more function references
2025-01-08git-commit.el: Require magit-processJonas Bernoulli
There is a circular dependency between `magit-git' and `magit-process', which we break by declaring some functions from the latter in the former. This usually works out fine because loading `magit' loads both libraries. However, when someone only loads `git-commit', then this broke and to fix it we have to explicitly require `magit-process' in that library as well. Also explicitly require `magit-git', even though that isn't strictly necessary because `magit-mode' requires `magit-git'. Finally also update the dependency declaration in "lisp/Makefile". Closes #5280.
2025-01-04git-commit-{prev,next}-message: Use term "messages" in docstringsJonas Bernoulli
We already did that, just not consistently.
2025-01-01Bump copyright yearsJonas Bernoulli
2024-12-17Depend on Emacs >= 27.1Jonas Bernoulli
This version was released more than four years ago and Emacs 30.1 is around the corner. This is the release available on Debian Bullseye (oldstable).
2024-12-17git-commit-setup-changelog-support: Fix name of a used functionJonas Bernoulli
2024-10-17Merge when-let and neighboring conditionalsJonas Bernoulli
2024-09-12git-commit-mode-map: Add more bindings in defvar-keymapJonas Bernoulli
Now that "git-commit.el" is part of the `magit' package, we can add all the bindings up front. But we cannot #'quote. Well, we could, but then we would also have to `declare-function' and wouldn't that just be silly?
2024-09-01Distribute git-commit.el as part of magitJonas Bernoulli
2024-08-30git-commit-setup: CosmeticsJonas Bernoulli
2024-08-30git-commit-setup-font-lock: Fix commentJonas Bernoulli