[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/wisi 5934bfc 06/35: release ada-mode 5.1.0, wisi 1.0.1
From: |
Stefan Monnier |
Subject: |
[elpa] externals/wisi 5934bfc 06/35: release ada-mode 5.1.0, wisi 1.0.1 |
Date: |
Sat, 28 Nov 2020 14:47:50 -0500 (EST) |
branch: externals/wisi
commit 5934bfc2f74ce27cfcf5a0e7a26966db43496350
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>
release ada-mode 5.1.0, wisi 1.0.1
* packages/ada-mode/*: ada-mode 5.1.0
* packages/wisi/wisi-parse.el: wisi 1.0.1
* packages/wisi/wisi.el: "
---
wisi-parse.el | 18 ++++++++++++------
wisi.el | 31 +++++++++++++++++++------------
2 files changed, 31 insertions(+), 18 deletions(-)
diff --git a/wisi-parse.el b/wisi-parse.el
index bb3b60b..906d19b 100755
--- a/wisi-parse.el
+++ b/wisi-parse.el
@@ -1,6 +1,6 @@
;;; wisi-parse.el --- Wisi parser
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -26,8 +26,8 @@
;;; Code:
+(require 'cl-lib)
(require 'semantic/wisent)
-(eval-when-compile (require 'cl-lib))
(cl-defstruct (wisi-parser-state
(:copier nil))
@@ -99,9 +99,6 @@ the grammar is excessively redundant.")
:label 0
:active 'shift
:stack (make-vector wisent-parse-max-stack-size nil)
- ;; FIXME: better error message when stack overflows, so
- ;; user can set wisent-parse-max-stack-size in file-local
- ;; vars.
:sp 0
:pending nil)))
(active-parser-count 1)
@@ -330,7 +327,16 @@ nil, 'shift, or 'accept."
(defun wisi-execute-pending (pending)
(while pending
(when (> wisi-debug 1) (message "%s" (car pending)))
- (apply (pop pending))))
+
+ (cond
+ ((and (>= emacs-major-version 24)
+ (>= emacs-minor-version 3))
+ (apply (pop pending)))
+
+ (t
+ (let ((func-args (pop pending)))
+ (apply (car func-args) (cdr func-args))))
+ )))
(defun wisi-parse-1 (token parser-state pendingp actions gotos)
"Perform one shift or reduce on PARSER-STATE.
diff --git a/wisi.el b/wisi.el
index e327c18..a9cd0b6 100755
--- a/wisi.el
+++ b/wisi.el
@@ -1,11 +1,11 @@
;;; wisi.el --- Utilities for implementing an indentation/navigation engine
using a generalized LALR parser
;;
-;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013, 2014 Free Software Foundation, Inc.
;;
;; Author: Stephen Leake <stephen_leake@member.fsf.org>
-;; Version: 1.0
+;; Version: 1.0.1
+;; package-requires: ((cl-lib "0.4") (emacs "24.2"))
;; URL: http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
-;; Package-Requires: ((cl-lib "0"))
;;
;; This file is part of GNU Emacs.
;;
@@ -142,8 +142,14 @@
;;; Code:
+(require 'cl-lib)
(require 'wisi-parse)
-(eval-when-compile (require 'cl-lib))
+
+;; WORKAROUND: for some reason, this condition doesn't work in batch mode!
+;; (when (and (= emacs-major-version 24)
+;; (= emacs-minor-version 2))
+ (require 'wisi-compat-24.2)
+;;)
;;;; lexer
@@ -320,7 +326,6 @@ wisi-forward-token, but does not look up symbol."
"Non-nil when parse is needed - cleared when parse succeeds.")
(defvar-local wisi-change-need-invalidate nil)
-(defvar-local wisi-change-jit-lock-mode nil)
(defun wisi-invalidate-cache()
"Invalidate the wisi token cache for the current buffer.
@@ -345,8 +350,7 @@ Also invalidate the Emacs syntax cache."
(when (boundp 'jit-lock-mode)
(when (memq 'wisi-after-change (memq 'jit-lock-after-change
after-change-functions))
(setq after-change-functions (delete 'wisi-after-change
after-change-functions))
- (add-hook 'after-change-functions 'wisi-after-change nil t)
- (setq wisi-change-jit-lock-mode (1+ wisi-change-jit-lock-mode)))
+ (add-hook 'after-change-functions 'wisi-after-change nil t))
)
(save-excursion
@@ -468,7 +472,7 @@ If accessing cache at a marker for a token as set by
`wisi-cache-tokens', POS mu
(when (and wisi-parse-try
(< wisi-cache-max pos))
(when (> wisi-debug 0)
- (message "wisi: parsing ..."))
+ (message "wisi: parsing %s ..." (buffer-name)))
(setq wisi-parse-try nil)
(setq wisi-parse-error-msg nil)
@@ -524,6 +528,9 @@ Point must be at cache."
(when region
(goto-char (car region))
(setq cache (wisi-get-cache (car region)))
+ (when (not cache)
+ ;; token is non-terminal; first terminal doesn't have cache.
+ (setq cache (wisi-forward-cache)))
(while (and cache
(< (point) (cdr region)))
(if (not (wisi-cache-end cache))
@@ -903,6 +910,9 @@ Return start cache."
)
cache)
+(defun wisi-goto-end-1 (cache)
+ (goto-char (1- (wisi-cache-end cache))))
+
(defun wisi-goto-end ()
"Move point to token at end of statement point is in or before."
(interactive)
@@ -911,7 +921,7 @@ Return start cache."
(wisi-forward-cache))))
(when (wisi-cache-end cache)
;; nil when cache is statement-end
- (goto-char (1- (wisi-cache-end cache))))
+ (wisi-goto-end-1 cache))
))
(defun wisi-next-statement-cache (cache)
@@ -1100,9 +1110,6 @@ correct. Must leave point at indentation of current
line.")
(syntax-propertize (point-max))
(wisi-invalidate-cache)
-
- ;; FIXME: debug counter
- (setq wisi-change-jit-lock-mode 0)
)
(provide 'wisi)
- [elpa] externals/wisi 724a763 31/35: In wisi sal-gen_unbounded_definite_red_black_trees.adb, correct WORKAROUND, (continued)
- [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, 2020/11/28
- [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 <=
- [elpa] externals/wisi d9cd208 32/35: In ada-mode, release 7.1.3; in wisi, release 3.1.2, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi c80e75d 30/35: Release ada-mode 7.1.0, wisi 3.1.0, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 4d8af96 05/35: update to Ada mode version 5.0.1, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 8a5302b 09/35: ada-mode 5.1.3, wisi 1.0.4, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 01c34d0 33/35: In wisi, missed a few files in 3.1.2 release, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 0e04e18 08/35: ada-mode, wisi: bump versions again; forgot to add some files to git, Stefan Monnier, 2020/11/28