emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auto-overlays f39daaa 05/93: Version 0.10 of the predic


From: Stefan Monnier
Subject: [elpa] externals/auto-overlays f39daaa 05/93: Version 0.10 of the predictive completion package.
Date: Mon, 14 Dec 2020 13:00:26 -0500 (EST)

branch: externals/auto-overlays
commit f39daaa4555d704faeea5cca1408552f0cb9294e
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <tsc25@cantab.net>

    Version 0.10 of the predictive completion package.
---
 auto-overlay-common.el     | 29 +++++++++++---------
 auto-overlay-line.el       | 29 +++++++++++---------
 auto-overlay-self.el       | 28 +++++++++++---------
 auto-overlay-stack-sync.el | 33 ++++++++++++-----------
 auto-overlay-stack.el      | 66 ++++++++++++++++++++++++----------------------
 auto-overlay-word.el       | 29 +++++++++++---------
 auto-overlays.el           | 34 +++++++++++++++---------
 7 files changed, 136 insertions(+), 112 deletions(-)

diff --git a/auto-overlay-common.el b/auto-overlay-common.el
index 187c4f2..cdb9379 100644
--- a/auto-overlay-common.el
+++ b/auto-overlay-common.el
@@ -1,28 +1,31 @@
+
 ;;; auto-overlay-common.el --- general overlay functions
 
+
 ;; Copyright (C) 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.1
 ;; Keywords: automatic, overlays
+;; URL: http://www.dr-qubit.org/emacs.php
+
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
diff --git a/auto-overlay-line.el b/auto-overlay-line.el
index e488fe2..c125d90 100644
--- a/auto-overlay-line.el
+++ b/auto-overlay-line.el
@@ -1,28 +1,31 @@
+
 ;;; auto-overlay-line.el --- automatic overlays for single lines
 
+
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.2.1
 ;; Keywords: automatic, overlays, line
+;; URL: http://www.dr-qubit.org/emacs.php
+
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
diff --git a/auto-overlay-self.el b/auto-overlay-self.el
index a9ac424..04b0bb6 100644
--- a/auto-overlay-self.el
+++ b/auto-overlay-self.el
@@ -1,28 +1,30 @@
+
 ;;; auto-overlay-self.el --- self-delimited automatic overlays
 
+
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.2.1
 ;; Keywords: automatic, overlays, self
+;; URL: http://www.dr-qubit.org/emacs.php
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
diff --git a/auto-overlay-stack-sync.el b/auto-overlay-stack-sync.el
index 0cf5b6b..d76d744 100644
--- a/auto-overlay-stack-sync.el
+++ b/auto-overlay-stack-sync.el
@@ -1,28 +1,30 @@
+
 ;;; auto-overlay-stack-sync.el --- syncronised stacked automatic overlays
 
+
 ;; Copyright (C) 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.1
 ;; Keywords: automatic, overlays, stack, sync
+;; URL: http://www.dr-qubit.org/emacs.php
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
@@ -106,8 +108,9 @@
                           (not (string=
                                 str (match-string (auto-o-regexp-group-nth
                                                    1 o-other)))))
-                 (replace-match str t t nil
-                                (auto-o-regexp-group-nth 1 o-other))))
+                 (let ((inhibit-modification-hooks t))
+                   (replace-match str t t nil
+                                  (auto-o-regexp-group-nth 1 o-other)))))
              )))
        )))
 )
diff --git a/auto-overlay-stack.el b/auto-overlay-stack.el
index 0c1224d..6c34989 100644
--- a/auto-overlay-stack.el
+++ b/auto-overlay-stack.el
@@ -1,28 +1,31 @@
+
 ;;; auto-overlay-stack.el --- stacked start/end-delimited automatic overlays
 
+
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.1.1
 ;; Keywords: automatic, overlays, stack
