From 2ad2f8b084111e1479374fa38450de234242afaf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 20 Sep 2015 12:41:03 -0400 Subject: [PATCH] * lisp/progmodes/js.el (js--syntax-begin-function): Remove. (js-mode): Don't set syntax-begin-function. --- lisp/progmodes/js.el | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 71d0229471a..6a800f8abe5 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1370,17 +1370,6 @@ LIMIT defaults to point." (looking-at "\"\\s-*,\\s-*\\[") (eq (match-end 0) (1+ list-begin))))))) -(defun js--syntax-begin-function () - (when (< js--cache-end (point)) - (goto-char (max (point-min) js--cache-end))) - - (let ((pitem)) - (while (and (setq pitem (car (js--backward-pstate))) - (not (eq 0 (js--pitem-paren-depth pitem))))) - - (when pitem - (goto-char (js--pitem-h-begin pitem ))))) - ;;; Font Lock (defun js--make-framework-matcher (framework &rest regexps) "Helper function for building `js--font-lock-keywords'. @@ -3550,8 +3539,6 @@ If one hasn't been set, or if it's stale, prompt for a new one." (make-local-variable 'adaptive-fill-regexp) (c-setup-paragraph-variables)) - (setq-local syntax-begin-function #'js--syntax-begin-function) - ;; Important to fontify the whole buffer syntactically! If we don't, ;; then we might have regular expression literals that aren't marked ;; as strings, which will screw up parse-partial-sexp, scan-lists,