From: Lars Ingebrigtsen Date: Fri, 26 Jul 2019 05:59:41 +0000 (+0200) Subject: Tweak the behaviour of thing-at-point--end-of-sexp X-Git-Tag: emacs-27.0.90~1817^2~119 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0efb88150df56559e8d649e657902fb51ad43bc1;p=emacs.git Tweak the behaviour of thing-at-point--end-of-sexp * lisp/thingatpt.el (thing-at-point--end-of-sexp): Don't return nil when called with point between two parentheses (bug#29499). --- diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 60a20e2d188..319f4b2cf8a 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -194,7 +194,9 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." (if (or (eq char-syntax ?\)) (and (eq char-syntax ?\") (nth 3 (syntax-ppss)))) (forward-char 1) - (forward-sexp 1)))) + (condition-case _ + (forward-sexp 1) + (scan-error nil))))) (define-obsolete-function-alias 'end-of-sexp 'thing-at-point--end-of-sexp "25.1"