]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/js.el (js--syntax-begin-function): Remove.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 20 Sep 2015 16:41:03 +0000 (12:41 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 20 Sep 2015 16:41:03 +0000 (12:41 -0400)
(js-mode): Don't set syntax-begin-function.

lisp/progmodes/js.el

index 71d0229471aed43ae078e94c8bd7c1ec3b687409..6a800f8abe5d1beea804e35d57dd681be63bc3a4 100644 (file)
@@ -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,