Commit 9af12830 authored by Jonas Bernoulli's avatar Jonas Bernoulli

put popup options in correct groups, suppress unnecessary options

Disband the `magit-popups' Custom group and instead place most popup
argument options into `magit-commands'.  The options of popups which
are used to create or update buffers whose major-mode is a Magit mode
are instead placed in the respective mode group.

Also suppress the creation of popup argument options for popups which
do not take any arguments.
parent 9b1d62b6
......@@ -50,7 +50,7 @@
(magit-define-popup magit-bisect-popup
"Popup console for bisect commands."
'magit-commands nil nil
:man-page "git-bisect"
:actions '((?b "Bad" magit-bisect-bad)
(?g "Good" magit-bisect-good)
......@@ -164,7 +164,7 @@ See #1731."
(magit-define-popup magit-blame-popup
"Popup console for blame commands."
:man-page "git-blame"
:switches '((?w "Ignore whitespace" "-w")
(?r "Do not treat root commits as boundaries" "--root"))
......@@ -78,7 +78,7 @@ an error while using those is harder to recover from."
(with-no-warnings ; quiet 24.4 byte-compiler
(magit-define-popup magit-commit-popup
"Popup console for commit commands."
:man-page "git-commit"
:switches '((?a "Stage all modified and deleted files" "--all")
(?e "Allow empty commit" "--allow-empty")
......@@ -42,10 +42,6 @@
"Controlling Git from Emacs."
:group 'tools)
(defgroup magit-popups nil
"Command console popups provided by Magit."
:group 'magit)
(defgroup magit-commands nil
"Options controlling behavior of certain commands."
:group 'magit)
......@@ -63,8 +59,6 @@
:group 'magit
:group 'faces)
(custom-add-to-group 'magit-popup 'magit-popups 'custom-group)
(custom-add-to-group 'magit-popups 'magit-popup 'custom-group)
(custom-add-to-group 'magit-modes 'magit-popup 'custom-group)
(custom-add-to-group 'magit-faces 'magit-popup-faces 'custom-group)
(custom-add-to-group 'magit-modes 'git-commit 'custom-group)
......@@ -397,7 +397,7 @@ The following `format'-like specs are supported:
(magit-define-popup magit-diff-popup
"Popup console for diff commands."
:man-page "git-diff"
:switches '((?f "Show surrounding functions" "--function-context")
(?b "Ignore whitespace changes" "--ignore-space-change")
......@@ -421,7 +421,7 @@ The following `format'-like specs are supported:
(magit-define-popup magit-diff-refresh-popup
"Popup console for changing diff arguments in the current buffer."
'magit-popups nil 'magit-diff-section-arguments
'magit-diff nil 'magit-diff-section-arguments
:man-page "git-diff"
:switches '((?f "Show surrounding functions" "--function-context")
(?b "Ignore whitespace changes" "--ignore-space-change")
......@@ -299,7 +299,7 @@"
(magit-define-popup magit-log-popup
"Popup console for log commands."
:man-page "git-log"
:switches '((?a "Show all refs" "--all")
(?b "Show all branches" "--branches")
......@@ -50,7 +50,7 @@
(magit-define-popup magit-remote-popup
"Popup console for remote commands."
'magit-commands nil nil
:man-page "git-remote"
:actions '((?a "Add" magit-remote-add)
(?r "Rename" magit-remote-rename)
......@@ -91,7 +91,7 @@
(magit-define-popup magit-fetch-popup
"Popup console for fetch commands."
:man-page "git-fetch"
:switches '((?p "Prune" "--prune"))
:actions '((?f "Current" magit-fetch-current)
......@@ -127,7 +127,7 @@ then read the remote."
(magit-define-popup magit-pull-popup
"Popup console for pull commands."
:man-page "git-pull"
:switches '((?r "Rebase" "--rebase"))
:actions '((?F "Current" magit-pull-current)
......@@ -156,7 +156,7 @@ then read the remote."
(magit-define-popup magit-push-popup
"Popup console for push commands."
:man-page "git-push"
:switches '((?f "Force safely" "--force-with-lease") ; >= 1.8.5
(?F "Force" "--force")
......@@ -245,7 +245,7 @@ branch as default."
(magit-define-popup magit-patch-popup
"Popup console for patch commands."
:man-page "git-format-patch"
:options '((?f "From" "--from=")
(?t "To" "--to=")
......@@ -145,7 +145,7 @@ This discards all changes made since the sequence started."
(magit-define-popup magit-cherry-pick-popup
"Popup console for cherry-pick commands."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-cherry-pick"
:switches '((?s "Add Signed-off-by lines" "--signoff")
(?e "Edit commit messages" "--edit")
......@@ -198,7 +198,7 @@ without prompting."
(magit-define-popup magit-revert-popup
"Popup console for revert commands."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-revert"
:switches '((?s "Add Signed-off-by lines" "--signoff"))
:options '((?s "Strategy" "--strategy=" read-from-minibuffer))
......@@ -242,7 +242,7 @@ without prompting."
(magit-define-popup magit-am-popup
"Popup console for mailbox commands."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-am"
:switches '((?3 "Fall back on 3way merge" "--3way")
(?s "Add Signed-off-by lines" "--signoff")
......@@ -314,7 +314,7 @@ This discards all changes made since the sequence started."
(magit-define-popup magit-rebase-popup
"Key menu for rebasing."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-rebase"
:switches '((?k "Keep empty commits" "--keep-empty")
(?p "Preserve merges" "--preserve-merges")
......@@ -34,7 +34,7 @@
(magit-define-popup magit-stash-popup
"Popup console for stash commands."
:man-page "git-stash"
:switches '((?u "Also save untracked files" "--include-untracked")
(?a "Also save untracked and ignored files" "--all"))
......@@ -560,7 +560,7 @@ Type \\[magit-reset-head] to reset HEAD to the commit at point.
(magit-define-popup magit-show-refs-popup
"Popup console for `magit-show-refs'."
:man-page "git-branch"
:switches '((?m "Merged to HEAD" "--merged")
(?M "Merged to master" "--merged=master")
......@@ -945,7 +945,7 @@ Non-interactively DIRECTORY is (re-)initialized unconditionally."
(magit-define-popup magit-branch-popup
"Popup console for branch commands."
:man-page "git-branch"
:switches '((?t "Set upstream configuration" "--track"))
:actions '((?b "Checkout" magit-checkout)
......@@ -1108,7 +1108,7 @@ line is inserted at all."
(magit-define-popup magit-merge-popup
"Popup console for merge commands."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-merge"
:switches '((?f "Fast-forward only" "--ff-only")
(?n "No fast-forward" "--no-ff")
......@@ -1378,7 +1378,7 @@ If FILE isn't tracked in Git fallback to using `delete-file'."
(magit-define-popup magit-tag-popup
"Popup console for tag commands."
:man-page "git-tag"
:switches '((?a "Annotate" "--annotate")
(?s "Sign" "--sign")
......@@ -1441,7 +1441,7 @@ defaulting to the tag at point.
(magit-define-popup magit-notes-popup
"Popup console for notes commands."
'magit-popups 'magit-popup-sequence-mode
'magit-commands 'magit-popup-sequence-mode
:man-page "git-tag"
:switches '((?n "Dry run" "--dry-run"))
:options '((?r "Manipulate ref" "--ref=" magit-notes-popup-read-ref)
......@@ -1581,7 +1581,7 @@ the current repository."
(magit-define-popup magit-submodule-popup
"Popup console for submodule commands."
'magit-commands nil nil
:man-page "git-submodule"
:actions '((?a "Add" magit-submodule-add)
(?b "Setup" magit-submodule-setup)
......@@ -1656,7 +1656,7 @@ With a prefix argument fetch all remotes."
(magit-define-popup magit-dispatch-popup
"Popup console for dispatching other popups."
'magit-commands nil nil
:actions '((?b "Branching" magit-branch-popup)
(?B "Bisecting" magit-bisect-popup)
(?c "Committing" magit-commit-popup)
......@@ -1690,7 +1690,7 @@ With a prefix argument fetch all remotes."
(magit-define-popup magit-run-popup
"Popup console for running raw Git commands."
'magit-commands nil nil
:actions '((?! "Git Subcommand (from root)" magit-git-command-topdir)
(?: "Git Subcommand (from pwd)" magit-git-command)
(?g "Git Gui" magit-run-git-gui)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment