diff options
| author | Stefan Monnier | 2015-09-20 12:41:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-09-20 12:41:03 -0400 |
| commit | 2ad2f8b084111e1479374fa38450de234242afaf (patch) | |
| tree | 14c0191bc02ddb5b8c22bc9a817103a1e644e6f7 | |
| parent | 9474c70a8442e052bd7b192a515a4fdb1834f49a (diff) | |
| download | emacs-2ad2f8b084111e1479374fa38450de234242afaf.tar.gz emacs-2ad2f8b084111e1479374fa38450de234242afaf.zip | |
* lisp/progmodes/js.el (js--syntax-begin-function): Remove.
(js-mode): Don't set syntax-begin-function.
| -rw-r--r-- | lisp/progmodes/js.el | 13 |
1 files changed, 0 insertions, 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." | |||
| 1370 | (looking-at "\"\\s-*,\\s-*\\[") | 1370 | (looking-at "\"\\s-*,\\s-*\\[") |
| 1371 | (eq (match-end 0) (1+ list-begin))))))) | 1371 | (eq (match-end 0) (1+ list-begin))))))) |
| 1372 | 1372 | ||
| 1373 | (defun js--syntax-begin-function () | ||
| 1374 | (when (< js--cache-end (point)) | ||
| 1375 | (goto-char (max (point-min) js--cache-end))) | ||
| 1376 | |||
| 1377 | (let ((pitem)) | ||
| 1378 | (while (and (setq pitem (car (js--backward-pstate))) | ||
| 1379 | (not (eq 0 (js--pitem-paren-depth pitem))))) | ||
| 1380 | |||
| 1381 | (when pitem | ||
| 1382 | (goto-char (js--pitem-h-begin pitem ))))) | ||
| 1383 | |||
| 1384 | ;;; Font Lock | 1373 | ;;; Font Lock |
| 1385 | (defun js--make-framework-matcher (framework &rest regexps) | 1374 | (defun js--make-framework-matcher (framework &rest regexps) |
| 1386 | "Helper function for building `js--font-lock-keywords'. | 1375 | "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." | |||
| 3550 | (make-local-variable 'adaptive-fill-regexp) | 3539 | (make-local-variable 'adaptive-fill-regexp) |
| 3551 | (c-setup-paragraph-variables)) | 3540 | (c-setup-paragraph-variables)) |
| 3552 | 3541 | ||
| 3553 | (setq-local syntax-begin-function #'js--syntax-begin-function) | ||
| 3554 | |||
| 3555 | ;; Important to fontify the whole buffer syntactically! If we don't, | 3542 | ;; Important to fontify the whole buffer syntactically! If we don't, |
| 3556 | ;; then we might have regular expression literals that aren't marked | 3543 | ;; then we might have regular expression literals that aren't marked |
| 3557 | ;; as strings, which will screw up parse-partial-sexp, scan-lists, | 3544 | ;; as strings, which will screw up parse-partial-sexp, scan-lists, |