Skip to content

Files containing jsdoc syntax crash if js-ts-mode is enabled with combobulate #136

@sethidden

Description

@sethidden

Prerequisites

jsdoc and typescript grammars are installed e.g. using https://github.com/skyler544/treesit-auto/tree/php-ts-mode

combobulate is hooked on prog-mode-hook

Repro

  1. Create a buffer with the following content:
/**
 * @example world
 */
const a ='hello'
  1. Launch js-ts-mode

You will get the error:

cl--assertion-failed: Variable ‘combobulate-jsdoc-minor-mode’ does not exist in language ‘jsdoc’ with shorthand ‘minor-mode’

debug log
Debugger entered--Lisp error: (cl-assertion-failed ((boundp var) "Variable `%s' does not exist in language `%s' with shorthand `%s'"))
  cl--assertion-failed((boundp var) "Variable `%s' does not exist in language `%s' with shorthand `%s'" nil (combobulate-jsdoc-minor-mode jsdoc minor-mode))
  combobulate-get(minor-mode jsdoc t)
  combobulate-highlight-install(jsdoc)
  combobulate-setup()
  combobulate-javascript-minor-mode(1)
  combobulate-maybe-activate(nil nil)
  combobulate-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook js-base-mode-hook js-ts-mode-hook)
  apply(run-hooks change-major-mode-after-body-hook (prog-mode-hook js-base-mode-hook js-ts-mode-hook))
  run-mode-hooks(js-ts-mode-hook)
  js-ts-mode()
  funcall-interactively(js-ts-mode)
  command-execute(js-ts-mode record)
  execute-extended-command(nil "js-ts-mode" nil)
  funcall-interactively(execute-extended-command nil "js-ts-mode" nil)
  command-execute(execute-extended-command)

Environment

My config is:

  (use-package treesit-auto
    :ensure (:host github :repo "skyler544/treesit-auto" :branch "php-ts-mode")
    :config
    (setq treesit-auto-install t)
    (treesit-auto-add-to-auto-mode-alist 'all)
    (global-treesit-auto-mode))

  (use-package combobulate
    :ensure (:host github :repo "mickeynp/combobulate")
    :preface (setq combobulate-key-prefix "C-c o")
    :hook ((prog-mode yaml-ts-mode) . combobulate-mode))

GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.3.0, NS appkit-2575.40 Version 15.3.1 (Build 24D70)) of 2025-02-27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions