diff options
Diffstat (limited to 'coq/coq-smie.el')
-rw-r--r-- | coq/coq-smie.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/coq/coq-smie.el b/coq/coq-smie.el index 2dc5482c..939e0cc3 100644 --- a/coq/coq-smie.el +++ b/coq/coq-smie.el @@ -35,11 +35,12 @@ (require 'coq-indent) (require 'smie nil 'noerror) -(defmacro measure-time (&rest body) - "Measure the time it takes to evaluate BODY." - `(let ((time (current-time))) - ,@body - (message "%.06f" (float-time (time-since time))))) +; debugging +;(defmacro measure-time (&rest body) +; "Measure the time it takes to evaluate BODY." +; `(let ((time (current-time))) +; ,@body +; (message "%.06f" (float-time (time-since time))))) (defun coq-string-suffix-p (str1 str2 &optional ignore-case) @@ -209,7 +210,8 @@ command (and inside parenthesis)." (equal (char-syntax ?\)) (char-syntax (char-after))))) (throw 'found nil)) ((zerop (length next)) ;; capture other characters than closing parent - (let ((forward-sexp-function nil)) (forward-sexp -1))) + ;; don't use smmie-forward-sexp here + (let ((forward-sexp-function nil)) (forward-sexp 1))) ((member next tokens) (throw 'found next)))))))) (scan-error nil))) @@ -256,7 +258,9 @@ command (and inside parenthesis). " (or (equal (point) (point-min)) ; protecting char-before next line (equal (char-syntax ?\() (char-syntax (char-before))))) (throw 'found nil)) - ((zerop (length next)) (let ((forward-sexp-function nil)) (forward-sexp -1))) + ((zerop (length next)) + ;; don't use smmie-forward-sexp here + (let ((forward-sexp-function nil)) (forward-sexp -1))) ((member next tokens) (throw 'found next)))))))) (scan-error nil))) |