Subject: bug#70230: closed (Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 07 Apr 2024 06:18:02 +0000

Your bug report

#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70230: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70230
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#70230: 30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter
From: Eli Zaretskii <[email-masked]>
To: Lin Sun <[email-masked]>
Cc: [email-masked]
Date: Sun, 07 Apr 2024 09:17:00 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Lin Sun <[email-masked]>
> Date: Sat, 6 Apr 2024 21:26:49 +0000
> Cc: [email-masked]
> 
> Yes, the "Current buffer is not a master of any other buffer" is more accurate.
> The changed message path is attached.

Thanks, installed on master, and closing the bug.

P.S. Please in the future format the commit log message according to
our conventions, and also mention the bug number when known.

Subject: 30.0.50; [PATCH] * lisp/master.el (master-says): check nil parameter
From: Lin Sun <[email-masked]>
To: [email-masked]
Date: Sat, 6 Apr 2024 00:05:29 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

The `(master-says)' will trigger an unexpected error message with follow code:

(require 'master)
(master-says)

> Wrong type argument: stringp, nil

The patch tries checking the nil parameter before calling `get-buffer'
to avoid the unexpected err message.

Please help check it. Thanks.

Best regards
Lin
From 7a0dcde5fec2b7b7fdd1c74db1440183c11cfca6 Mon Sep 17 00:00:00 2001
From: Lin Sun <[email-masked]>
Date: Fri, 5 Apr 2024 06:58:07 +0000
Subject: [PATCH] * lisp/master.el (master-says): check nil parameter

---
 lisp/master.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/master.el b/lisp/master.el
index 0caf4d7963..4bdf686111 100644
--- a/lisp/master.el
+++ b/lisp/master.el
@@ -136,7 +136,8 @@ master-says-recenter
 (defun master-says (&optional command arg)
   "Display slave buffer and execute COMMAND with ARG in its window."
   (interactive)
-  (if (null (buffer-live-p (get-buffer master-of)))
+  (if (not (and master-of
+                (buffer-live-p (get-buffer master-of))))
       (error "Slave buffer has disappeared")
     (let ((window  (selected-window)))
       (if (not (eq (window-buffer window) (get-buffer master-of)))
-- 
2.20.5