[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/ediprolog 4fabe53646 11/31: ENHANCED: Atomic undo of the
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/ediprolog 4fabe53646 11/31: ENHANCED: Atomic undo of the whole interaction. |
Date: |
Sun, 2 Oct 2022 17:01:37 -0400 (EDT) |
branch: scratch/ediprolog
commit 4fabe53646d98286e500aa96cc27d27ae85639d1
Author: Markus Triska <triska@metalevel.at>
Commit: Markus Triska <triska@metalevel.at>
ENHANCED: Atomic undo of the whole interaction.
This feature is available in recent Emacs (development) versions.
---
ediprolog.el | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ediprolog.el b/ediprolog.el
index 7a1c736341..343ad1cb10 100644
--- a/ediprolog.el
+++ b/ediprolog.el
@@ -1,8 +1,8 @@
;;; ediprolog.el --- Emacs Does Interactive Prolog
-;; Copyright (C) 2006, 2007, 2008, 2009, 2012, 2013 Markus Triska
+;; Copyright (C) 2006, 2007, 2008, 2009, 2012, 2013, 2016 Markus Triska
-;; Author: Markus Triska <markus.triska@gmx.at>
+;; Author: Markus Triska <triska@metalevel.at>
;; Keywords: languages, processes
;; This file is free software; you can redistribute it and/or modify
@@ -16,9 +16,7 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
@@ -83,32 +81,29 @@
;; C-u F10 first consult buffer, then evaluate query (if any)
;; C-u C-u F10 like C-u F10, with a new process
-;; Tested with SWI-Prolog 5.6.55 + Emacs 21.2, 22.3, 23.1 and 24.3
+;; Tested with SWI-Prolog 7.3.21 + Emacs 22.1, 23.4, 24.5, 25.1 and 26.0
;;; Code:
-(defconst ediprolog-version "0.9z")
+(defconst ediprolog-version "1.2-PRE")
(defgroup ediprolog nil
"Transparent interaction with SWI-Prolog."
:group 'languages
:group 'processes)
-;;;###autoload
(defcustom ediprolog-program
(or (executable-find "swipl") (executable-find "pl") "swipl")
"Program name of the Prolog executable."
:group 'ediprolog
:type 'string)
-;;;###autoload
(defcustom ediprolog-program-switches nil
"List of switches passed to the Prolog process. Example:
'(\"-G128M\" \"-O\")"
:group 'ediprolog
:type '(repeat string))
-;;;###autoload
(defcustom ediprolog-prefix "%@ "
"String to prepend when inserting output from the Prolog
process into the buffer."
@@ -348,13 +343,18 @@ arguments, equivalent to `ediprolog-remove-interactions'."
;; omit trailing whitespace
(+ (point) (skip-chars-backward "\t "))
(error "Missing `.' at the end of this query")))
- (query (buffer-substring-no-properties from to)))
+ (query (buffer-substring-no-properties from to))
+ (handle (and (fboundp 'prepare-change-group)
+ (fboundp 'undo-amalgamate-change-group)
+ (cons t (prepare-change-group)))))
(end-of-line)
(insert "\n" ediprolog-indent-prefix ediprolog-prefix)
(ediprolog-interact
(format "%s\n" (mapconcat #'identity
;; `%' can precede each query line
- (split-string query "\n[ \t%]*") " "))))
+ (split-string query "\n[ \t%]*") " ")))
+ (when handle
+ (undo-amalgamate-change-group (cdr handle))))
t))
;;;###autoload
- [elpa] branch scratch/ediprolog created (now 7af081ba84), Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 4da46823c9 06/31: use markdown elements for formatting, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 4fabe53646 11/31: ENHANCED: Atomic undo of the whole interaction.,
Stefan Monnier <=
- [elpa] scratch/ediprolog 70bf2c095a 14/31: mention project page earlier, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 7af081ba84 31/31: Merge remote-tracking branch 'upstream/ediprolog/main' into externals/ediprolog, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 49679a0c44 28/31: use library(clpz) and Scryer Prolog interaction in screenshot, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 62ce0025b8 27/31: use compact string notation in sample queries, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 29a8c4a796 03/31: wording for README, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 277d0f9e72 05/31: add screenshot, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog ade75de9ae 07/31: table formatting, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 51a610ebc2 08/31: formatting and layout of Emacs commands, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 1c8b127701 02/31: initial revision, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog f1b2480f46 12/31: preparing version 1.2, Stefan Monnier, 2022/10/02