aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2014-06-13 11:31:17 -0400
committerStefan Monnier <[email protected]>2014-06-13 11:31:17 -0400
commitbf26b463ea0e7621255f73d22893a93754694800 (patch)
treee8b70e267987d2f9b5de2f3ae1e4f82d549fa435 /lisp
parent40be983bc68c95ad63f1135da3a82aec1aa32e2a (diff)
* lisp/emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
bumping forward into a closing paren. Fixes: debbugs:17761
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/smie.el5
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1ecc6a140a..db615f68ad 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2014-06-13 Stefan Monnier <[email protected]>
+ * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
+ bumping forward into a closing paren (bug#17761).
+
* term/xterm.el (xterm--version-handler): Work around for OSX
Terminal.app (bug#17607).
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index e65f873b87..3e40d37aac 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -709,7 +709,8 @@ Possible return values:
(condition-case err
(progn (funcall next-sexp 1) nil)
(scan-error
- (let ((epos (nth 2 err)))
+ (let* ((epos1 (nth 2 err))
+ (epos (if (<= (point) epos1) (nth 3 err) epos1)))
(goto-char pos)
(throw 'return
(list t epos
@@ -1832,6 +1833,8 @@ KEYWORDS are additional arguments, which can use the following keywords:
(append smie-blink-matching-triggers
(delete-dups triggers)))))))
+(declare-function edebug-instrument-function "edebug" (func))
+
(defun smie-edebug ()
"Instrument the `smie-rules-function' for Edebug."
(interactive)