Skip to content

Commit 80ecafc

Browse files
committed
forge-topic-set-*: Add missing :inapt-if-not predicates
Also for `forge-edit-topic-note'.
1 parent fe133a7 commit 80ecafc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lisp/forge-commands.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ point is currently on."
709709
(transient-define-suffix forge-edit-topic-note ()
710710
"Edit your private note about the current topic."
711711
:transient #'transient--do-quit-all
712+
:inapt-if-not #'forge-current-topic
712713
:description
713714
(lambda ()
714715
(if-let ((topic (forge-current-topic)))

lisp/forge-topic.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,7 @@ This mode itself is never used directly."
15371537
(transient-define-suffix forge-topic-set-title (title)
15381538
"Edit the TITLE of the current topic."
15391539
:class 'forge--topic-set-slot-command :slot 'title
1540+
:inapt-if-not #'forge-current-topic
15401541
:formatter (lambda (topic)
15411542
(propertize (truncate-string-to-width
15421543
(forge--format-topic-title topic) 34 nil ?\s t)
@@ -1549,11 +1550,13 @@ This mode itself is never used directly."
15491550
(transient-define-suffix forge-topic-set-labels (labels)
15501551
"Edit the LABELS of the current topic."
15511552
:class 'forge--topic-set-slot-command :slot 'labels
1553+
:inapt-if-not #'forge-current-topic
15521554
:formatter (##forge--format-labels % t))
15531555

15541556
(transient-define-suffix forge-topic-set-marks (marks)
15551557
"Edit the MARKS of the current topic."
15561558
:class 'forge--topic-set-slot-command :slot 'marks
1559+
:inapt-if-not #'forge-current-topic
15571560
:formatter (##forge--format-marks % t))
15581561

15591562
(transient-define-suffix forge-topic-set-assignees (assignees)
@@ -1574,6 +1577,7 @@ This mode itself is never used directly."
15741577
(transient-define-suffix forge-topic-toggle-saved ()
15751578
"Toggle whether this topic is marked as saved."
15761579
:class 'forge--topic-set-slot-command :slot 'saved-p
1580+
:inapt-if-not #'forge-current-topic
15771581
:description (##forge--format-boolean 'saved-p "saved")
15781582
;; Set only locally because Github's API does not support this.
15791583
(interactive)

0 commit comments

Comments
 (0)