(eval-when-compile (append "=({[,:;" '(nil))))))
(put-text-property (match-beginning 1) (match-end 1)
'syntax-table (string-to-syntax "\"/"))
- (js-syntax-propertize-regexp end))))))
+ (js-syntax-propertize-regexp end)))))
+ ("\\`\\(#\\)!" (1 "< b")))
(point) end))
(defconst js--prettify-symbols-alist
"Fill the paragraph with `c-fill-paragraph'."
(interactive "*P")
(let ((js--filling-paragraph t)
- (fill-paragraph-function 'c-fill-paragraph))
+ (fill-paragraph-function #'c-fill-paragraph))
(c-fill-paragraph justify)))
;;; Type database and Imenu
(unwind-protect
+ ;; FIXME: Don't impose IDO on the user.
(setq selected-tab-cname
(let ((ido-minibuffer-setup-hook
(cons #'setup-hook ido-minibuffer-setup-hook)))
(define-derived-mode js-mode prog-mode "JavaScript"
"Major mode for editing JavaScript."
:group 'js
- (setq-local indent-line-function 'js-indent-line)
- (setq-local beginning-of-defun-function 'js-beginning-of-defun)
- (setq-local end-of-defun-function 'js-end-of-defun)
+ (setq-local indent-line-function #'js-indent-line)
+ (setq-local beginning-of-defun-function #'js-beginning-of-defun)
+ (setq-local end-of-defun-function #'js-end-of-defun)
(setq-local open-paren-in-column-0-is-defun-start nil)
- (setq-local font-lock-defaults (list js--font-lock-keywords))
+ (setq-local font-lock-defaults '(js--font-lock-keywords))
(setq-local syntax-propertize-function #'js-syntax-propertize)
(setq-local prettify-symbols-alist js--prettify-symbols-alist)
;; Comments
(setq-local comment-start "// ")
(setq-local comment-end "")
- (setq-local fill-paragraph-function 'js-c-fill-paragraph)
+ (setq-local fill-paragraph-function #'js-c-fill-paragraph)
;; Parse cache
(add-hook 'before-change-functions #'js--flush-caches t t)