10
edits
(Fixing chdir breaks more things than it fixes) |
(set flycheck-temp-prefix locally to ensure head.js rule works) |
||
Line 43: | Line 43: | ||
<nowiki> | <nowiki> | ||
(defun my-js-mode-hacks () | (defun my-js-mode-hacks () | ||
;; Set this locally so that the head.js rule continues to work | |||
;; properly. In particular for a mochitest we want to preserve the | |||
;; "browser_" prefix. | |||
(when (buffer-file-name) | |||
(let ((base (file-name-nondirectory (buffer-file-name)))) | |||
(when (string-match "^\\([a-z]+_\\)" base) | |||
(setq-local flycheck-temp-prefix (match-string 1 base))))) | |||
(flycheck-mode 1)) | (flycheck-mode 1)) | ||
(require 'flycheck) | (require 'flycheck) |
edits