Commit 1070e97e authored by Jonas Bernoulli's avatar Jonas Bernoulli

Remove obsolete variable magit-no-confirm-default

parent 65856ce0
......@@ -4,6 +4,9 @@ Magit v2.13.0 Release Notes (unreleased)
Changes since v2.12.0
* As announced earlier, the obsolete option `magit-no-confirm-default'
has been removed. #3232
* The interactive prompts for the various reset commands now indicate
the branch which is going to be reset. #3438
......@@ -456,9 +456,7 @@ Please see the manual for more information."
(user-error "Not a valid starting-point: %s" choice))))
(let ((branch (magit-read-string-ns (concat prompt " named"))))
(list branch
(let ((magit-no-confirm-default nil))
(magit-read-starting-point prompt branch)))
(magit-read-starting-point prompt branch)
......@@ -137,10 +137,6 @@ use `magit-pre-refresh-hook', `magit-post-refresh-hook',
(define-obsolete-function-alias 'magit-get-submodules
'magit-list-module-paths "Magit 2.12.0")
(make-obsolete-variable 'magit-no-confirm-default
"Magit 2.12.0")
(make-obsolete-variable 'magit-status-expand-stashes
"Magit 2.12.0")
......@@ -77,24 +77,6 @@ or `helm--completing-read-default'."
(function-item helm--completing-read-default)
(function :tag "Other function")))
(defvar magit-no-confirm-default nil
"A list of commands which should just use the default choice.
Many commands let the user choose the target they act on offering
a sensible default as default choice. If you think that that
default is so sensible that it should always be used without even
offering other choices, then add that command here.
Only the following commands support this option:
For these four commands `magit-branch-read-upstream-first'
must be non-nil, or adding them here has no effect.
(defcustom magit-dwim-selection
'((magit-stash-apply nil t)
(magit-stash-branch nil t)
......@@ -414,14 +396,12 @@ acts similarly to `completing-read', except for the following:
(setq magit-completing-read--silent-default nil)
(-if-let (dwim (and def
(or (nth 2 (-first (lambda (arg)
(pcase-let ((`(,cmd ,re ,_) arg))
(and (eq this-command cmd)
(or (not re)
(string-match-p re prompt)))))
(memq this-command
(with-no-warnings magit-no-confirm-default)))))
(nth 2 (-first (lambda (arg)
(pcase-let ((`(,cmd ,re ,_) arg))
(and (eq this-command cmd)
(or (not re)
(string-match-p re prompt)))))
(if (eq dwim 'ask)
(if (y-or-n-p (format "%s %s? " prompt def))
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