Skip to content

Registering new pseudo-headers and displaying them in pull-down menu #5031

Answered by tarsius
comburent asked this question in Q&A
Discussion options

You must be logged in to vote

is there a chance to make that procedure more flexible?

There's a new git-commit--insert-trailer, which does that. As you can see I changed the terminology from "pseudo header" to "trailer", like Git does.

For proper fontification you have to add an entry to git-commit-trailers. You might want to use C-c C-i to insert trailers, and add your inserter to that.

(defun git-commit-copyright-paperwork-exempt ()
  "Insert \"Copyright-paperwork-exempt: Yes\" in the commit message.
This is mostly relevant for the glibc project.
See: <https://sourceware.org/glibc/wiki/Contribution%20checklist#Attribution>"
  (interactive nil git-commit-major-mode)
  (git-commit--insert-trailer "Copyright-paperwor…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@tarsius

This comment was marked as off-topic.

@comburent

This comment was marked as off-topic.

@tarsius

This comment was marked as off-topic.

@tarsius
Comment options

Answer selected by tarsius
Comment options

You must be logged in to vote
1 reply
@tarsius
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants