From ba4a72bae90d926b43894ced53e5469371420ca6 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 6 Jan 2021 16:22:13 +0100 Subject: [PATCH] update git-commit --- .../git-commit-pkg.el | 2 -- .../git-commit-autoloads.el | 15 +++++------ .../git-commit-pkg.el | 2 ++ .../git-commit.el | 27 ++++++++++++++----- 4 files changed, 29 insertions(+), 17 deletions(-) delete mode 100644 elpa/git-commit-20200123.1706/git-commit-pkg.el rename elpa/{git-commit-20200123.1706 => git-commit-20201222.1527}/git-commit-autoloads.el (79%) create mode 100644 elpa/git-commit-20201222.1527/git-commit-pkg.el rename elpa/{git-commit-20200123.1706 => git-commit-20201222.1527}/git-commit.el (97%) diff --git a/elpa/git-commit-20200123.1706/git-commit-pkg.el b/elpa/git-commit-20200123.1706/git-commit-pkg.el deleted file mode 100644 index adcb126c..00000000 --- a/elpa/git-commit-20200123.1706/git-commit-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "git-commit" "20200123.1706" "Edit Git commit messages" '((emacs "25.1") (dash "20180910") (transient "20190812") (with-editor "20181103")) :commit "e5e475c61ce568a7e20ed8f795fa343a93632871" :keywords '("git" "tools" "vc") :maintainer '("Jonas Bernoulli" . "jonas@bernoul.li") :url "https://github.com/magit/magit") diff --git a/elpa/git-commit-20200123.1706/git-commit-autoloads.el b/elpa/git-commit-20201222.1527/git-commit-autoloads.el similarity index 79% rename from elpa/git-commit-20200123.1706/git-commit-autoloads.el rename to elpa/git-commit-20201222.1527/git-commit-autoloads.el index 9d01c3ce..d7f7c2ad 100644 --- a/elpa/git-commit-20200123.1706/git-commit-autoloads.el +++ b/elpa/git-commit-20201222.1527/git-commit-autoloads.el @@ -26,19 +26,18 @@ when a Git commit message file is opened. That usually happens when Git uses the Emacsclient as $GIT_EDITOR to have the user provide such a commit message. +If called interactively, enable Global Git-Commit mode if ARG is +positive, and disable it if ARG is zero or negative. If called +from Lisp, also enable the mode if ARG is omitted or nil, and +toggle it if ARG is `toggle'; disable the mode otherwise. + \(fn &optional ARG)" t nil) (defconst git-commit-filename-regexp "/\\(\\(\\(COMMIT\\|NOTES\\|PULLREQ\\|MERGEREQ\\|TAG\\)_EDIT\\|MERGE_\\|\\)MSG\\|\\(BRANCH\\|EDIT\\)_DESCRIPTION\\)\\'") -(autoload 'git-commit-setup-check-buffer "git-commit" "\ - - -\(fn)" nil nil) - -(autoload 'git-commit-setup "git-commit" "\ - +(autoload 'git-commit-setup-check-buffer "git-commit" nil nil nil) -\(fn)" nil nil) +(autoload 'git-commit-setup "git-commit" nil nil nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "git-commit" '("git-commit-"))) diff --git a/elpa/git-commit-20201222.1527/git-commit-pkg.el b/elpa/git-commit-20201222.1527/git-commit-pkg.el new file mode 100644 index 00000000..b16ecb59 --- /dev/null +++ b/elpa/git-commit-20201222.1527/git-commit-pkg.el @@ -0,0 +1,2 @@ +;;; Generated package description from /Users/andreas/.emacs.d/elpa/git-commit-20201222.1527/git-commit.el -*- no-byte-compile: t -*- +(define-package "git-commit" "20201222.1527" "Edit Git commit messages" '((emacs "25.1") (dash "20200524") (transient "20200601") (with-editor "20200522")) :commit "c5e11811197ef8c667a605e5d9dd8ec77247bd13" :keywords '("git" "tools" "vc") :maintainer '("Jonas Bernoulli" . "jonas@bernoul.li") :url "https://github.com/magit/magit") diff --git a/elpa/git-commit-20200123.1706/git-commit.el b/elpa/git-commit-20201222.1527/git-commit.el similarity index 97% rename from elpa/git-commit-20200123.1706/git-commit.el rename to elpa/git-commit-20201222.1527/git-commit.el index 0a17bf84..fc147885 100644 --- a/elpa/git-commit-20200123.1706/git-commit.el +++ b/elpa/git-commit-20201222.1527/git-commit.el @@ -11,8 +11,9 @@ ;; Marius Vollmer ;; Maintainer: Jonas Bernoulli -;; Package-Requires: ((emacs "25.1") (dash "20180910") (transient "20190812") (with-editor "20181103")) -;; Package-Version: 20200123.1706 +;; Package-Requires: ((emacs "25.1") (dash "20200524") (transient "20200601") (with-editor "20200522")) +;; Package-Version: 20201222.1527 +;; Package-Commit: c5e11811197ef8c667a605e5d9dd8ec77247bd13 ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit @@ -176,6 +177,9 @@ The major mode configured here is turned on by the minor mode `git-commit-mode'." :group 'git-commit :type '(choice (function-item text-mode) + (function-item markdown-mode) + (function-item org-mode) + (function :tag "Another mode") (const :tag "No major mode"))) (defcustom git-commit-setup-hook @@ -191,6 +195,7 @@ The major mode configured here is turned on by the minor mode :get (and (featurep 'magit-utils) 'magit-hook-custom-get) :options '(git-commit-save-message git-commit-setup-changelog-support + magit-generate-changelog git-commit-turn-on-auto-fill git-commit-turn-on-flyspell git-commit-propertize-diff @@ -310,7 +315,7 @@ already using it, then you probably shouldn't start doing so." (defface git-commit-keyword '((t :inherit font-lock-string-face)) "Face used for keywords in commit messages. -In this context a \"keyword\" is text surrounded be brackets." +In this context a \"keyword\" is text surrounded by brackets." :group 'git-commit-faces) (define-obsolete-face-alias 'git-commit-note @@ -574,6 +579,8 @@ Don't use it directly, instead enable `global-git-commit-mode'." (defun git-commit-setup-changelog-support () "Treat ChangeLog entries as unindented paragraphs." + (when (fboundp 'log-indent-fill-entry) ; New in Emacs 27. + (setq-local fill-paragraph-function #'log-indent-fill-entry)) (setq-local fill-indent-according-to-mode t) (setq-local paragraph-start (concat paragraph-start "\\|\\*\\|("))) @@ -697,7 +704,7 @@ With a numeric prefix ARG, go forward ARG comments." ;;; Headers -(define-transient-command git-commit-insert-pseudo-header () +(transient-define-prefix git-commit-insert-pseudo-header () "Insert a commit message pseudo header." [["Insert ... by yourself" ("a" "Ack" git-commit-ack) @@ -768,6 +775,8 @@ With a numeric prefix ARG, go forward ARG comments." (ignore-errors (car (process-lines "git" "config" "user.email"))) (read-string "Email: ")))) +(defvar git-commit-read-ident-history nil) + (defun git-commit-read-ident (prompt) (if (require 'magit-git nil t) (let ((str (magit-completing-read @@ -876,7 +885,7 @@ Added to `font-lock-extend-region-functions'." `(,@git-commit-font-lock-keywords-1 ;; Comments (eval . `(,(format "^%s.*" comment-start) - (0 'font-lock-comment-face))) + (0 'font-lock-comment-face append))) (eval . `(,(format "^%s On branch \\(.*\\)" comment-start) (1 'git-commit-comment-branch-local t))) (eval . `(,(format "^%s \\(HEAD\\) detached at" comment-start) @@ -929,8 +938,12 @@ Added to `font-lock-extend-region-functions'." (modify-syntax-entry ?` "." table) (set-syntax-table table)) (setq-local comment-start - (or (ignore-errors - (car (process-lines "git" "config" "core.commentchar"))) + (or (with-temp-buffer + (call-process "git" nil (current-buffer) nil + "config" "core.commentchar") + (unless (bobp) + (goto-char (point-min)) + (buffer-substring (point) (line-end-position)))) "#")) (setq-local comment-start-skip (format "^%s+[\s\t]*" comment-start)) (setq-local comment-end-skip "\n") -- 2.47.3