|
From: | Juri Linkov |
Subject: | bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers |
Date: | Sun, 21 Nov 2021 19:41:51 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> Perhaps we could just change the .+ thing to .* and see whether it >> breaks anything? > > Good point. > > But am I missing something or commit f0768d3145 didn't change > `diff-hunk-header-re' matching an entire line? I thus don't understand > why Juri is seing a regression w.r. to cycling after that commit has > been installed. Note that I've not been able to reproduce the "working" > behavior described by Juri after reverting that commit. > > Juri can you confirm there's a relation between cycling not working and > that commit? Otherwise should we open another bug? I confirm there is a relation because the commit f0768d3145 + (when (eq diff-buffer-type 'git) + (setq diff-outline-regexp + (concat "\\(^diff --git.*\n\\|" diff-hunk-header-re "\\)")) + (setq-local outline-level #'diff--outline-level)) + (setq-local outline-regexp diff-outline-regexp)) changed diff-outline-regexp to contain diff-hunk-header-re that matches an entire line. This commit replaced the default value of diff-outline-regexp that is (defvar diff-outline-regexp "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)") that didn't match entire lines. However, changing the .+ thing to .* in outline-font-lock-keywords fixes this problem. So we need to decide whether to try to remove entire line mathing from diff-hunk-header-re (not sure how easy to do), or just change .+ to .* in outline-font-lock-keywords.
[Prev in Thread] | Current Thread | [Next in Thread] |