update of packages

This commit is contained in:
2023-11-04 19:26:41 +01:00
parent e162a12b58
commit 3b54a3236d
726 changed files with 297673 additions and 34585 deletions

View File

@@ -1,6 +1,6 @@
;;; diff-hl-dired.el --- Highlight changed files in Dired -*- lexical-binding: t -*-
;; Copyright (C) 2012-2017 Free Software Foundation, Inc.
;; Copyright (C) 2012-2017, 2023 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -140,19 +140,7 @@ status indicators."
(defun diff-hl-dired-status-files (backend dir files update-function)
"Using version control BACKEND, return list of (FILE STATE EXTRA) entries
for DIR containing FILES. Call UPDATE-FUNCTION as entries are added."
(if (version< "25" emacs-version)
(vc-call-backend backend 'dir-status-files dir files update-function)
(vc-call-backend backend 'dir-status-files dir files nil update-function)))
(when (version< emacs-version "24.4.51.5")
;; Work around http://debbugs.gnu.org/19386
(defadvice vc-git-dir-status-goto-stage (around
diff-hl-dired-skip-up-to-date
(stage files update-function)
activate)
(when (eq stage 'ls-files-up-to-date)
(setq stage 'diff-index))
ad-do-it))
(vc-call-backend backend 'dir-status-files dir files update-function))
(defun diff-hl-dired-highlight-items (alist)
"Highlight ALIST containing (FILE . TYPE) elements."
@@ -167,6 +155,7 @@ for DIR containing FILES. Call UPDATE-FUNCTION as entries are added."
(diff-hl-fringe-face-function 'diff-hl-dired-face-from-type)
(o (diff-hl-add-highlighting type 'single)))
(overlay-put o 'modification-hooks '(diff-hl-overlay-modified))
(overlay-put o 'diff-hl-dired-type type)
))))))
(defun diff-hl-dired-face-from-type (type _pos)

View File

@@ -61,6 +61,9 @@
"Perform highlighting on-the-fly.
This is a global minor mode. It alters how `diff-hl-mode' works."
:lighter "" :global t
(and diff-hl-flydiff-timer
(cancel-timer diff-hl-flydiff-timer))
(if diff-hl-flydiff-mode
(progn
(advice-add 'diff-hl-overlay-modified :override #'ignore)
@@ -75,9 +78,6 @@ This is a global minor mode. It alters how `diff-hl-mode' works."
(advice-remove 'diff-hl-overlay-modified #'ignore)
(advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p)
(advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-changes-buffer)
(and diff-hl-flydiff-timer
(cancel-timer diff-hl-flydiff-timer))))
(advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-changes-buffer)))
(provide 'diff-hl-flydiff)

View File

@@ -40,6 +40,8 @@
(defvar diff-hl-margin-old-highlight-function nil)
(defvar diff-hl-margin-old-width nil)
(defgroup diff-hl-margin nil
"Highlight buffer changes on margin"
:group 'diff-hl)
@@ -108,15 +110,17 @@ You probably shouldn't use this function directly."
(let ((width-var (intern (format "%s-margin-width" diff-hl-side))))
(if diff-hl-margin-local-mode
(progn
(set (make-local-variable 'diff-hl-margin-old-highlight-function)
diff-hl-highlight-function)
(set (make-local-variable 'diff-hl-highlight-function)
'diff-hl-highlight-on-margin)
(setq-local diff-hl-margin-old-highlight-function
diff-hl-highlight-function)
(setq-local diff-hl-highlight-function
#'diff-hl-highlight-on-margin)
(setq-local diff-hl-margin-old-width (symbol-value width-var))
(set width-var 1))
(when diff-hl-margin-old-highlight-function
(setq diff-hl-highlight-function diff-hl-margin-old-highlight-function
diff-hl-margin-old-highlight-function nil))
(set width-var 0)))
(set width-var diff-hl-margin-old-width)
(kill-local-variable 'diff-hl-margin-old-width)))
(dolist (win (get-buffer-window-list))
(set-window-buffer win (current-buffer))))

View File

@@ -1,7 +1,9 @@
(define-package "diff-hl" "20221007.2147" "Highlight uncommitted changes using VC"
(define-package "diff-hl" "20230807.1516" "Highlight uncommitted changes using VC"
'((cl-lib "0.2")
(emacs "25.1"))
:commit "68fb280b300c5d8460cc7b9183e29fb3ec604136" :authors
:commit "b5651f1c57b42e0f38e01a8fc8c7df9bc76d5d38" :authors
'(("Dmitry Gutov" . "dgutov@yandex.ru"))
:maintainers
'(("Dmitry Gutov" . "dgutov@yandex.ru"))
:maintainer
'("Dmitry Gutov" . "dgutov@yandex.ru")

View File

@@ -230,7 +230,7 @@ The button calls an ACTION."
;; Make cursor visible (mainly for selecting text in posframe)
(setq cursor-type 'box)
;; Recenter arround point
;; Recenter around point
(recenter)))
(select-frame-set-input-focus diff-hl-show-hunk--frame))

View File

@@ -372,7 +372,7 @@ The backend is determined by `diff-hl-show-hunk-function'."
(setq diff-hl-show-hunk--original-overlay nil)
;; Store begining and end of hunk overlay
;; Store beginning and end of hunk overlay
(let ((overlay (diff-hl-hunk-overlay-at (point))))
(when overlay
(let ((start (overlay-start overlay))

View File

@@ -1,11 +1,11 @@
;;; diff-hl.el --- Highlight uncommitted changes using VC -*- lexical-binding: t -*-
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
;; URL: https://github.com/dgutov/diff-hl
;; Keywords: vc, diff
;; Version: 1.9.0
;; Version: 1.9.2
;; Package-Requires: ((cl-lib "0.2") (emacs "25.1"))
;; This file is part of GNU Emacs.
@@ -290,7 +290,7 @@ the current version of the file)."
(listp vc-git-diff-switches)
(cl-remove-if-not
(lambda (arg)
(member arg '("--histogram" "--patience" "--minimal")))
(member arg '("--histogram" "--patience" "--minimal" "--textconv")))
vc-git-diff-switches))))
(vc-hg-diff-switches nil)
(vc-svn-diff-switches nil)
@@ -541,7 +541,7 @@ in the source file, or the last line of the hunk above it."
(let ((to-go (1+ (- line hunk-line))))
(while (cl-plusp to-go)
(forward-line 1)
(unless (looking-at "^-")
(unless (looking-at "^[-\\]")
(cl-decf to-go))))))))))
(defface diff-hl-reverted-hunk-highlight
@@ -609,6 +609,7 @@ in the source file, or the last line of the hunk above it."
(unless (yes-or-no-p (format "Revert current hunk in %s? "
file))
(user-error "Revert canceled")))
(widen)
(let ((diff-advance-after-apply-hunk nil))
(save-window-excursion
(diff-apply-hunk t)))
@@ -628,7 +629,7 @@ Move point to the beginning of the delineated hunk and return
its end position."
(let (end-marker)
(save-excursion
(while (looking-at "[-+]") (forward-line 1))
(while (looking-at "[-+\\]") (forward-line 1))
(dotimes (_i max-context)
(unless (looking-at "@\\|[-+]")
(forward-line 1)))
@@ -637,13 +638,14 @@ its end position."
(looking-at "@"))
(diff-split-hunk)))
(unless (looking-at "[-+]") (forward-line -1))
(while (looking-at "[-+]") (forward-line -1))
(while (looking-at "[-+\\]") (forward-line -1))
(dotimes (_i max-context)
(unless (looking-at "@\\|[-+]")
(forward-line -1)))
(unless (looking-at "@")
(forward-line 1)
(diff-split-hunk))
(diff-split-hunk)
(forward-line -1))
end-marker))
(defun diff-hl-revert-hunk ()
@@ -717,7 +719,8 @@ Only supported with Git."
(file buffer-file-name)
(dest-buffer (get-buffer-create " *diff-hl-stage*"))
(orig-buffer (current-buffer))
(file-base (shell-quote-argument (file-name-nondirectory file)))
;; FIXME: If the file name has double quotes, these need to be quoted.
(file-base (file-name-nondirectory file))
success)
(with-current-buffer dest-buffer
(let ((inhibit-read-only t))
@@ -752,7 +755,7 @@ Only supported with Git."
(when success
(if diff-hl-show-staged-changes
(message (concat "Hunk staged; customize `diff-hl-show-staged-changes'"
" to highlight only unstages changes"))
" to highlight only unstaged changes"))
(message "Hunk staged"))
(unless diff-hl-show-staged-changes
(diff-hl-update)))))