git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Emacs git-mode feature request: support fill-paragraph correctly

From
AJAlexandre Julliard <julliard@winehq.org>
Date
Jan 27, 2009, 11:03 UTC
Message-ID
<873af59fkm.fsf@wine.dyndns.org>
In-Reply-To
<87tz7mth3g.fsf@write-only.cryp.to>
Peter Simons <simons@cryp.to> writes:
> Other modes, such as message-mode, do support that kind of thing
> correctly, so apparently it is possible to configure what the editor
> considers as a paragraph. Is there some Emacs wizard out there who'd
> be kind enough to improve git-mode accordingly?
You could try something like this:
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 3c37d0d..e314c44 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1331,6 +1331,7 @@ Return the list of files that haven't been handled."
 					 (log-edit-diff-function . git-log-edit-diff)) buffer)
 	(log-edit 'git-do-commit nil 'git-log-edit-files buffer))
       (setq font-lock-keywords (font-lock-compile-keywords git-log-edit-font-lock-keywords))
+      (setq paragraph-separate (concat (regexp-quote git-log-msg-separator) "$\\|Author: \\|Date: \\|Merge: \\|Signed-off-by: \\|\f\\|[ 	]*$"))
       (setq buffer-file-coding-system coding-system)
       (re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t))))
 
-- 
Alexandre Julliard
julliard@winehq.org
Previous: Bruce StephensNext: Peter Simons
Message 5 of 8 in “Emacs git-mode feature request: support fill-paragraph correctly”
  1. Peter SimonsJan 26, 2009
  2. Bruce StephensJan 26, 2009
  3. Peter SimonsJan 26, 2009
  4. Bruce StephensJan 26, 2009
  5. Alexandre JulliardJan 27, 2009
  6. Peter SimonsJan 27, 2009
  7. Junio C HamanoJan 28, 2009
  8. Alexandre JulliardJan 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.