From 9da9b613ad45c842f7a93677920844592ab495d5 Mon Sep 17 00:00:00 2001 From: john muhl Date: Tue, 8 Oct 2024 12:24:27 -0500 Subject: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc' * lisp/mpc.el (mpc-tagbrowser-buf): Use 'mpc-tagbrowser-tag-name' to ensure buffers corresponding to tags that end in Y are correctly pluralized; e.g. the tag "Directory" should create a buffer named "*MPC Directories*" not "*MPC Directorys". (cherry picked from commit 60e58be091bf075a03ac431444aa9c9b5832bb19) --- lisp/mpc.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/mpc.el b/lisp/mpc.el index ea472751832..b71cd445738 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1561,9 +1561,10 @@ when constructing the set of constraints." (t (concat (symbol-name tag) "s")))) (defun mpc-tagbrowser-buf (tag) - (let ((buf (mpc-proc-buffer (mpc-proc) tag))) + (let ((buf (mpc-proc-buffer (mpc-proc) tag)) + (tag-name (mpc-tagbrowser-tag-name tag))) (if (buffer-live-p buf) buf - (setq buf (get-buffer-create (format "*MPC %ss*" tag))) + (setq buf (get-buffer-create (format "*MPC %s*" tag-name))) (mpc-proc-buffer (mpc-proc) tag buf) (with-current-buffer buf (let ((inhibit-read-only t)) @@ -1574,7 +1575,7 @@ when constructing the set of constraints." (insert mpc-tagbrowser-all-name "\n")) (forward-line -1) (setq mpc-tag tag) - (setq mpc-tag-name (mpc-tagbrowser-tag-name tag)) + (setq mpc-tag-name tag-name) (mpc-tagbrowser-all-select) (mpc-tagbrowser-refresh) buf)))) -- 2.39.2