bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variabl


From: Lars Ingebrigtsen
Subject: bug#51614: 29.0.50; [PATCH] vc-switches ignore file or directory variables
Date: Sat, 10 Sep 2022 06:43:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Aleksandr Vityazev <avityazev@posteo.org> writes:

> The current implementation of the vc-switches function from
> lisp/vc/vc.el ignores the values ​​of vc-BACKEND-diff-switches,
> vc-diff-switches set as local directory or file variables.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

> Perhaps the attached patch can solve the problem.

[...]

> +  (let* ((buffer (other-buffer (current-buffer) t))
> +         (switches
> +       (or (when backend
> +             (let ((sym (vc-make-backend-sym
> +                         backend (intern (concat (symbol-name op)
> +                                                 "-switches")))))
> +               (when (boundp sym) (buffer-local-value sym buffer))))
> +           (let ((sym (intern (format "vc-%s-switches" (symbol-name op)))))
> +             (when (boundp sym) (buffer-local-value sym buffer)))
> +           (cond
> +            ((eq op 'diff) diff-switches)))))

I don't think using `other-buffer' here is a reliable way of getting the
buffer we're interested in here, so I think this would have to be fixed
in a different way.

I'm adding Dmitry to the CCs; perhaps he has some comments here.





reply via email to

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