1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

* lisp/progmodes/js.el (js--syntax-begin-function): Remove.

(js-mode): Don't set syntax-begin-function.
This commit is contained in:
Stefan Monnier 2015-09-20 12:41:03 -04:00
parent 9474c70a84
commit 2ad2f8b084

View File

@ -1370,17 +1370,6 @@ LIMIT defaults to point."
(looking-at "\"\\s-*,\\s-*\\[") (looking-at "\"\\s-*,\\s-*\\[")
(eq (match-end 0) (1+ list-begin))))))) (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 ;;; Font Lock
(defun js--make-framework-matcher (framework &rest regexps) (defun js--make-framework-matcher (framework &rest regexps)
"Helper function for building `js--font-lock-keywords'. "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) (make-local-variable 'adaptive-fill-regexp)
(c-setup-paragraph-variables)) (c-setup-paragraph-variables))
(setq-local syntax-begin-function #'js--syntax-begin-function)
;; Important to fontify the whole buffer syntactically! If we don't, ;; Important to fontify the whole buffer syntactically! If we don't,
;; then we might have regular expression literals that aren't marked ;; then we might have regular expression literals that aren't marked
;; as strings, which will screw up parse-partial-sexp, scan-lists, ;; as strings, which will screw up parse-partial-sexp, scan-lists,