diff --git a/lisp/forge-commands.el b/lisp/forge-commands.el index 315e6260..1e55397b 100644 --- a/lisp/forge-commands.el +++ b/lisp/forge-commands.el @@ -57,6 +57,7 @@ Takes the pull-request as only argument and must return a directory." "Dispatch a forge command." :transient-non-suffix #'transient--do-call :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [forge--topic-menus-group ["Fetch" @@ -116,6 +117,7 @@ Takes the pull-request as only argument and must return a directory." "Configure current repository and global settings." :transient-non-suffix #'transient--do-call :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [forge--topic-menus-group ["Configure" diff --git a/lisp/forge-notify.el b/lisp/forge-notify.el index bbbd0b4d..8f26cf66 100644 --- a/lisp/forge-notify.el +++ b/lisp/forge-notify.el @@ -154,6 +154,7 @@ signal an error." :transient-non-suffix #'transient--do-call :transient-switch-frame nil :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [:hide always ("q" forge-menu-quit-list)] [forge--topic-menus-group diff --git a/lisp/forge-repos.el b/lisp/forge-repos.el index 52cbe1ed..90dd572f 100644 --- a/lisp/forge-repos.el +++ b/lisp/forge-repos.el @@ -130,6 +130,7 @@ Must be set before `forge-list' is loaded.") :transient-non-suffix #'transient--do-call :transient-switch-frame nil :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [:hide always ("q" forge-menu-quit-list)] [forge--topic-menus-group diff --git a/lisp/forge-topic.el b/lisp/forge-topic.el index c285da43..072931b4 100644 --- a/lisp/forge-topic.el +++ b/lisp/forge-topic.el @@ -1312,6 +1312,7 @@ This mode itself is never used directly." :transient-non-suffix #'transient--do-call :transient-switch-frame nil :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [:hide always ("q" forge-menu-quit-list)] [forge--topic-menus-group @@ -1348,13 +1349,19 @@ This mode itself is never used directly." ;;;###autoload(autoload 'forge-topic-state-menu "forge-topic" nil t) (transient-define-prefix forge-topic-state-menu () "Set state of the current topic." + :environment #'forge--menu-environment [forge--topic-set-state-group]) ;;;###autoload(autoload 'forge-topic-status-menu "forge-topic" nil t) (transient-define-prefix forge-topic-status-menu () "Set status of the current topic." + :environment #'forge--menu-environment [forge--topic-set-status-group]) +(defun forge--menu-environment (fn) + (let ((magit--refresh-cache (list (cons 0 0)))) + (funcall fn))) + ;;;; State (defclass forge--topic-set-state-command (transient-suffix) diff --git a/lisp/forge-topics.el b/lisp/forge-topics.el index 5daa6342..6814ae8a 100644 --- a/lisp/forge-topics.el +++ b/lisp/forge-topics.el @@ -185,6 +185,7 @@ Must be set before `forge-topics' is loaded.") :transient-non-suffix #'transient--do-call :transient-switch-frame nil :refresh-suffixes t + :environment #'forge--menu-environment :column-widths forge--topic-menus-column-widths [:hide always ("q" forge-menu-quit-list)] [forge--topic-menus-group