aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-11-23 11:26:16 -0500
committerStefan Monnier2015-11-23 11:26:16 -0500
commit9f1a5113e103c789e173171ee0cda8d29de2f3d7 (patch)
tree7db6419eabb1d20ad0d8aae58c065dc6cff8e0fb
parent2365e1eb93d4881954a19c96ea29902c1c9a67ad (diff)
downloademacs-9f1a5113e103c789e173171ee0cda8d29de2f3d7.tar.gz
emacs-9f1a5113e103c789e173171ee0cda8d29de2f3d7.zip
* lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better.
-rw-r--r--lisp/emacs-lisp/smie.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 738bdddcddf..197861fbae2 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -809,7 +809,12 @@ Possible return values:
809 nil: we skipped over an identifier, matched parentheses, ..." 809 nil: we skipped over an identifier, matched parentheses, ..."
810 (smie-next-sexp 810 (smie-next-sexp
811 (indirect-function smie-backward-token-function) 811 (indirect-function smie-backward-token-function)
812 (indirect-function #'backward-sexp) 812 (lambda (n)
813 (if (bobp)
814 ;; Arguably backward-sexp hould signal this error for us.
815 (signal 'scan-error
816 (list "Beginning of buffer" (point) (point)))
817 (backward-sexp n)))
813 (indirect-function #'smie-op-left) 818 (indirect-function #'smie-op-left)
814 (indirect-function #'smie-op-right) 819 (indirect-function #'smie-op-right)
815 halfsexp)) 820 halfsexp))