aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
AgeCommit message (Collapse)Author
2021-07-02Release version 3.1.1v3.1.1Jonas Bernoulli
2021-07-01Reset Package-Requires for MelpaJonas Bernoulli
2021-07-01Release version 3.1.0v3.1.0Jonas Bernoulli
2021-05-25Reset Package-Requires for MelpaJonas Bernoulli
2021-05-25Release version 3.0.0v3.0.0Jonas Bernoulli
2021-05-25Add SPDX-License-Identifier library headerJonas Bernoulli
2021-05-25git-commit.el: Fix "Author" library headerJonas Bernoulli
The header is named "Author" and my attempt to teach `lm-authors' to also support "Authors" was met with resistance. While at also stop aligning email addresses.
2021-05-12Use with-eval-after-loadJonas Bernoulli
It is available since Emacs 24.4.
2021-03-28git-commit-setup-font-lock: Avoid needless workJonas Bernoulli
Closes #4353.
2021-03-28git-commit-font-lock-keywords-3: Update a regexpJonas Bernoulli
2021-03-28Default to using git-commit-font-lock-keywords-3Jonas Bernoulli
2021-03-09git-commit-major-mode: Support fundamental-modeJonas Bernoulli
2021-03-09git-commit-major-mode: Declare safe local-variable valuesJonas Bernoulli
Closes #4340.
2021-03-09git-commit-major-mode: Suggest git-commit-elisp-text-modeJonas Bernoulli
2021-02-06No longer autoload global-git-commit-modeJonas Bernoulli
The autoloads triggered full loading as soon as the user created any buffer. The autoloads had to do that to be of any use, which means that they had nearly the same effect as loading the library explicitly, which unfortunately is very slow. Now that the autoloads are gone, users can actually choose whether they want to pay that price. Most users likely won't notice that anything has changed as this only matter when one sometimes commits from the command-line without loading `magit' first. Closes #4293.
2021-01-24Consistently group and order require formsJonas Bernoulli
Use the following groups: 1. Require essential core libraries (such as `cl-lib'). 2. Require `magit-*' libraries, and `git-commit' and `git-rebase'. 3. Require other non-magit libraries, including `with-editor' and `transient'. 4. Declare variables and functions, and such. Separate groups with an empty line even if each group consists of just a single `require' form. The 2nd section is sorted logically (more or less), all other sections alphabetically.
2021-01-24Load essential core libraries upfrontJonas Bernoulli
Load all essential core libraries upfront in Magit's root libraries. * Essential core libraries are libraries that provide functionality that I consider essential (more or less "part of the language") but that are not loaded by default because the Emacs maintainers disagree. I want to be able to use such functionality without having to scroll to the top to see whether it happens to be already be required or not in the file that I am currently editing. In the context of Magit, this currently includes the built-in libraries `cl-lib', `eieio', `seq' and `subr-x', as well as the third-party `dash'. * Magit root libraries are libraries that do not require any other Magit libraries. As a consequence they cannot rely on some other library already having taken care of loading the essential libraries. Strictly speaking not only `magit-utils', `magit-section' and `magit-libgit' are root libraries, but also `git-commit'. However because it is distributed separately we don't quite treat the same. We now require *all* essential core libraries in all `magit-*' root libraries regardless of whether those libraries actually use all those core libraries. As a consequence non-root libraries *can* rely on all core libraries always being available without an explicit require. We take advantage of that by not requiring the core libraries in any non-root libraries, because that avoids adding five lines of noise to every library. We explicitly require `subr-x' at run-time even though its library commentary advises against that. Some libraries that are loaded whenever Magit is loaded really do need `subr-x' at run-time, so trying to avoid "needlessly" loading it has been futile.
2021-01-24Declare recentf-exclude instead of requiring recentfJonas Bernoulli
2021-01-15git-commit: Fix docstringBenjamin Motz
The given option name was wrong.
2021-01-02git-commit-prev-message: Don't reorder message ringJonas Bernoulli
The previous implementation messed up the order of the ring. The only change we intended to make was to add the newly written message (if any) at the top of the ring. Therefore using `git-commit-save-message' was inappropriate and we now use a copy of `log-edit-previous-comment', which we fix to not lose the initial message and to preserve the comment at the end of the message buffer. Closes #4283.
2020-12-28git-commit-mode: Highlight all headers in COMMIT_EDITMSGsAdam Porter
Now all headers in a COMMIT_EDITMSG buffer are highlighted, including "commit ..." and those listed in git-commit-comment-headings. This is especially helpful for squash merges. See #4279.
2020-12-28git-commit-font-lock-keywords-1: Remove erroneous regexpAdam Porter
This matched more than one line and caused inconsistent highlighting throughout a log in a COMMIT_EDITMSG buffer. Fixes #4279.
2020-12-22magit-generate-changelog: New commandNoam Postavsky
Also suggest it as an option for `git-commit-setup-hook', but don't use it by default because that needs Emacs 27, doesn't work well when amending, and would be intrusive when using a different commit message style. Add the enhanced paragraph filling of ChangeLog entries into `git-commit-setup-changelog-support' though, which is useful when when not using the new command. Closes #3928. Modified-by: Jonas Bernoulli <jonas@bernoul.li> to merge two commits, move the command to a different file, drop some function declarations, and change the commit message.
2020-11-16git-commit-setup-font-lock: Pacify debug-on-signalJonas Bernoulli
We have to be able to enable `debug-on-signal', so we cannot have this function needlessly enter debugger due to an expected signal. `process-lines' signals an error if the process exits with a non-zero status. That is expected here and we used `ignore-errors' to deal with that case, but `debug-on-signal' overrides that.
2020-08-28git-commit-keyword: Fix typo in doc-stringDaniel Martín
2020-07-01git-commit-major-mode: Offer more choices including arbitrary modeJonas Bernoulli
2020-06-08Bump dependency versions and snapshot timestampsJonas Bernoulli
2020-05-16Adjust to renamed Transient macros and variablesJonas Bernoulli
2020-02-07Fix git-commit fontification when comments contain bracketsKévin Le Gouguec
Previously, comments with [bracketed][keywords] would lose the comment face.
2020-02-04git-commit-read-ident-history: Actually define variableJonas Bernoulli
Such variables should be defined explicitly and it appears that at least for older Emacsen they even have to be defined. Closes #4035. Closes #4039. Suggested-by: Michał Buczko <michal@buczko.pl>
2020-01-23Remove support for JќL key bindingsJonas Bernoulli
In f629795f3b81b3b03cf33406567781dd1bc8465b (which see) I added support for my personal key bindings. Since then I have given up on the idea of changing key bindings by patching packages.
2020-01-19git-commit-read-ident: Rewrite previous fix for clarityKyle Meyer
The fix from the previous commit is problematic because it's not obvious that `(mapcar #'string-trim ...)` is used to avoid overwriting match data, making it more likely that a future rewrite would reintroduce the bug. Suggested-by: Jonas Bernoulli <jonas@bernoul.li>
2020-01-19git-commit-read-ident: Fix type error due to modified match dataKyle Meyer
Feeding the match-string result to string-trim sequentially triggers a type error because the first string-trim clobbers the match data. Retrieve both match-string values before calling string-trim.
2020-01-11The next release will be v3.0.0Jonas Bernoulli
2020-01-02Update copyright yearsJonas Bernoulli
2019-12-27git-commit-insert-pseudo-header: New commandJonas Bernoulli
2019-12-27git-commit-read-ident: Add prompt argumentJonas Bernoulli
2019-12-27git-commit-read-ident: Use magit-completing-readJonas Bernoulli
Re #3964.
2019-11-16Fix `git-commit-co-authored' typo in git-commit-mode-menuClément Pit-Claudel
2019-11-07git-commit.el: Require subr-x for when-letJonas Bernoulli
2019-11-06git-commit-save-message: Move repeated message to front of historyJonas Bernoulli
2019-09-28git-commit-co-authored-by: New commandJonas Bernoulli
I am not adding a key binding because I cannot think of a decent one. Closes #3964.
2019-09-28git-commit.el: Fix key binding in library commentaryJonas Bernoulli
2019-07-16git-commit-setup-changelog-support: Fix fillingBasil L. Contovounesios
Change log entries are customarily unindented[1]. In git-commit-mode, however, adaptive-fill-regexp picks up leading asterisks "* " in change log entries, which are subsequently interpreted as a fill prefix of 2 spaces. Thus, entries like the following: * file: very long description... are "indented" to column 2 when filled: * file: very long description... Instead of messing with adaptive-fill-mode, the simplest way to avoid this fill-prefix by default (but still allow users to enforce it by manually indenting the paragraph's 2nd line) is to enable fill-indent-according-to-mode, as was recently done in Emacs' python-mode for bug#36056[2]. [1]: (info "(standards) Style of Change Logs") https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html [2]: https://debbugs.gnu.org/36056
2019-07-15Mention commit message cycling commands in usage messageJonas Bernoulli
Closes #3920.
2019-07-15git-commit-setup: Move comment into better positionJonas Bernoulli
2019-06-24git-commit-setup: Avoid setting default-directory to nilKyle Meyer
Otherwise the hack-dir-local-variables call will trigger a type error in the rare case that a file matching git-commit-filename-regexp exists outside of a repository. Fixes #3906.
2019-05-01Revert "git-commit-elisp-text-mode: Also support *bold text*"Jonas Bernoulli
This reverts commit 88222678bba51b27bd27d967f6c253baa35cf5ef. This lead to too many false-positives.
2019-04-26git-commit-elisp-text-mode: Also support *bold text*Jonas Bernoulli
2019-04-13Demote errors while running git-commit-setup-hookJonas Bernoulli