Suppress delete-window in org related functions

- If there's only one other window, delete-window would be called,
  instead of delete-other-windows
- when there is only one window other than the popup, this other window
  is the main window in this frame, delete it would raise an error:
  `delete-window: Attempt to delete main window of frame <frame name>`
This commit is contained in:
Yiming Chen 2020-01-05 11:25:21 +08:00
parent f26b148b2b
commit 02a4f6b573

View file

@ -240,6 +240,8 @@ the command buffer."
org-fast-todo-selection)
(if +popup-mode
(cl-letf (((symbol-function #'delete-other-windows)
(symbol-function #'ignore))
((symbol-function #'delete-window)
(symbol-function #'ignore)))
(apply orig-fn args))
(apply orig-fn args)))