From: Lin Sun Date: Fri, 5 Apr 2024 06:58:07 +0000 (+0000) Subject: * lisp/master.el (master-says): Check nil argument (bug#70230). X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa754d1c1457c20e140ea7a038f521a95bcd023d;p=emacs.git * lisp/master.el (master-says): Check nil argument (bug#70230). (cherry picked from commit c7a0e4faa2a584063e4ace0ac4da8fb0ae1c5e50) --- diff --git a/lisp/master.el b/lisp/master.el index 0caf4d7963f..9151ca212d1 100644 --- a/lisp/master.el +++ b/lisp/master.el @@ -136,6 +136,8 @@ See `recenter'." (defun master-says (&optional command arg) "Display slave buffer and execute COMMAND with ARG in its window." (interactive) + (unless master-of + (error "Current buffer is not a master of any other buffer")) (if (null (buffer-live-p (get-buffer master-of))) (error "Slave buffer has disappeared") (let ((window (selected-window)))