branch: elpa/magit
commit e569da5881888f82bf586431e61079144b1025ab
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-find-file-noselect: Absorb magit-find-file-noselect-1
---
lisp/magit-diff.el | 2 +-
lisp/magit-ediff.el | 2 +-
lisp/magit-files.el | 13 +++++--------
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 18cdce98941..5032177fbff 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -40,7 +40,7 @@
;; For `magit-diff-popup'
(declare-function magit-stash-show "magit-stash" (stash &optional args files))
;; For `magit-diff-visit-file'
-(declare-function magit-find-file-noselect "magit-files" (rev file))
+(declare-function magit-find-file-noselect "magit-files" (rev file &optional
revert))
(declare-function magit-status-setup-buffer "magit-status" (&optional
directory))
;; For `magit-diff-while-committing'
(declare-function magit-commit-diff-1 "magit-commit" ())
diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el
index 10d632c1baa..3630b357d26 100644
--- a/lisp/magit-ediff.el
+++ b/lisp/magit-ediff.el
@@ -332,7 +332,7 @@ FILE has to be relative to the top directory of the
repository."
(bufC* (or bufC (find-file-noselect file)))
(coding-system-for-read
(buffer-local-value 'buffer-file-coding-system bufC*))
- (bufA* (magit-find-file-noselect-1 "HEAD" file t))
+ (bufA* (magit-find-file-noselect "HEAD" file t))
(bufB* (magit-find-file-index-noselect file t)))
(with-current-buffer bufB* (setq buffer-read-only nil))
(magit-ediff-buffers
diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index 5d5fefc4c1d..ca2db5e7952 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -107,13 +107,7 @@ the line and column corresponding to that location."
(move-to-column col)))
buf))
-(defun magit-find-file-noselect (rev file)
- "Read FILE from REV into a buffer and return the buffer.
-REV is a revision or one of \"{worktree}\" or \"{index}\".
-FILE must be relative to the top directory of the repository."
- (magit-find-file-noselect-1 rev file))
-
-(defun magit-find-file-noselect-1 (rev file &optional revert)
+(defun magit-find-file-noselect (rev file &optional revert)
"Read FILE from REV into a buffer and return the buffer.
REV is a revision or one of \"{worktree}\" or \"{index}\".
FILE must be relative to the top directory of the repository.
@@ -200,7 +194,7 @@ See also https://github.com/doomemacs/doomemacs/pull/6309."
(defun magit-find-file-index-noselect (file &optional revert)
"Read FILE from the index into a buffer and return the buffer.
FILE must to be relative to the top directory of the repository."
- (magit-find-file-noselect-1 "{index}" file (or revert 'ask-revert)))
+ (magit-find-file-noselect "{index}" file (or revert 'ask-revert)))
(defun magit-update-index ()
"Update the index with the contents of the current buffer.
@@ -610,6 +604,9 @@ If DEFAULT is non-nil, use this as the default value
instead of
(define-obsolete-function-alias 'magit-unstage-buffer-file
'magit-file-unstage "Magit 4.3.2")
+(define-obsolete-function-alias 'magit-find-file-noselect-1
+ 'magit-find-file-noselect "Magit 4.3.9")
+
(provide 'magit-files)
;; Local Variables:
;; read-symbol-shorthands: (