1

I'm using vue-mode, based on mmm-mode with Emacs 27 nightly from 10/10/2019. Since that Emacs update, I don't get any indentation support in the script section of a Vue file. Try this file with emacs -q after (use-package vue):

<template>
</template>

<script lang="ts">
import * as d3 from 'd3'
  function foo() {

  }
</script>

<style>
</style>

Go into function foo at the blank line and type TAB. No indent. :-(

And indeed if you eval (syntax-ppss (point-at-bol)) at that point, it returns (0 nil 2381 nil nil nil 0 nil nil nil nil) which means it thinks the indent should be 0, not 2.

Anyone have any idea what changed recently that could cause this? Or any ideas for how I can debug it?

4
  • 1
    Emacs.StackExchange isn't the right place to report bugs in unstable Emacs versions. Use M-x report-emacs-bug
    – phils
    Commented Oct 14, 2019 at 21:20
  • 3
    I'm voting to close this question as off-topic because it's probably about a transient bug in unstable code.
    – phils
    Commented Oct 14, 2019 at 21:28
  • Fair enough. Submitted as bug #37751.
    – GaryO
    Commented Oct 14, 2019 at 22:12
  • The problem manifests in stable emacs 26.3, too. Commented Mar 9, 2020 at 23:44

2 Answers 2

2

The problem has been reported as #99 and already fixed in master of mmm-mode, but since there is no new release, you have to install the newest mmm-mode manually, or add the missing setting to mmm-save-local-variables -- for example with use-package:

(use-package vue-mode
  :mode "\\.vue$"
  :config
  (add-to-list 'mmm-save-local-variables '(syntax-ppss-table buffer))
  )
1
  • See also related bug #100 (github.com/purcell/mmm-mode/issues/100). Also add this to your .emacs: (add-to-list 'mmm-save-local-variables '(c-current-comment-prefix region))
    – GaryO
    Commented Mar 10, 2020 at 13:02
1

Update for 2023 - there is a new release so if you do list-packages and install the latest mmm-mode (20230917.28 at the time of writing) and restart emacs it'll just work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.