From: Mark Wooding Date: Mon, 29 Apr 2024 10:00:38 +0000 (+0100) Subject: el/dot-emacs.el (mdw-designate-window): Say if no designation cleared. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/2d70af4a9579109278c9c81b801015942b890b44 el/dot-emacs.el (mdw-designate-window): Say if no designation cleared. Print a different message if we were asked to clear the designation, but in fact no window was designated anyway. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 07b6d03..6cad98c 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -706,10 +706,13 @@ With a prefix argument, clear the designated window." (interactive "P") (let ((window (selected-window))) (cond (cancel - (setq mdw-designated-window nil) - (unless (mdw-emacs-version-p 24) - (setq display-buffer-function nil)) - (message "Window designation cleared.")) + (cond (mdw-designated-window + (setq mdw-designated-window nil) + (unless (mdw-emacs-version-p 24) + (setq display-buffer-function nil)) + (message "Window designation cleared.")) + (t + (message "No designated window active.")))) ((window-dedicated-p window) (error "Window is dedicated to its buffer.")) (t