]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/master.el (master-says): Check nil argument (bug#70230).
authorLin Sun <sunlin7@hotmail.com>
Fri, 5 Apr 2024 06:58:07 +0000 (06:58 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sun, 7 Apr 2024 16:34:42 +0000 (18:34 +0200)
(cherry picked from commit c7a0e4faa2a584063e4ace0ac4da8fb0ae1c5e50)

lisp/master.el

index 0caf4d7963fc70b31270110c6a72cb7f15e44ec9..9151ca212d1099311c871eac6bcad56d25102483 100644 (file)
@@ -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)))