[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32991: 27.0.50; diff-auto-refine-mode a no-op

From: Charles A. Roelli
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 <address@hidden>
> 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).

   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)
                            (when (buffer-live-p buffer)
                              (with-current-buffer buffer
                                  (goto-char point)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]