GNU bug report logs - #32991
27.0.50; diff-auto-refine-mode a no-op

Previous Next

Package: emacs;

Reported by: charles <at> aurox.ch

Date: Mon, 8 Oct 2018 18:28:01 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: charles <at> aurox.ch

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: charles <at> aurox.ch (Charles A. Roelli)
To: 32991 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: bug#32991: 27.0.50; diff-auto-refine-mode a no-op
Date: Mon, 08 Oct 2018 20:30:42 +0200
> commit f8b1e40fb63b0a6bc6692cc0bc84e5f5e65c2644
> Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date:   Tue Jul 10 22:52:21 2018 -0400

>     * lisp/vc/diff-mode.el: Perform hunk refinement from font-lock
    
>     Remove redundant :group arguments.
>     (diff-font-lock-refine): New var.
>     (diff--refine-hunk): New function, extracted from diff-refine-hunk.
>     (diff-refine-hunk): Use it.
>     (diff--font-lock-refine--refresh): New function.
>     (diff--font-lock-refined): New function.
>     (diff-font-lock-keywords): Use it.

Looks like this commit makes diff-auto-refine-mode a no-op, since
hunks are now always refined.  Is that the intention?

Also, with automatic refinement always on, does the following part of
diff-mode.el still require refining the hunk?  It must be repeating
font lock's job (unless font lock is switched off, of course).

  (easy-mmode-define-navigation
   diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
   (when diff-auto-refine-mode
     (unless (prog1 diff--auto-refine-data
	       (setq diff--auto-refine-data
		     (cons (current-buffer) (point-marker))))
       (run-at-time 0.0 nil
		    (lambda ()
		      (when diff--auto-refine-data
			(let ((buffer (car diff--auto-refine-data))
			      (point (cdr diff--auto-refine-data)))
			  (setq diff--auto-refine-data nil)
			  (with-local-quit
			    (when (buffer-live-p buffer)
			      (with-current-buffer buffer
				(save-excursion
				  (goto-char point)
				  (diff-refine-hunk))))))))))))




This bug report was last modified 6 years and 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.