X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/536aa4668198bf4851356a8e3a57b7f8969014c3..d9079cf1b8113d2fc555d718c78b22fc8a3613c2:/lisp/elec-pair.el diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 04e1840c0a..42b8a912cc 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -226,10 +226,9 @@ WHERE is a list defaulting to '(string comment) and indicates when to fallback to `parse-partial-sexp'." (let* ((pos (or pos (point))) (where (or where '(string comment))) - (quick-ppss (syntax-ppss)) - (quick-ppss-at-pos (syntax-ppss pos)) - (in-string (and (nth 3 quick-ppss-at-pos) (memq 'string where))) - (in-comment (and (nth 4 quick-ppss-at-pos) (memq 'comment where))) + (quick-ppss (syntax-ppss pos)) + (in-string (and (nth 3 quick-ppss) (memq 'string where))) + (in-comment (and (nth 4 quick-ppss) (memq 'comment where))) (s-or-c-start (cond (in-string (1+ (nth 8 quick-ppss))) (in-comment @@ -243,7 +242,7 @@ when to fallback to `parse-partial-sexp'." ;; HACK! cc-mode apparently has some `syntax-ppss' bugs (if (memq major-mode '(c-mode c++ mode)) (parse-partial-sexp (point-min) pos) - quick-ppss-at-pos)))) + quick-ppss)))) ;; Balancing means controlling pairing and skipping of parentheses ;; so that, if possible, the buffer ends up at least as balanced as