From 5b63e665b8a336176e94f38eab4b7fef519d793e Mon Sep 17 00:00:00 2001 From: Zhitao Gong Date: Wed, 10 Jan 2024 12:49:20 -0500 Subject: [PATCH 1/3] Fix #39 edit-indirect--clean-up is gone According to https://github.com/Fanael/edit-indirect/commit/d0378d9747791fcd78370a0e52ec018d5970c482, `(edit-indirect--abort t)` replaces `(edit-indirect--clean-up)`. --- separedit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/separedit.el b/separedit.el index effb7e9..c150f64 100644 --- a/separedit.el +++ b/separedit.el @@ -1727,7 +1727,7 @@ It will override by the key that `separedit' binding in source buffer.") (mark-beg (overlay-start edit-indirect--overlay)) (mark-end (overlay-end edit-indirect--overlay))) (separedit--apply-changes) - (edit-indirect--clean-up) ;; Returned to source buffer + (edit-indirect--abort t) ;; Returned to source buffer (goto-char (save-excursion (save-restriction From 814f12b38b8599ce75da1525610d7696fb3b3688 Mon Sep 17 00:00:00 2001 From: Zhitao Gong Date: Thu, 18 Jan 2024 10:50:01 -0500 Subject: [PATCH 2/3] Update separadit-save. --- separedit.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/separedit.el b/separedit.el index c150f64..3c1d20d 100644 --- a/separedit.el +++ b/separedit.el @@ -1677,7 +1677,7 @@ It will override by the key that `separedit' binding in source buffer.") (scp (nth 3 separedit--help-variable-edit-info)) (buf (nth 4 separedit--help-variable-edit-info)) (val (if (nth 2 separedit--help-variable-edit-info) - (substring-no-properties (buffer-string)) + (substring-no-properties (buffer-string)) (list 'quote (car (read-from-string (buffer-string))))))) (cond ((and (eq scp 'local) buf) (with-current-buffer buf (eval `(setq-local ,sym ,val)))) @@ -1699,15 +1699,15 @@ It will override by the key that `separedit' binding in source buffer.") ;; Clone a buffer to protect the folding of text in edit buffer. (clone-buffer (concat (buffer-name) " "))) (function-backup - ;; Temprary disable the ‘edit-indirect--clean-up’ (but who calls + ;; Temprary disable the ‘edit-indirect--abort’ (but who calls ;; this function after the clone buffer is killed?) - (symbol-function 'edit-indirect--clean-up))) + (symbol-function 'edit-indirect--abort))) (unwind-protect (with-current-buffer edit-buffer-clone - (fset 'edit-indirect--clean-up (lambda ())) + (fset 'edit-indirect--abort #'ignore) (separedit--apply-changes)) (kill-buffer edit-buffer-clone) - (fset 'edit-indirect--clean-up function-backup) + (fset 'edit-indirect--abort function-backup) (if (and separedit-write-file-when-execute-save (buffer-file-name source-buffer)) (with-current-buffer source-buffer @@ -1844,7 +1844,7 @@ MAX-WIDTH maximum width that can be removed" (defun separedit--remove-c/c++-macro-delimiter (_ &optional _) "Remove c/c++ macro delimiter of each line when etering edit buffer." (let ((inhibit-read-only t) - ;; Regexp from `separedit-block-regexp-plists' is not working as + ;; Regexp from `separedit-block-regexp-plists' is not working as ;; expected when search backward, use the following instead: (regexp "\\(?:[^\s\t]\\|^[\s\t]\\)\\([\s\t]*\\\\[\s\t]*\\)")) (save-excursion From 71545482bf75cb10bdd75abe2d93ecb3d9caa6c8 Mon Sep 17 00:00:00 2001 From: Zhitao Gong Date: Thu, 18 Jan 2024 10:56:19 -0500 Subject: [PATCH 3/3] Update metadata. --- separedit.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/separedit.el b/separedit.el index 3c1d20d..5572af6 100644 --- a/separedit.el +++ b/separedit.el @@ -5,9 +5,9 @@ ;; Author: Gong Qijian ;; Created: 2019/04/06 ;; Version: 0.3.37 -;; Last-Updated: 2023-05-13 10:33:45 +0800 -;; by: Gong Qijian -;; Package-Requires: ((emacs "25.1") (dash "2.18") (edit-indirect "0.1.5")) +;; Last-Updated: 2024-01-18 10:54:45 -0500 +;; by: Zhitao Gong +;; Package-Requires: ((emacs "25.1") (dash "2.18") (edit-indirect "0.1.11")) ;; URL: https://github.com/twlz0ne/separedit.el ;; Keywords: tools languages docs