;;; smie.el --- Simple Minded Indentation Engine -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: languages, lisp, internal, parsing, indentation
(goto-char pos)
(throw 'return
(list t epos
- (buffer-substring-no-properties
- epos
- (+ epos (if (< (point) epos) -1 1))))))))
+ (unless (= (point) epos)
+ (buffer-substring-no-properties
+ epos
+ (+ epos (if (< (point) epos) -1 1)))))))))
(if (eq pos (point))
;; We did not move, so let's abort the loop.
(throw 'return (list t (point))))))
(indirect-function smie-backward-token-function)
(lambda (n)
(if (bobp)
- ;; Arguably backward-sexp hould signal this error for us.
+ ;; Arguably backward-sexp should signal this error for us.
(signal 'scan-error
(list "Beginning of buffer" (point) (point)))
(backward-sexp n)))