mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-25 10:47:00 +00:00
* lisp/vc/diff-mode.el (diff-hunk): Don't make useless timers.
This commit is contained in:
parent
ac5392dcfd
commit
1000d89524
@ -1,5 +1,7 @@
|
||||
2012-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* vc/diff-mode.el (diff-hunk): Don't make useless timers.
|
||||
|
||||
* files.el (load-file): Require match in minibuffer selection, as was
|
||||
the case in Emacs-20 before we changed the spec to allow .elc files
|
||||
(bug#12935).
|
||||
|
@ -575,19 +575,21 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error."
|
||||
(easy-mmode-define-navigation
|
||||
diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
|
||||
(when diff-auto-refine-mode
|
||||
(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)))))))))))
|
||||
(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))))))))))))
|
||||
|
||||
(easy-mmode-define-navigation
|
||||
diff-file diff-file-header-re "file" diff-end-of-file)
|
||||
|
Loading…
Reference in New Issue
Block a user