[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/wisi abbb0c2 19/35: Release wisi 1.1.4, ada-mode 5.2.1
From: |
Stefan Monnier |
Subject: |
[elpa] externals/wisi abbb0c2 19/35: Release wisi 1.1.4, ada-mode 5.2.1 |
Date: |
Sat, 28 Nov 2020 14:47:53 -0500 (EST) |
branch: externals/wisi
commit abbb0c283ba47be9095694406b6de46399d04701
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>
Release wisi 1.1.4, ada-mode 5.2.1
---
NEWS | 6 ++++++
README | 2 +-
wisi.el | 28 ++++++++++++++++------------
3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/NEWS b/NEWS
index 4a9f690..06470ae 100644
--- a/NEWS
+++ b/NEWS
@@ -7,7 +7,13 @@ Please send wisi bug reports to bug-gnu-emacs@gnu.org, with
'wisi' in the subject. If possible, use M-x report-emacs-bug.
+* wisi 1.1.4
+31 Oct 2016
+
+** wisi-validate-cache takes optional error-on-fail arg.
+
* wisi 1.1.3
+26 Jul 2016
** improve use of quotes in doc strings.
diff --git a/README b/README
index 3c27c32..82ee858 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Emacs wisi package 1.1.3
+Emacs wisi package 1.1.4
The wisi package provides utilities for using generalized LALR parsers
to do indentation and navigation. See ada-mode for an example of its
diff --git a/wisi.el b/wisi.el
index 7b7f55e..5a3569a 100644
--- a/wisi.el
+++ b/wisi.el
@@ -7,9 +7,9 @@
;; Keywords: parser
;; indentation
;; navigation
-;; Version: 1.1.3
+;; Version: 1.1.4
;; package-requires: ((cl-lib "0.4") (emacs "24.2"))
-;; URL: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
+;; URL: http://www.nongnu.org/ada-mode/wisi/wisi.html
;;
;; This file is part of GNU Emacs.
;;
@@ -680,7 +680,7 @@ If accessing cache at a marker for a token as set by
`wisi-cache-tokens', POS mu
(defvar wisi-post-parse-succeed-hook nil
"Hook run after parse succeeds.")
-(defun wisi-validate-cache (pos)
+(defun wisi-validate-cache (pos &optional error-on-fail)
"Ensure cached data is valid at least up to POS in current buffer."
(let ((msg (when (> wisi-debug 0) (format "wisi: parsing %s:%d ..."
(buffer-name) (line-number-at-pos pos)))))
;; If wisi-cache-max = pos, then there is no cache at pos; need parse
@@ -722,14 +722,18 @@ If accessing cache at a marker for a token as set by
`wisi-cache-tokens', POS mu
))
(if wisi-parse-error-msg
;; error
- (when (> wisi-debug 0)
+ (cond
+ ((> wisi-debug 0)
(message "%s error" msg)
(wisi-goto-error)
- (error wisi-parse-error-msg))
+ (error wisi-parse-error-msg)))
;; no msg; success
(when (> wisi-debug 0)
(message "%s done" msg)))
- )))
+ )
+ (when (and error-on-fail (not (>= wisi-cache-max pos)))
+ (error "parse failed"))
+ ))
(defun wisi-fontify-region (_begin end)
"For `jit-lock-functions'."
@@ -1265,7 +1269,7 @@ If LIMIT (a buffer position) is reached, throw an error."
"If not at a cached token, move forward to next
cache. Otherwise move to cache-next, or next cache if nil.
Return cache found."
- (wisi-validate-cache (point-max)) ;; ensure there is a next cache to move to
+ (wisi-validate-cache (point-max) t) ;; ensure there is a next cache to move
to
(let ((cache (wisi-get-cache (point))))
(if cache
(let ((next (wisi-cache-next cache)))
@@ -1281,7 +1285,7 @@ Return cache found."
(defun wisi-backward-statement-keyword ()
"If not at a cached token, move backward to prev
cache. Otherwise move to cache-prev, or prev cache if nil."
- (wisi-validate-cache (point))
+ (wisi-validate-cache (point) t)
(let ((cache (wisi-get-cache (point))))
(if cache
(let ((prev (wisi-cache-prev cache)))
@@ -1331,7 +1335,7 @@ Return start cache."
"Move point to token at start of statement point is in or after.
Return start cache."
(interactive)
- (wisi-validate-cache (point))
+ (wisi-validate-cache (point) t)
(let ((cache (wisi-get-cache (point))))
(unless cache
(setq cache (wisi-backward-cache)))
@@ -1340,7 +1344,7 @@ Return start cache."
(defun wisi-goto-statement-end ()
"Move point to token at end of statement point is in or before."
(interactive)
- (wisi-validate-cache (point))
+ (wisi-validate-cache (point) t)
(let ((cache (or (wisi-get-cache (point))
(wisi-forward-cache))))
(when (wisi-cache-end cache)
@@ -1409,7 +1413,7 @@ of CACHE with class statement-start or block-start."
(defun wisi-indent-statement ()
"Indent region given by `wisi-goto-start' on cache at or before point, then
wisi-cache-end."
- (wisi-validate-cache (point))
+ (wisi-validate-cache (point) t)
(save-excursion
(let ((cache (or (wisi-get-cache (point))
@@ -1493,7 +1497,7 @@ correct. Must leave point at indentation of current
line.")
(interactive)
(syntax-propertize (point-max))
(wisi-invalidate-cache)
- (wisi-validate-cache (point-max)))
+ (wisi-validate-cache (point-max)) t)
(defun wisi-lex-buffer ()
(interactive)
- [elpa] externals/wisi cb45dd5 07/35: * packages/ada-mode: version 5.1.1: fix wisi packaging bug, add -a in gnat-find, (continued)
- [elpa] externals/wisi cb45dd5 07/35: * packages/ada-mode: version 5.1.1: fix wisi packaging bug, add -a in gnat-find, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 8bdcee1 11/35: publish ada-mode 5.1.6, wisi 1.0.6, new package ada-ref-man, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 364da46 20/35: Update ada-mode to version 5.2.2, wisi to version 1.1.5, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 89eee25 23/35: Release ada-mode 6.0.1, wisi 2.0.1; fix copyright, packaging bugs, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi d0eac6a 34/35: Forgot some new files in wisi, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi a6b3115 24/35: * ada-mode, wisi: Fix file access rights, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi bd1884c 02/35: Fix up copyright notices., Stefan Monnier, 2020/11/28
- [elpa] externals/wisi c282a4b 13/35: update ada-mode, wisi, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 27db81d 17/35: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 724a763 31/35: In wisi sal-gen_unbounded_definite_red_black_trees.adb, correct WORKAROUND, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi abbb0c2 19/35: Release wisi 1.1.4, ada-mode 5.2.1,
Stefan Monnier <=
- [elpa] externals/wisi 5becb56 29/35: Release ada-mode 7.0.1, wisi 3.0.1, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 2114f5a 28/35: In ada-mode and wisi, release ada-mode 6.2.1, wisi 2.2.1; fix packaging bugs, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 2636b79 25/35: Release ada-mode 6.1.0, wisi 2.1.0, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi dd09dcf 35/35: * .gitignore: New file, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 232d669 18/35: Release: ada-mode: version 5.2.0. wisi: version 1.1.3, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi c7f61e5 26/35: In ada-mode, wisi; release ada-mode 6.1.1, wisi 2.1.1, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 66d7e59 27/35: In ada-mode, wisi: release Ada mode 6.2.0, wisi 1.2.0., Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 1dc8c19 12/35: release ada-mode 5.1.7, wisi 1.1.0; minor format changes in ada-ref-man (take 2), Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 5934bfc 06/35: release ada-mode 5.1.0, wisi 1.0.1, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi d9cd208 32/35: In ada-mode, release 7.1.3; in wisi, release 3.1.2, Stefan Monnier, 2020/11/28