From cc87261421ebcb1dc87c8380347e9260a69c998d Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 3 Oct 2023 22:41:30 +1100 Subject: [emacs] [gdb] Some small changes - my-mark-backward-up-list: like backward-up-list, but also mark the sexp - my-kill-sexp-or-comment: kill the next sexp or comment, replacing kill-sexp - my-mark-sexp-or-comment: mark the next sexp or comment, replacing mark-sexp - my-magit-ignore-other-worktrees: a filter-args advice to add --ignore-other-worktrees to magit-checkout --- emacs/.emacs.d/lisp/my/my-magit.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-magit.el') diff --git a/emacs/.emacs.d/lisp/my/my-magit.el b/emacs/.emacs.d/lisp/my/my-magit.el index c6fc0f6..efb3c84 100644 --- a/emacs/.emacs.d/lisp/my/my-magit.el +++ b/emacs/.emacs.d/lisp/my/my-magit.el @@ -67,5 +67,13 @@ (replace-regexp-in-string "/build\\>.*" "/src" default-directory)))) +(defun my-magit-ignore-other-worktrees (rev-and-args) + "Add --ignore-other-worktrees to the second element of REV-AND-ARGS. + +For use as a :filter-args advice" + (pcase-let ((`(,revision ,args) rev-and-args)) + (list revision + (cons "--ignore-other-worktrees" args)))) + (provide 'my-magit) ;;; my-magit.el ends here -- cgit v1.2.3