;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303\304\305#\210\300\306\304\305#\210\300\307!\210\300\310!\210\300\311!\210\300\312!\210\300\313!\210\300\314!\210\315\316\304\317\320\321\322\323\324\325& \210\326\327\330\331\332DD\333\334\335\336\337\340\341\324\316& \207" [require dash subr-x magit-git nil t magit-utils log-edit ring rx server transient with-editor custom-declare-group git-commit "Edit Git commit messages." :prefix "git-commit-" :link (info-link "(magit)Editing Commit Messages") :group tools custom-declare-variable global-git-commit-mode funcall function #[0 "\300\207" [t] 1] "Non-nil if Global Git-Commit mode is enabled.\nSee the `global-git-commit-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `global-git-commit-mode'." :set custom-set-minor-mode :initialize #[514 "\301\"\210\205 \302\303\304\"\207" [global-git-commit-mode custom-initialize-default add-hook find-file-hook git-commit-setup-check-buffer] 5 "\n\n(fn SYMBOL EXP)"] :type boolean] 12) #@1219 Edit Git commit messages. This is a minor mode. If called interactively, toggle the `Global Git-Commit mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `(default-value 'global-git-commit-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. This global mode arranges for `git-commit-setup' to be called 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. Loading the library `git-commit' by default enables this mode, but the library is not automatically loaded because doing that would pull in many dependencies and increase startup time too much. You can either rely on `magit' loading this library or you can load it explicitly. Autoloading is not an alternative because in this case autoloading would immediately trigger full loading. (fn &optional ARG) (defalias 'global-git-commit-mode #[256 "\302 \303\301\304=\203\305\301!?\202!\247\203 \306W\203 \307\202!\310\"\210\311\300!\2038\312\301\"\305\301!\2038\301B \203D\313\314\315\"\210\202I\316\314\315\"\210\317\320\305\301!\203U\321\202V\322\"\210\323\324!\203~\325\301!\210\302 \203n\211\302 \232\203~\326\327\305\301!\203z\330\202{\331\332#\210\210\333 \210\305\301!\207" [global-minor-modes global-git-commit-mode current-message set-default toggle default-value 1 nil t boundp delq add-hook find-file-hook git-commit-setup-check-buffer remove-hook run-hooks global-git-commit-mode-hook global-git-commit-mode-on-hook global-git-commit-mode-off-hook called-interactively-p any customize-mark-as-set message "Global Git-Commit mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 1213) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar global-git-commit-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\210\314\315\316\317\320DD\321\322\323\324\325&\210\314\326\316\317\327DD\330\322\323\324\306\331\332\333!\205J\334\335\336& \210\314\337\316\317\340DD\341\322\323\324\306\331\332\333!\205c\334& \210\314\342\316\317\343DD\344\335\345\324\306\322\323& \210\314\346\316\317\347DD\350\335\351\324\352\322\323& \210\314\353\316\317\354DD\355\322\323\356\357\324\360& \210\314\361\316\317\362DD\363\322\323\356\357\324\364& \210\365\361\366\367\370$\210\314\371\316\317\372DD\373\322\323\356\374\324\375& \210\376\377\310\201@\201A\201B\322\323\322\201C& \210\201D\201E\201F\201G\322\377%\210\201D\201H\201I\201J\322\377%\210\201D\201K\201L\201M\322\377%\210\201D\201N\201O\201P\322\377%\210\303\201Q\201R\201N#\210\303\201Q\201S\201T\201U!\2067\201V#\210\201D\201W\201X\201Y\322\377%\210\201D\201Z\201[\201\\\322\377%\210\201D\201]\332\201^!\203m\201_\202p\201`\201a\322\377%\210\303\201b\201R\201]#\210\303\201b\201S\201T\201c!\206\227\201V#\210\201D\201d\332\201^!\203\255\201e\202\260\201f\201g\322\377%\210\201D\201h\201i\201j\322\377%\210\201D\201k\201l\201m\322\377%\210\201D\201n\201o\201p\322\377%\210\201D\201q\201r\201s\322\377%\207" [global-git-commit-mode-map global-git-commit-mode-hook variable-documentation put "Hook run after entering or leaving `global-git-commit-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode global-git-commit-mode boundp custom-declare-variable git-commit-major-mode funcall function #[0 "\300\207" [text-mode] 1] "Major mode used to edit Git commit messages.\nThe major mode configured here is turned on by the minor mode\n`git-commit-mode'." :group git-commit :type (choice (function-item text-mode) (function-item markdown-mode) (function-item org-mode) (function-item fundamental-mode) (function-item git-commit-elisp-text-mode) (function :tag "Another mode") (const :tag "No major mode")) git-commit-setup-hook #[0 "\300\207" [(git-commit-save-message git-commit-setup-changelog-support git-commit-turn-on-auto-fill git-commit-propertize-diff bug-reference-mode with-editor-usage-message)] 1] "Hook run at the end of `git-commit-setup'." :get 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 bug-reference-mode with-editor-usage-message) git-commit-post-finish-hook #[0 "\300\207" [nil] 1] "Hook run after the user finished writing a commit message.\n\n\\This hook is only run after pressing \\[with-editor-finish] in a buffer used\nto edit a commit message. If a commit is created without the\nuser typing a message into a buffer, then this hook is not run.\n\nThis hook is not run until the new commit has been created. If\ndoing so takes Git longer than one second, then this hook isn't\nrun at all. For certain commands such as `magit-rebase-continue'\nthis hook is never run because doing so would lead to a race\ncondition.\n\nThis hook is only run if `magit' is available.\n\nAlso see `magit-post-commit-hook'." git-commit-finish-query-functions #[0 "\300\207" [(git-commit-check-style-conventions)] 1] "List of functions called to query before performing commit.\n\nThe commit message buffer is current while the functions are\ncalled. If any of them returns nil, then the commit is not\nperformed and the buffer is not killed. The user should then\nfix the issue and try again.\n\nThe functions are called with one argument. If it is non-nil,\nthen that indicates that the user used a prefix argument to\nforce finishing the session despite issues. Functions should\nusually honor this wish and return non-nil." (git-commit-check-style-conventions) git-commit-style-convention-checks #[0 "\300\207" [(non-empty-second-line)] 1] "List of checks performed by `git-commit-check-style-conventions'.\nValid members are `non-empty-second-line' and `overlong-summary-line'.\nThat function is a member of `git-commit-finish-query-functions'." (non-empty-second-line overlong-summary-line) (list :convert-widget custom-hook-convert-widget) git-commit-summary-max-length #[0 "\300\207" [68] 1] "Column beyond which characters in the summary lines are highlighted.\n\nThe highlighting indicates that the summary is getting too long\nby some standards. It does in no way imply that going over the\nlimit a few characters or in some cases even many characters is\nanything that deserves shaming. It's just a friendly reminder\nthat if you can make the summary shorter, then you might want\nto consider doing so." :safe numberp number git-commit-fill-column #[0 "\300\207" [nil] 1] "Override `fill-column' in commit message buffers.\n\nIf this is non-nil, then it should be an integer. If that is the\ncase and the buffer-local value of `fill-column' is not already\nset by the time `git-commit-turn-on-auto-fill' is called as a\nmember of `git-commit-setup-hook', then that function sets the\nbuffer-local value of `fill-column' to the value of this option.\n\nThis option exists mostly for historic reasons. If you are not\nalready using it, then you probably shouldn't start doing so." (choice (const :tag "use regular fill-column") number) make-obsolete-variable fill-column "Magit 2.11.0" set git-commit-known-pseudo-headers #[0 "\300\207" [("Signed-off-by" "Acked-by" "Modified-by" "Cc" "Suggested-by" "Reported-by" "Tested-by" "Reviewed-by" "Co-authored-by")] 1] "A list of Git pseudo headers to be highlighted." #[257 "\211<\205 \300\301\"\207" [-all-p stringp] 4 "\n\n(fn VAL)"] (repeat string) custom-declare-group git-commit-faces "Faces used for highlighting Git commit messages." :prefix "git-commit-" faces custom-declare-face git-commit-summary ((t :inherit font-lock-type-face)) "Face used for the summary in commit messages." git-commit-overlong-summary ((t :inherit font-lock-warning-face)) "Face used for the tail of overlong commit message summaries." git-commit-nonempty-second-line ((t :inherit font-lock-warning-face)) "Face used for non-whitespace on the second line of commit messages." git-commit-keyword ((t :inherit font-lock-string-face)) "Face used for keywords in commit messages.\nIn this context a \"keyword\" is text surrounded by brackets." git-commit-note face-alias obsolete-face purecopy "Git-Commit 3.0.0" t git-commit-pseudo-header ((t :inherit font-lock-string-face)) "Face used for pseudo headers in commit messages." git-commit-known-pseudo-header ((t :inherit font-lock-keyword-face)) "Face used for the keywords of known pseudo headers in commit messages." git-commit-comment-branch-local magit ((t :inherit magit-branch-local)) ((t :inherit font-lock-variable-name-face)) "Face used for names of local branches in commit message comments." git-commit-comment-branch "Git-Commit 2.12.0" git-commit-comment-branch-remote ((t :inherit magit-branch-remote)) ((t :inherit font-lock-variable-name-face)) "Face used for names of remote branches in commit message comments.\nThis is only used if Magit is available." git-commit-comment-detached ((t :inherit git-commit-comment-branch-local)) "Face used for detached `HEAD' in commit message comments." git-commit-comment-heading ((t :inherit git-commit-known-pseudo-header)) "Face used for headings in commit message comments." git-commit-comment-file ((t :inherit git-commit-pseudo-header)) "Face used for file names in commit message comments." git-commit-comment-action ((t :inherit bold)) "Face used for actions in commit message comments."] 12) #@36 Key map used by `git-commit-mode'. (defvar git-commit-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\331#\210\207" [make-sparse-keymap define-key [134217840] git-commit-prev-message [134217838] git-commit-next-message " " git-commit-insert-pseudo-header "" git-commit-ack [3 134217833] git-commit-suggested " " git-commit-modified "" git-commit-cc "" git-commit-reported "" git-commit-review "" git-commit-signoff "" git-commit-test [3 134217843] git-commit-save-message] 5) (#$ . 11224)) (require 'easymenu) #@22 Git Commit Mode Menu (defvar git-commit-mode-menu nil (#$ . 11940)) (easy-menu-do-define 'git-commit-mode-menu git-commit-mode-map "Git Commit Mode Menu" '("Commit" ["Previous" git-commit-prev-message t] ["Next" git-commit-next-message t] "-" ["Ack" git-commit-ack :active t :help "Insert an 'Acked-by' header"] ["Sign-Off" git-commit-signoff :active t :help "Insert a 'Signed-off-by' header"] ["Modified-by" git-commit-modified :active t :help "Insert a 'Modified-by' header"] ["Tested-by" git-commit-test :active t :help "Insert a 'Tested-by' header"] ["Reviewed-by" git-commit-review :active t :help "Insert a 'Reviewed-by' header"] ["CC" git-commit-cc t :help "Insert a 'Cc' header"] ["Reported" git-commit-reported :active t :help "Insert a 'Reported-by' header"] ["Suggested" git-commit-suggested t :help "Insert a 'Suggested-by' header"] ["Co-authored-by" git-commit-co-authored t :help "Insert a 'Co-authored-by' header"] "-" ["Save" git-commit-save-message t] ["Cancel" with-editor-cancel t] ["Commit" with-editor-finish t])) (defconst git-commit-filename-regexp "/\\(\\(\\(COMMIT\\|NOTES\\|PULLREQ\\|MERGEREQ\\|TAG\\)_EDIT\\|MERGE_\\|\\)MSG\\|\\(BRANCH\\|EDIT\\)_DESCRIPTION\\)\\'") (byte-code "\301\302\303\"\210\304\305\"\207" [git-commit-filename-regexp eval-after-load recentf #[0 " \235\203 \207 B\211\207" [git-commit-filename-regexp recentf-exclude] 2] add-to-list with-editor-file-name-history-exclude] 3) (defalias 'git-commit-setup-font-lock-in-buffer #[0 "\205 \303\304\305#)\266\203\205\306 \207" [buffer-file-name git-commit-filename-regexp inhibit-changing-match-data nil t string-match git-commit-setup-font-lock] 7]) (add-hook 'after-change-major-mode-hook 'git-commit-setup-font-lock-in-buffer) (defalias 'git-commit-setup-check-buffer #[0 "\205 \303\304\305#)\266\203\205\306 \207" [buffer-file-name git-commit-filename-regexp inhibit-changing-match-data nil t string-match git-commit-setup] 7]) (defalias 'git-commit-file-not-found #[0 " \305\306\307#)\266\203\204&\310\303!\205Q \305\306\307#)\266\203\205Q\311\312 !!?\205Q\313\314\305\306#\203@\315 \316\305O!\202Q\307\317 \"\205Q\320\316 \"\321\320\322 \"Q\211\205f\311\312!!\205f\306\323\306\"\210)\306\207" [git-commit-filename-regexp buffer-file-name inhibit-changing-match-data git-rebase-filename-regexp inhibit-read-only nil t string-match boundp file-accessible-directory-p file-name-directory require magit-git magit-expand-git-file-name 2 "\\`[a-z]:/\\(cygdrive/\\)?\\([a-z]\\)/\\(.*\\)" match-string ":/" 3 insert-file-contents] 7]) (byte-code "\301=\203 \302\303\304\"\210\301\207" [system-type windows-nt add-hook find-file-not-found-functions git-commit-file-not-found] 3) (defconst git-commit-usage-message "Type \\[with-editor-finish] to finish, \\[with-editor-cancel] to cancel, and \\[git-commit-prev-message] and \\[git-commit-next-message] to recover older messages") (defalias 'git-commit-setup #[0 "\306\307!\203\f\310\311\312\313#\210\314\315!\204\306\307!\203\307 \206\312\305\316 \210\317 \210+ \203B\320\321\n!\322Q BC\313\2111\323\313!\210+\312234\f\204Q\304\324!\210\325\326\327\312\313$\210\325\330\331\312\313$\210\325\332\331\312\313$\210\306\333!\203\2105\334>\204\210\325\335\336\337\333\340!\"\312\313$\210\306\341!\203\210\341 \210\3426\343\344!\210\305\324!\210\345 \210\346\347!\203\237\312'\212eb\210\350\351!\203\255\352\324!\210)\3531\272\354\355!0\210\202\300\356\357\"\266\360\312!\207" [default-directory major-mode buffer-file-name git-commit-major-mode with-editor-mode git-commit-mode fboundp magit-toplevel require magit-process nil t file-exists-p ".dir-locals.el" hack-dir-local-variables hack-local-variables-apply "\\`" regexp-quote "\\'" normal-mode 1 add-hook with-editor-finish-query-functions git-commit-finish-query-functions with-editor-pre-finish-hook git-commit-save-message with-editor-pre-cancel-hook magit-rev-parse (magit-sequencer-continue magit-sequencer-skip magit-am-continue magit-am-skip magit-rebase-continue magit-rebase-skip) with-editor-post-finish-hook apply-partially git-commit-run-post-finish-hook "HEAD" magit-wip-maybe-add-commit-hook git-commit-cancel-message make-local-variable log-edit-comment-ring-index git-commit-setup-font-lock boundp save-place looking-at "\\`\\(\\'\\|\n[^\n]\\)" open-line (debug error) run-hooks git-commit-setup-hook message "Error running git-commit-setup-hook: %S" set-buffer-modified-p auto-mode-alist with-editor-show-usage git-commit-usage-message with-editor-usage-message last-command with-editor-cancel-message] 6]) #@17 (fn PREVIOUS) (defalias 'git-commit-run-post-finish-hook #[257 "\205F\301\302\303\304#\205F\305\306!\205F\3072F\310\311 \312\313!\"\306\314!\232\203A\315\311 \"\2034\316\317!\210\202\320\321\300\"\210\322\307\303\"\210\202\210\323\300!0\207" [git-commit-post-finish-hook require magit nil t fboundp magit-rev-parse --cl-block-nil-- time-add current-time seconds-to-time 1 "HEAD" time-less-p sit-for 0.01 message "No commit created after 1 second. Not running %s." throw run-hooks] 5 (#$ . 16540)]) #@99 Non-nil if Git-Commit mode is enabled. Use the command `git-commit-mode' to change this variable. (defvar git-commit-mode nil (#$ . 17060)) (make-variable-buffer-local 'git-commit-mode) #@743 Auxiliary minor mode used when editing Git commit messages. This mode is only responsible for setting up some key bindings. Don't use it directly, instead enable `global-git-commit-mode'. This is a minor mode. If called interactively, toggle the `Git-Commit mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `git-commit-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'git-commit-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [git-commit-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks git-commit-mode-hook git-commit-mode-on-hook git-commit-mode-off-hook called-interactively-p any message "Git-Commit mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 17253) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar git-commit-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\314\300!\205#\310\211%\210\303\312\315\316#\207" [git-commit-mode-map git-commit-mode-hook variable-documentation put "Hook run after entering or leaving `git-commit-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode git-commit-mode "" boundp permanent-local t] 6) #@51 Treat ChangeLog entries as unindented paragraphs. (defalias 'git-commit-setup-changelog-support #[0 "\303\304!\203\f\305\300!\210\304\305\301!\210\306\305\302!\210\n\307P\211\207" [fill-paragraph-function fill-indent-according-to-mode paragraph-start fboundp log-indent-fill-entry make-local-variable t "\\|\\*\\|("] 2 (#$ . 19207)]) #@185 Unconditionally turn on Auto Fill mode. If `git-commit-fill-column' is non-nil, and `fill-column' doesn't already have a buffer-local value, then set that to `git-commit-fill-column'. (defalias 'git-commit-turn-on-auto-fill #[0 "\247\203 \303\301!\204 \304\302!\210\305\306 \207" [git-commit-fill-column fill-column comment-auto-fill-only-comments local-variable-p make-local-variable nil turn-on-auto-fill] 2 (#$ . 19552)]) #@125 Unconditionally turn on Flyspell mode. Also prevent comments from being checked and finally check current non-comment text. (defalias 'git-commit-turn-on-flyspell #[0 "\302\303!\210\304 \210\305\306\307\310 \"\212db\210o\204\"\311!\203\"\312y\210\202\311!\204+\306y\210`\262)\313e\"\207" [flyspell-generic-check-word-predicate comment-start require flyspell turn-on-flyspell git-commit-flyspell-verify nil format "^\\(%s\\|$\\)" looking-at -1 flyspell-region] 5 (#$ . 19990)]) (defalias 'git-commit-flyspell-verify #[0 "\301 f\302HU?\207" [comment-start line-beginning-position 0] 3]) #@14 (fn FORCE) (defalias 'git-commit-finish-query-functions #[257 "\300\301\"\207" [run-hook-with-args-until-failure git-commit-finish-query-functions] 4 (#$ . 20592)]) #@219 Check for violations of certain basic style conventions. For each violation ask the user if she wants to proceed anyway. Option `git-commit-style-convention-checks' controls which conventions are checked. (fn FORCE) (defalias 'git-commit-check-style-conventions #[257 "\211\206A\212eb\210\301\302 \303\304#\210\305\306!\307\232\203\304\202@\310>\203/\305\311!\307\232\204/\312\313!\205@\314>?\206@\305\315!?\206@\312\316!)\207" [git-commit-style-convention-checks re-search-forward git-commit-summary-regexp nil t match-string 1 "" overlong-summary-line 2 y-or-n-p "Summary line is too long. Commit anyway? " non-empty-second-line 3 "Second line is not empty. Commit anyway? "] 5 (#$ . 20767)]) (defalias 'git-commit-cancel-message #[0 "\301\302\303>\205 \304P!\207" [with-editor-pre-cancel-hook message "Commit canceled" git-commit-save-message ". Message saved to `log-edit-comment-ring'"] 4]) #@130 Cycle backward through message history, after saving current message. With a numeric prefix ARG, go back ARG comments. (fn ARG) (defalias 'git-commit-prev-message #[257 "\303!\211\304X\203\305\306!\210\307 \207\310 \211\203+\311\"\204+\312\"\210T\262\303!\262\210\214eb\210`\313\314 P\315\316#\203C\317`\320Z]\202Dd}\210e`|\210)\321\"\305\322\nT\"\210\323\n\"c\207" [log-edit-comment-ring comment-start log-edit-comment-ring-index ring-length 0 message "Empty comment ring" ding git-commit-buffer-message ring-member ring-insert re-search-forward "^" nil t 1 2 log-edit-new-comment-index "Comment %d" ring-ref] 7 (#$ . 21688) "*p"]) #@132 Cycle forward through message history, after saving current message. With a numeric prefix ARG, go forward ARG comments. (fn ARG) (defalias 'git-commit-next-message #[257 "\300[!\207" [git-commit-prev-message] 3 (#$ . 22348) "*p"]) #@50 Save current message to `log-edit-comment-ring'. (defalias 'git-commit-save-message #[0 "\301 \211\205\302\"\211\203\303\"\210\210\304\"\207" [log-edit-comment-ring git-commit-buffer-message ring-member ring-remove ring-insert] 5 (#$ . 22588) nil]) (defalias 'git-commit-buffer-message #[0 "\301P\302ed\"\303\304\305\"r\211q\210\306\307\"\216c\210eb\210\310\311P\312\305#\203)\313 d|\210eb\210\314!\210db\210`Sf\315=\204>\315c\210\316 \262*\210\317\320\"?\205k\317\321\"\203[\322\323\305\211$\262\317\324\"\203j\322\323\305\211$\262\211\207" [comment-start "^" buffer-substring-no-properties generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] re-search-forward " -+ >8 -+$" nil point-at-bol flush-lines 10 buffer-string string-match "\\`[ \n ]*\\'" "\\`\n\\{2,\\}" replace-match "\n" "\n\\{2,\\}\\'"] 7]) (defalias 'git-commit-insert-pseudo-header #[0 "\300\301!\207" [transient-setup git-commit-insert-pseudo-header] 2 nil nil]) (byte-code "\300\301\302\303#\210\300\301\304\305#\210\300\301\306\307\310\301\"#\210\300\301\311\312#\207" [put git-commit-insert-pseudo-header interactive-only t function-documentation "Insert a commit message pseudo header." transient--prefix transient-prefix :command transient--layout ([1 transient-columns nil ([1 transient-column (:description "Insert ... by yourself") ((1 transient-suffix (:key "a" :description "Ack" :command git-commit-ack)) (1 transient-suffix (:key "m" :description "Modified" :command git-commit-modified)) (1 transient-suffix (:key "r" :description "Reviewed" :command git-commit-review)) (1 transient-suffix (:key "s" :description "Signed-off" :command git-commit-signoff)) (1 transient-suffix (:key "t" :description "Tested" :command git-commit-test)))] [1 transient-column (:description "Insert ... by someone") ((1 transient-suffix (:key "C-c" :description "Cc" :command git-commit-cc)) (1 transient-suffix (:key "C-r" :description "Reported" :command git-commit-reported)) (1 transient-suffix (:key "C-i" :description "Suggested" :command git-commit-suggested)) (1 transient-suffix (:key "C-a" :description "Co-authored" :command git-commit-co-authored)))])])] 6) #@83 Insert a header acknowledging that you have looked at the commit. (fn NAME MAIL) (defalias 'git-commit-ack #[514 "\300\301#\207" [git-commit-insert-header "Acked-by"] 6 (#$ . 24815) (git-commit-self-ident)]) #@78 Insert a header to signal that you have modified the commit. (fn NAME MAIL) (defalias 'git-commit-modified #[514 "\300\301#\207" [git-commit-insert-header "Modified-by"] 6 (#$ . 25032) (git-commit-self-ident)]) #@82 Insert a header acknowledging that you have reviewed the commit. (fn NAME MAIL) (defalias 'git-commit-review #[514 "\300\301#\207" [git-commit-insert-header "Reviewed-by"] 6 (#$ . 25252) (git-commit-self-ident)]) #@57 Insert a header to sign off the commit. (fn NAME MAIL) (defalias 'git-commit-signoff #[514 "\300\301#\207" [git-commit-insert-header "Signed-off-by"] 6 (#$ . 25474) (git-commit-self-ident)]) #@80 Insert a header acknowledging that you have tested the commit. (fn NAME MAIL) (defalias 'git-commit-test #[514 "\300\301#\207" [git-commit-insert-header "Tested-by"] 6 (#$ . 25674) (git-commit-self-ident)]) #@77 Insert a header mentioning someone who might be interested. (fn NAME MAIL) (defalias 'git-commit-cc #[514 "\300\301#\207" [git-commit-insert-header "Cc"] 6 (#$ . 25890) (git-commit-read-ident "Cc")]) #@79 Insert a header mentioning the person who reported the issue. (fn NAME MAIL) (defalias 'git-commit-reported #[514 "\300\301#\207" [git-commit-insert-header "Reported-by"] 6 (#$ . 26099) (git-commit-read-ident "Reported-by")]) #@81 Insert a header mentioning the person who suggested the change. (fn NAME MAIL) (defalias 'git-commit-suggested #[514 "\300\301#\207" [git-commit-insert-header "Suggested-by"] 6 (#$ . 26334) (git-commit-read-ident "Suggested-by")]) #@83 Insert a header mentioning the person who co-authored the commit. (fn NAME MAIL) (defalias 'git-commit-co-authored #[514 "\300\301#\207" [git-commit-insert-header "Co-authored-by"] 6 (#$ . 26574) (git-commit-read-ident "Co-authored-by")]) (defalias 'git-commit-self-ident #[0 "\301\302!\206(\301\303!\206(\3041\305\306\307\310#@0\202\210\202!\206(\206(\311\312!\301\313!\206R\301\314!\206R\301\315!\206R\3161H\305\306\307\317#@0\202L\210\202O\206R\311\320!D\207" [user-full-name getenv "GIT_AUTHOR_NAME" "GIT_COMMITTER_NAME" (error) process-lines "git" "config" "user.name" read-string "Name: " "GIT_AUTHOR_EMAIL" "GIT_COMMITTER_EMAIL" "EMAIL" (error) "user.email" "Email: "] 5]) (defvar git-commit-read-ident-history nil) #@15 (fn PROMPT) (defalias 'git-commit-read-ident #[257 "\300\301\302\303#\203G\304\305\306\307\310\311\312#!\313\"\302\211\211\314&\315 \316\317\"\216\320\321\"\203B\315 \316\322\"\216\323\324\325\"!)\262\323\324\326\"!D\202E\327\330!)\207\331\332!\331\333!D\207" [require magit-git nil t magit-completing-read sort delete-dups magit-git-lines "log" "-n9999" "--format=%aN <%ae>" string< git-commit-read-ident-history match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] string-match "\\`\\([^<]+\\) *<\\([^>]+\\)>\\'" #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] string-trim match-string 1 2 user-error "Invalid input" read-string "Name: " "Email: "] 9 (#$ . 27323)]) #@26 (fn HEADER NAME EMAIL) (defalias 'git-commit-insert-header #[771 "\301\302$\262\212db\210\303\304\305\306#\203)\305\210\307\261\210\305f\307U\204B\307c\210\202B\303\310P\305\306#\204)\311\312\305\"\204=\307c\210\307\261\210m\206J\305f\307U?\205P\307c)\207" [comment-start format "%s: %s <%s>" re-search-backward "^[-a-zA-Z]+: [^<]+? <[^>]+>" nil t 10 "^" looking-back "\n\n"] 8 (#$ . 28049)]) #@497 Whether the text should have a heading that is separated from the body. For commit messages that is a convention that should not be violated. For notes it is up to the user. If you do not want to insist on an empty second line here, then use something like: (add-hook \='git-commit-setup-hook (lambda () (when (equal (file-name-nondirectory (buffer-file-name)) "NOTES_EDITMSG") (setq git-commit-need-summary-line nil)))) (defvar git-commit-need-summary-line t (#$ . 28468)) (make-variable-buffer-local 'git-commit-need-summary-line) (defalias 'git-commit-summary-regexp #[0 "\203\303\304 \"\303\305\n\"\303\306 \"Q\207\307\207" [git-commit-need-summary-line comment-start git-commit-summary-max-length format "\\`\\(?:^\\(?:\\s-*\\|%s.*\\)\n\\)*" "\\(.\\{0,%d\\}\\)\\(.*\\)" "\\(?:\n%s\\|\n\\(.+\\)\\)?" "\\(EASTER\\) \\(EGG\\)"] 5]) #@96 Identify the multiline summary-regexp construct. Added to `font-lock-extend-region-functions'. (defalias 'git-commit-extend-region-summary-line #[0 "\212\302 \303\304\"\216eb\210\305\306 !\2059\307\224\307\225W\203\"W\204. W\2057 W\2057^ ]\211\266\202)\262)\207" [font-lock-beg font-lock-end match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] looking-at git-commit-summary-regexp 0] 5 (#$ . 29386)]) (defvar git-commit--branch-name-regexp nil nil) (make-variable-buffer-local 'git-commit--branch-name-regexp) #@74 Also fontified outside of comments in `git-commit-font-lock-keywords-2'. (defconst git-commit-comment-headings '("Changes to be committed:" "Untracked files:" "Changed but not updated:" "Changes not staged for commit:" "Unmerged paths:" "Author:" "Date:") (#$ . 29950)) (defconst git-commit-font-lock-keywords-1 '((eval \` ((\, (format "^\\(%s:\\)\\( .*\\)" (regexp-opt git-commit-known-pseudo-headers))) (1 'git-commit-known-pseudo-header) (2 'git-commit-pseudo-header))) (eval \` ((\, (git-commit-summary-regexp)) (1 'git-commit-summary))) ("\\[.+?\\]" (0 'git-commit-keyword t)) (eval \` ((\, (git-commit-summary-regexp)) (2 'git-commit-overlong-summary t t) (3 'git-commit-nonempty-second-line t t))))) (defconst git-commit-font-lock-keywords-2 (append git-commit-font-lock-keywords-1 '((eval \` ((\, (format "^%s.*" comment-start)) (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)) (1 'git-commit-comment-detached t))) (eval \` ((\, (format "^%s %s" comment-start (regexp-opt git-commit-comment-headings t))) (1 'git-commit-comment-heading t))) (eval \` ((\, (format "^%s \\(?:\\([^:\n]+\\):\\s-+\\)?\\(.*\\)" comment-start)) (1 'git-commit-comment-action t t) (2 'git-commit-comment-file t))) (eval \` ((\, (rx bol "commit " (1+ alnum) eol)) (0 'git-commit-pseudo-header))) (eval \` ((\, (rx-to-string `(seq bol (or ,@git-commit-comment-headings) (1+ blank) (1+ nonl) eol))) (0 'git-commit-pseudo-header)))))) (defconst git-commit-font-lock-keywords-3 (append git-commit-font-lock-keywords-2 '((eval \` ((\, (format "^%s Your branch is \\(?:ahead\\|behind\\) of '%s' by \\([0-9]*\\)" comment-start git-commit--branch-name-regexp)) (1 'git-commit-comment-branch-local t) (2 'git-commit-comment-branch-remote t) (3 'bold t))) (eval \` ((\, (format "^%s Your branch \\(?:is up[- ]to[- ]date with\\|and\\) '%s'" comment-start git-commit--branch-name-regexp)) (1 'git-commit-comment-branch-local t) (2 'git-commit-comment-branch-remote t))) (eval \` ((\, (format "^%s and have \\([0-9]*\\) and \\([0-9]*\\) commits each" comment-start)) (1 'bold t) (2 'bold t)))))) #@41 Font-Lock keywords for Git-Commit mode. (defvar git-commit-font-lock-keywords git-commit-font-lock-keywords-3 (#$ . 32181)) (defalias 'git-commit-setup-font-lock #[0 "\306\307 !\203\310\311!\312#\210\310\313\312#\210\310\314\312#\210\310\315\312#\210\310\316\312#\210\317!\266\320\300!\210\321\322\323\"r\211q\210\324\325\"\216\326\327\330p\330\331\332&\210o?\205Teb\210`\333 {*\262\206[\334\320\301!\210\335\336\"\320\302!\210\337\320\303!\210\330\320\305!\210\340\341!\203\221\342\f!\203\221\343\344!\210\335\345\346\347\350 \351#\"\202\222\352\320\353!\210\323+\354\355\356\323\211$\210\357\3300\"\207" [comment-start comment-start-skip comment-end-skip comment-use-syntax default-directory git-commit--branch-name-regexp make-syntax-table syntax-table modify-syntax-entry string-to-char "." 35 34 39 96 set-syntax-table make-local-variable generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process "git" nil "config" "core.commentchar" line-end-position "#" format "^%s+[ ]*" "\n" featurep magit-git file-accessible-directory-p require magit "\\(\\(?:%s\\)\\|\\)\\([^']+\\)" mapconcat identity magit-list-local-branch-names "\\|" "\\([^']*\\)" font-lock-multiline add-hook font-lock-extend-region-functions git-commit-extend-region-summary-line font-lock-add-keywords git-commit-font-lock-keywords] 8]) (defalias 'git-commit-propertize-diff #[0 "\303\304!\210\212eb\210\305\306\307\310#\205y\311 \210p\312\313\310\"r\211q\210\314\315\"\216rq\210\316`d\"`d|\210)c\210\307\304 \210)\307\211\317\320!\203F\320 \210\202I\321 \210*\307e\322\323\"\211\262\203f\324\325\326\323\"$\210\262\202L\324d\325\326\323\"$\266\327 *\262c\262)\207" [diff-default-read-only font-lock-support-mode font-lock-verbose require diff-mode re-search-forward "^diff --git" nil t beginning-of-line generate-new-buffer " *temp*" make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] buffer-substring-no-properties fboundp font-lock-ensure font-lock-fontify-buffer next-single-property-change face put-text-property font-lock-face get-text-property buffer-string] 11]) (defvar git-commit-elisp-text-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [git-commit-elisp-text-mode-hook variable-documentation put "Hook run after entering ElText mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp git-commit-elisp-text-mode-map definition-name git-commit-elisp-text-mode] 4) (defvar git-commit-elisp-text-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [git-commit-elisp-text-mode-abbrev-table git-commit-elisp-text-mode-map variable-documentation put purecopy "Keymap for `git-commit-elisp-text-mode'." boundp git-commit-elisp-text-mode-syntax-table definition-name git-commit-elisp-text-mode (lambda (def-tmp-var) (defvar git-commit-elisp-text-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `git-commit-elisp-text-mode'." (lambda (def-tmp-var) (defvar git-commit-elisp-text-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `git-commit-elisp-text-mode'." derived-mode-parent text-mode] 5) #@523 Major mode for editing commit messages of elisp projects. This is intended for use as `git-commit-major-mode' for projects that expect `symbols' to look like this. I.e. like they look in Elisp doc-strings, including this one. Unlike in doc-strings, "strings" also look different than the other text. In addition to any hooks its parent mode `text-mode' might have run, this mode runs the hook `git-commit-elisp-text-mode-hook', as the final or penultimate step during initialization. \{git-commit-elisp-text-mode-map} (defalias 'git-commit-elisp-text-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R =\204R\326 \325C#\210\327 !\210\330\f!\210 \331)\332\333!\207" [delay-mode-hooks major-mode mode-name git-commit-elisp-text-mode-map git-commit-elisp-text-mode-syntax-table git-commit-elisp-text-mode-abbrev-table make-local-variable t text-mode git-commit-elisp-text-mode "ElText" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table (git-commit-elisp-text-mode-keywords) run-mode-hooks git-commit-elisp-text-mode-hook local-abbrev-table font-lock-defaults] 5 (#$ . 35742) nil]) (defvar git-commit-elisp-text-mode-keywords (byte-code "\301\302Q\303B\304B\207" [lisp-mode-symbol-regexp "[`‘]\\(" "\\)['’]" ((1 font-lock-constant-face prepend)) (("\"[^\"]*\"" (0 font-lock-string-face prepend)))] 3)) (provide 'git-commit)