branch: elpa/magit
commit bf920b7ff7101d2514232fb69d6a255a51661c1d
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-{stage,unstage}-buffer-file: Rename to magit-file-{stage,unstage}
    
    For consistency with the other `magit-file-*' commands.
---
 lisp/magit-apply.el |  4 ++--
 lisp/magit-files.el | 15 +++++++++++----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 3a3621dd7a..43986e5a98 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -397,7 +397,7 @@ ignored) files."
   (list #'magit-stage
         #'magit-stage-file
         #'magit-stage-modified
-        'magit-stage-buffer-file))
+        'magit-file-stage))
 
 (defun magit-run-post-stage-hook ()
   (when (memq this-command magit-post-stage-hook-commands)
@@ -476,7 +476,7 @@ ignored) files."
   (list #'magit-unstage
         #'magit-unstage-file
         #'magit-unstage-all
-        'magit-unstage-buffer-file))
+        'magit-file-unstage))
 
 (defun magit-run-post-unstage-hook ()
   (when (memq this-command magit-post-unstage-hook-commands)
diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index 506ee27e3c..30827a6547 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -300,8 +300,8 @@ to `magit-dispatch'."
   :info-manual "(magit) Minor Mode for Buffers Visiting Files"
   [:if magit-file-relative-name
    ["File actions"
-    ("  s" "Stage"    magit-stage-buffer-file)
-    ("  u" "Unstage"  magit-unstage-buffer-file)
+    ("  s" "Stage"    magit-file-stage)
+    ("  u" "Unstage"  magit-file-unstage)
     (", x" "Untrack"  magit-file-untrack)
     (", r" "Rename"   magit-file-rename)
     (", k" "Delete"   magit-file-delete)
@@ -420,7 +420,7 @@ the same location in the respective file in the working 
tree."
 ;;; File Commands
 
 ;;;###autoload
-(defun magit-stage-buffer-file ()
+(defun magit-file-stage ()
   "Stage all changes to the file being visited in the current buffer."
   (interactive)
   (unless buffer-file-name
@@ -433,7 +433,7 @@ the same location in the respective file in the working 
tree."
                    (list (magit-file-relative-name)))))
 
 ;;;###autoload
-(defun magit-unstage-buffer-file ()
+(defun magit-file-unstage ()
   "Unstage all changes to the file being visited in the current buffer."
   (interactive)
   (unless buffer-file-name
@@ -581,5 +581,12 @@ If DEFAULT is non-nil, use this as the default value 
instead of
    (concat "No file changed in " rev-or-range)))
 
 ;;; _
+
+(define-obsolete-function-alias 'magit-stage-buffer-file
+  'magit-file-stage "Magit 4.3.2")
+
+(define-obsolete-function-alias 'magit-unstage-buffer-file
+  'magit-file-unstage "Magit 4.3.2")
+
 (provide 'magit-files)
 ;;; magit-files.el ends here

Reply via email to