commit | author | age
|
5cb5f7
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file contains utf-8 non-ASCII characters, |
|
7 |
;;; and so cannot be loaded into Emacs 22 or earlier. |
|
8 |
(and (boundp 'emacs-version) |
|
9 |
(< (aref emacs-version (1- (length emacs-version))) ?A) |
|
10 |
(string-lessp emacs-version "23") |
|
11 |
(error "`%s' was compiled for Emacs 23 or later" #$)) |
|
12 |
|
|
13 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
14 |
|
|
15 |
|
|
16 |
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311DD\312\313\314\315\316&\210\305\317\307\310\320DD\321\322\323\313\324\315\325& \207" [require cl-lib dash crm magit-popup custom-declare-variable magit-completing-read-function funcall function #[0 "\300\207" [magit-builtin-completing-read] 1] "Function to be called when requesting input from the user.\n\nIf you have enabled `ivy-mode' or `helm-mode', then you don't\nhave to customize this option; `magit-builtin-completing-read'\nwill work just fine. However, if you use Ido completion, then\nyou do have to use `magit-ido-completion-read', because Ido is\nless well behaved than the former, more modern alternatives.\n\nIf you would like to use Ivy or Helm completion with Magit but\nnot enable the respective modes globally, then customize this\noption to use `ivy-completing-read' or\n`helm--completing-read-default'. If you choose to use\n`ivy-completing-read', note that the items may always be shown in\nalphabetical order, depending on your version of Ivy." :group magit-essentials :type (radio (function-item magit-builtin-completing-read) (function-item magit-ido-completing-read) (function-item ivy-completing-read) (function-item helm--completing-read-default) (function :tag "Other function")) magit-dwim-selection #[0 "\300\207" [((magit-stash-apply nil t) (magit-stash-branch nil t) (magit-stash-branch-here nil t) (magit-stash-format-patch nil t) (magit-stash-drop nil ask) (magit-stash-pop nil ask) (forge-browse-commit nil t) (forge-browse-branch nil t) (forge-browse-remote nil t) (forge-browse-issue nil t) (forge-browse-pullreq nil t) (forge-edit-topic-title nil t) (forge-edit-topic-labels nil t) (forge-edit-topic-assignees nil t) (forge-visit-issue nil t) (forge-visit-pullreq nil t))] 1] "When not to offer alternatives and ask for confirmation.\n\nMany commands by default ask the user to select from a list of\npossible candidates. They do so even when there is a thing at\npoint that they can act on, which is then offered as the default.\n\nThis option can be used to tell certain commands to use the thing\nat point instead of asking the user to select a candidate to act\non, with or without confirmation.\n\nThe value has the form ((COMMAND nil|PROMPT DEFAULT)...).\n\n- COMMAND is the command that should not prompt for a choice.\n To have an effect, the command has to use the function\n `magit-completing-read' or a utility function which in turn uses\n that function.\n\n- If the command uses `magit-completing-read' multiple times, then\n PROMPT can be used to only affect one of these uses. PROMPT, if\n non-nil, is a regular expression that is used to match against\n the PROMPT argument passed to `magit-completing-read'.\n\n- DEFAULT specifies how to use the default. If it is t, then\n the DEFAULT argument passed to `magit-completing-read' is used\n without confirmation. If it is `ask', then the user is given\n a chance to abort. DEFAULT can also be nil, in which case the\n entry has no effect." :package-version (magit . "2.12.0") magit-commands (repeat (list (symbol :tag "Command") (choice (const :tag "for all prompts" nil) (regexp :tag "for prompts matching regexp")) (choice (const :tag "offer other choices" nil) (const :tag "require confirmation" ask) (const :tag "use default without confirmation" t))))] 10) |
|
17 |
(defconst magit--confirm-actions '((const reverse) (const discard) (const rename) (const resurrect) (const untrack) (const trash) (const delete) (const abort-rebase) (const abort-merge) (const merge-dirty) (const drop-stashes) (const reset-bisect) (const kill-process) (const delete-unmerged-branch) (const delete-pr-branch) (const remove-modules) (const stage-all-changes) (const unstage-all-changes) (const safe-with-wip))) |
|
18 |
(byte-code "\301\302\303\304\305DD\306\307\310\311\312\311\313\314\315\316\317\320\321\322BBBF&\210\301\323\303\304\324DD\325\307\326\311\327\314\315\330\331\320\321\332BBBF& \210\301\333\303\304\334DD\335\307\336\311\327\314\337& \210\301\340\303\304\341DD\342\307\343\311\327\314\344& \210\301\345\303\304\346DD\347\307\350\311\327\314\351& \210\301\352\303\304\353DD\354\307\355\311\327\314\356& \207" [magit--confirm-actions custom-declare-variable magit-no-confirm funcall function #[0 "\300\207" [nil] 1] "A list of symbols for actions Magit should not confirm, or t.\n\nMany potentially dangerous commands by default ask the user for\nconfirmation. Each of the below symbols stands for an action\nwhich, when invoked unintentionally or without being fully aware\nof the consequences, could lead to tears. In many cases there\nare several commands that perform variations of a certain action,\nso we don't use the command names but more generic symbols.\n\nApplying changes:\n\n `discard' Discarding one or more changes (i.e. hunks or the\n complete diff for a file) loses that change, obviously.\n\n `reverse' Reverting one or more changes can usually be undone\n by reverting the reversion.\n\n `stage-all-changes', `unstage-all-changes' When there are both\n staged and unstaged changes, then un-/staging everything would\n destroy that distinction. Of course that also applies when\n un-/staging a single change, but then less is lost and one does\n that so often that having to confirm every time would be\n unacceptable.\n\nFiles:\n\n `delete' When a file that isn't yet tracked by Git is deleted\n then it is completely lost, not just the last changes. Very\n dangerous.\n\n `trash' Instead of deleting a file it can also be move to the\n system trash. Obviously much less dangerous than deleting it.\n\n Also see option `magit-delete-by-moving-to-trash'.\n\n `resurrect' A deleted file can easily be resurrected by\n \"deleting\" the deletion, which is done using the same command\n that was used to delete the same file in the first place.\n\n `untrack' Untracking a file can be undone by tracking it again.\n\n `rename' Renaming a file can easily be undone.\n\nSequences:\n\n `reset-bisect' Aborting (known to Git as \"resetting\") a\n bisect operation loses all information collected so far.\n\n `abort-rebase' Aborting a rebase throws away all already\n modified commits, but it's possible to restore those from the\n reflog.\n\n `abort-merge' Aborting a merge throws away all conflict\n resolutions which has already been carried out by the user.\n\n `merge-dirty' Merging with a dirty worktree can make it hard to\n go back to the state before the merge was initiated.\n\nReferences:\n\n `delete-unmerged-branch' Once a branch has been deleted it can\n only be restored using low-level recovery tools provided by\n Git. And even then the reflog is gone. The user always has\n to confirm the deletion of a branch by accepting the default\n choice (or selecting another branch), but when a branch has\n not been merged yet, also make sure the user is aware of that.\n\n `delete-pr-branch' When deleting a branch that was created from\n a pull request and if no other branches still exist on that\n remote, then `magit-branch-delete' offers to delete the remote\n as well. This should be safe because it only happens if no\n other refs exist in the remotes namespace, and you can recreate\n the remote if necessary.\n\n `drop-stashes' Dropping a stash is dangerous because Git stores\n stashes in the reflog. Once a stash is removed, there is no\n going back without using low-level recovery tools provided by\n Git. When a single stash is dropped, then the user always has\n to confirm by accepting the default (or selecting another).\n This action only concerns the deletion of multiple stashes at\n once.\n\nEdit published history:\n\n Without adding these symbols here, you will be warned before\n editing commits that have already been pushed to one of the\n branches listed in `magit-published-branches'.\n\n `amend-published' Affects most commands that amend to \"HEAD\".\n\n `rebase-published' Affects commands that perform interactive\n rebases. This includes commands from the commit popup that\n modify a commit other than \"HEAD\", namely the various fixup\n and squash variants.\n\n `edit-published' Affects the commands `magit-edit-line-commit'\n and `magit-diff-edit-hunk-commit'. These two commands make\n it quite easy to accidentally edit a published commit, so you\n should think twice before configuring them not to ask for\n confirmation.\n\n To disable confirmation completely, add all three symbols here\n or set `magit-published-branches' to nil.\n\nRemoving modules:\n\n `remove-modules' When you remove the working directory of a\n module that does not contain uncommitted changes, then that is\n safer than doing so when there are uncommitted changes and/or\n when you also remove the gitdir. Still, you don't want to do\n that by accident.\n\n `remove-dirty-modules' When you remove the working directory of\n a module that contains uncommitted changes, then those changes\n are gone for good. It is better to go to the module, inspect\n these changes and only if appropriate discard them manually.\n\n `trash-module-gitdirs' When you remove the gitdir of a module,\n then all unpushed changes are gone for good. It is very easy\n to forget that you have some unfinished work on an unpublished\n feature branch or even in a stash.\n\n Actually there are some safety precautions in place, that might\n help you out if you make an unwise choice here, but don't count\n on it. In case of emergency, stay calm and check the stash and\n the `trash-directory' for traces of lost work.\n\nVarious:\n\n `kill-process' There seldom is a reason to kill a process.\n\nGlobal settings:\n\n Instead of adding all of the above symbols to the value of this\n option you can also set it to the atom `t', which has the same\n effect as adding all of the above symbols. Doing that most\n certainly is a bad idea, especially because other symbols might\n be added in the future. So even if you don't want to be asked\n for confirmation for any of these actions, you are still better\n of adding all of the respective symbols individually.\n\n When `magit-wip-before-change-mode' is enabled then these actions\n can fairly easily be undone: `discard', `reverse',\n `stage-all-changes', and `unstage-all-changes'. If and only if\n this mode is enabled, then `safe-with-wip' has the same effect\n as adding all of these symbols individually." :package-version (magit . "2.1.0") :group magit-essentials magit-commands :type choice (const :tag "Always require confirmation" nil) (const :tag "Never require confirmation" t) set :tag "Require confirmation except for" magit-slow-confirm #[0 "\300\207" [(drop-stashes)] 1] "Whether to ask user \"y or n\" or \"yes or no\" questions.\n\nWhen this is nil, then `y-or-n-p' is used when the user has to\nconfirm a potentially destructive action. When this is t, then\n`yes-or-no-p' is used instead. If this is a list of symbols\nidentifying actions, then `yes-or-no-p' is used for those,\n`y-or-no-p' for all others. The list of actions is the same as\nfor `magit-no-confirm' (which see)." (magit . "2.9.0") magit-miscellaneous (const :tag "Always ask \"yes or no\" questions" t) (const :tag "Always ask \"y or n\" questions" nil) "Ask \"yes or no\" questions only for" magit-no-message #[0 "\300\207" [nil] 1] "A list of messages Magit should not display.\n\nMagit displays most echo area messages using `message', but a few\nare displayed using `magit-message' instead, which takes the same\narguments as the former, FORMAT-STRING and ARGS. `magit-message'\nforgoes printing a message if any member of this list is a prefix\nof the respective FORMAT-STRING.\n\nIf Magit prints a message which causes you grief, then please\nfirst investigate whether there is another option which can be\nused to suppress it. If that is not the case, then ask the Magit\nmaintainers to start using `magit-message' instead of `message'\nin that case. We are not proactively replacing all uses of\n`message' with `magit-message', just in case someone *might* find\nsome of these messages useless.\n\nMessages which can currently be suppressed using this option are:\n* \"Turning on magit-auto-revert-mode...\"" (magit . "2.8.0") (repeat string) magit-ellipsis #[0 "\300\207" [8230] 1] "Character used to abbreviate text.\n\nCurrently this is used to abbreviate author names in the margin\nand in process buffers to elide `magit-git-global-arguments'." (magit . "2.1.0") character magit-update-other-window-delay #[0 "\300\207" [0.2] 1] "Delay before automatically updating the other window.\n\nWhen moving around in certain buffers, then certain other\nbuffers, which are being displayed in another window, may\noptionally be updated to display information about the\nsection at point.\n\nWhen holding down a key to move by more than just one section,\nthen that would update that buffer for each section on the way.\nTo prevent that, updating the revision buffer is delayed, and\nthis option controls for how long. For optimal experience you\nmight have to adjust this delay and/or the keyboard repeat rate\nand delay of your graphical environment or operating system." (magit . "2.3.0") number magit-view-git-manual-method #[0 "\300\207" [info] 1] "How links to Git documentation are followed from Magit's Info manuals.\n\n`info' Follow the link to the node in the `gitman' Info manual\n as usual. Unfortunately that manual is not installed by\n default on some platforms, and when it is then the nodes\n look worse than the actual manpages.\n\n`man' View the respective man-page using the `man' package.\n\n`woman' View the respective man-page using the `woman' package." (magit . "2.9.0") (choice (const :tag "view info manual" info) (const :tag "view manpage using `man'" man) (const :tag "view manpage using `woman'" woman))] 18) |
|
19 |
(defvar magit-completing-read--silent-default nil) |
|
20 |
#@1820 Read a choice in the minibuffer, or use the default choice. |
|
21 |
|
|
22 |
This is the function that Magit commands use when they need the |
|
23 |
user to select a single thing to act on. The arguments have the |
|
24 |
same meaning as for `completing-read', except for FALLBACK, which |
|
25 |
is unique to this function and is described below. |
|
26 |
|
|
27 |
Instead of asking the user to choose from a list of possible |
|
28 |
candidates, this function may instead just return the default |
|
29 |
specified by DEF, with or without requiring user confirmation. |
|
30 |
Whether that is the case depends on PROMPT, `this-command' and |
|
31 |
`magit-dwim-selection'. See the documentation of the latter for |
|
32 |
more information. |
|
33 |
|
|
34 |
If it does use the default without the user even having to |
|
35 |
confirm that, then `magit-completing-read--silent-default' is set |
|
36 |
to t, otherwise nil. |
|
37 |
|
|
38 |
If it does read a value in the minibuffer, then this function |
|
39 |
acts similarly to `completing-read', except for the following: |
|
40 |
|
|
41 |
- If REQUIRE-MATCH is nil and the user exits without a choice, |
|
42 |
then nil is returned instead of an empty string. |
|
43 |
|
|
44 |
- If REQUIRE-MATCH is non-nil and the users exits without a |
|
45 |
choice, an user-error is raised. |
|
46 |
|
|
47 |
- FALLBACK specifies a secondary default that is only used if |
|
48 |
the primary default DEF is nil. The secondary default is not |
|
49 |
subject to `magit-dwim-selection' — if DEF is nil but FALLBACK |
|
50 |
is not, then this function always asks the user to choose a |
|
51 |
candidate, just as if both defaults were nil. |
|
52 |
|
|
53 |
- ": " is appended to PROMPT. |
|
54 |
|
|
55 |
- PROMPT is modified to end with " (default DEF|FALLBACK): " |
|
56 |
provided that DEF or FALLBACK is non-nil, that neither |
|
57 |
`ivy-mode' nor `helm-mode' is enabled, and that |
|
58 |
`magit-completing-read-function' is set to its default value of |
|
59 |
`magit-builtin-completing-read'. |
|
60 |
|
|
61 |
(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF FALLBACK) |
|
62 |
(defalias 'magit-completing-read #[2050 "\304\205 \305\306\307\310\311\312\313!\314\"\315\316% \"8\211\203> |