[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/edit-indirect c6b08f5cd7 15/28: Call quit-window only when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/edit-indirect c6b08f5cd7 15/28: Call quit-window only when a window is created |
Date: |
Thu, 7 Jul 2022 11:59:14 -0400 (EDT) |
branch: elpa/edit-indirect
commit c6b08f5cd7bc66f52206b23f213c85a09fab888c
Author: Fanael Linithien <fanael4@gmail.com>
Commit: Fanael Linithien <fanael4@gmail.com>
Call quit-window only when a window is created
Fixes #2.
---
edit-indirect.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/edit-indirect.el b/edit-indirect.el
index c44af77f3f..c339f2bda4 100644
--- a/edit-indirect.el
+++ b/edit-indirect.el
@@ -7,7 +7,7 @@
;; This file is NOT part of GNU Emacs.
-;; Copyright (c) 2014, Fanael Linithien
+;; Copyright (c) 2014-2016, Fanael Linithien
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
@@ -143,7 +143,9 @@ In any case, return the edit-indirect buffer."
(user-error "No region")))
(let ((buffer (edit-indirect--get-edit-indirect-buffer beg end)))
(when display-buffer
- (select-window (display-buffer buffer)))
+ (let ((window (display-buffer buffer)))
+ (set-window-parameter window 'edit-indirect-should-quit t)
+ (select-window window)))
buffer))
(defvar edit-indirect-mode-map
@@ -338,7 +340,9 @@ called with updated positions."
;; won't try to call us again.
(setq edit-indirect--overlay nil)
;; If we created a window, get rid of it. Kill the buffer we created.
- (quit-window t))
+ (if (window-parameter nil 'edit-indirect-should-quit)
+ (quit-window t)
+ (kill-buffer)))
(defun edit-indirect--abort-on-kill-buffer ()
"Abort indirect edit.
- [nongnu] elpa/edit-indirect 7d9bcfced3 06/28: Extract buffer-local value handling into a macro., (continued)
- [nongnu] elpa/edit-indirect 7d9bcfced3 06/28: Extract buffer-local value handling into a macro., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 6fa78ff6f1 07/28: Prohibit modification at the beginning of the overlay., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect f43936b3a4 12/28: Use `quit-window' instead of `kill-buffer-and-window`., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect d1ab87fdfb 14/28: Release version 0.1.2., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 032ac0ec69 20/28: Try to preserve markers when committing, ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect e3d86416bc 26/28: Offer to commit edit-indirect buffers on save-buffers-kill-emacs, ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect ce6e60c705 08/28: Require Emacs 24.3, for user-error., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect a28aba75f8 13/28: Don't separate sentences with double spaces., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 523f84cb7e 10/28: Release version 0.1.1., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 45c4c72864 09/28: Use our own error signals inheriting from user-error., ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect c6b08f5cd7 15/28: Call quit-window only when a window is created,
ELPA Syncer <=
- [nongnu] elpa/edit-indirect 99a88e9590 17/28: Make edit-indirect-quit-window a buffer-local variable, ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 1d1dae8425 18/28: Release version 0.1.4, ELPA Syncer, 2022/07/07
- [nongnu] elpa/edit-indirect 935ded353b 22/28: Add SPDX license identifier for easy license identification, ELPA Syncer, 2022/07/07