+;; URL: http://www.dr-qubit.org/emacs.php
+
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
@@ -90,28 +93,27 @@
   (let* ((overlay-stack (auto-o-stack o-self))
        (o-parent (car overlay-stack)))
     
-    ;; if parent is the only overlay in the stack...
-    (if (= (length overlay-stack) 1)
-       ;; if we're a start match...
-       (if (eq (auto-o-edge o-self) 'start)
-           (if (auto-o-end-matched-p o-parent)
-               ;; if parent is end-matched, make it start-unmatched
-               (auto-o-match-overlay o-parent 'unmatched nil)
-             ;; if parent is end-unmatched delete it
-             (auto-o-delete-overlay o-parent))
-           
-         ;; if we're an end match...
-         (if (auto-o-start-matched-p o-parent)
-             ;; if parent is start matched, make it end-unmatched
-             (auto-o-match-overlay o-parent nil 'unmatched)
-           ;; if parent is start-unmatched, delete it
-           (auto-o-delete-overlay o-parent)))
-      
-      
+    (cond
+     ;; if other end of parent is unmatched, just delete parent
+     ((not (auto-o-edge-matched-p
+           o-parent
+           (if (eq (auto-o-edge o-self) 'start) 'end 'start)))
+      (auto-o-delete-overlay o-parent))
+
+     ;; if parent is the only overlay in the stack...
+     ((= (length overlay-stack) 1)
+      ;; if we're a start match, make parent start-unmatched
+      (if (eq (auto-o-edge o-self) 'start)
+         (auto-o-match-overlay o-parent 'unmatched nil)
+           ;; if we're an end match, make parent end-unmatched
+       (auto-o-match-overlay o-parent nil 'unmatched)))
+     
       ;; otherwise, unmatch ourselves from parent and cascade the stack
+     (t
       (overlay-put o-parent (auto-o-edge o-self) nil)
       (overlay-put o-self 'parent nil)
-      (auto-o-stack-cascade overlay-stack)))
+      (auto-o-stack-cascade overlay-stack))
+     ))
 )
 
       
diff --git a/auto-overlay-word.el b/auto-overlay-word.el
index 92f481b..961294d 100644
--- a/auto-overlay-word.el
+++ b/auto-overlay-word.el
@@ -1,28 +1,31 @@
+
 ;;; auto-overlay-word.el --- automatic overlays for single "words"
 
+
 ;; Copyright (C) 2005 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.1
 ;; Keywords: automatic, overlays, word
+;; URL: http://www.dr-qubit.org/emacs.php
+
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
diff --git a/auto-overlays.el b/auto-overlays.el
index b5a0fa5..17cf87d 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -1,28 +1,31 @@
+
 ;;; auto-overlays.el --- automatic regexp-delimited overlays for emacs
 
+
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
-;; Author: Toby Cubitt
+;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.4.1
 ;; Keywords: automatic, overlays
+;; URL: http://www.dr-qubit.org/emacs.php
+
 
 ;; This file is part of the Emacs Automatic Overlays package.
 ;;
-;; The Emacs Automatic Overlays package is free software; you can
-;; redistribute it and/or modify it under the terms of the GNU
-;; General Public License as published by the Free Software
-;; Foundation; either version 2 of the License, or (at your option)
-;; any later version.
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
 ;;
-;; The Emacs Automatic Overlays package is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY; without even the
-;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;; PURPOSE.  See the GNU General Public License for more details.
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with the Emacs Automatic Overlays package; if not, write
-;; to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;; Boston, MA 02111-1307 USA
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 
 ;;; Change Log:
@@ -182,6 +185,11 @@
      (when (>= (length funcs) 4) (nth 3 funcs))))
 
 
+(defmacro auto-o-edge-matched-p (overlay edge)
+  ;; test if EDGE of OVERLAY is matched
+  `(overlay-get ,overlay ,edge))
+
+
 (defmacro auto-o-start-matched-p (overlay)
   ;; test if OVERLAY is start-matched
   `(overlay-get ,overlay 'start))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]