-;;; wisi.el --- Utilities for implementing an indentation/navigation engine using a generalized LALR parser
+;;; wisi.el --- Utilities for implementing an indentation/navigation engine using a generalized LALR parser -*- lexical-binding:t -*-
;;
;; Copyright (C) 2012 - 2015 Free Software Foundation, Inc.
;;
(defun wisi-number-p (token-text)
"Return t if TOKEN-TEXT plus text after point matches the
-syntax for a real literal; otherwise nil. point is after
+syntax for a real literal; otherwise nil. Point is after
TOKEN-TEXT; move point to just past token."
- ;; typical literals:
+ ;; Typical literals:
;; 1234
;; 1234.5678
;; _not_ including non-decimal base, or underscores (see ada-wisi-number-p)
;;
- (let ((end (point)))
- ;; starts with a simple integer
- (when (string-match "^[0-9]+$" token-text)
- (when (looking-at "\\.[0-9]+")
- ;; real number
- (goto-char (setq end (match-end 0)))
- (when (looking-at "[Ee][+-][0-9]+")
- ;; exponent
- (goto-char (setq end (match-end 0)))))
-
- t
- )))
+ ;; Starts with a simple integer
+ (when (string-match "^[0-9]+$" token-text)
+ (when (looking-at "\\.[0-9]+")
+ ;; real number
+ (goto-char (match-end 0))
+ (when (looking-at "[Ee][+-][0-9]+")
+ ;; exponent
+ (goto-char (match-end 0))))
+
+ t
+ ))
(defun wisi-forward-token ()
"Move point forward across one token, skipping leading whitespace and comments.
(message "%s done" msg)))
)))
-(defun wisi-fontify-region (begin end)
+(defun wisi-fontify-region (_begin end)
"For `jit-lock-functions'."
(when (< (point-max) wisi-size-threshold)
(wisi-validate-cache end)))