Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support determining mode based on shebang interpreter directive #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jul 18, 2022

  1. Support determining mode based on shebang interpreter directive

    Attempt to determine the appropriate mode based on the presence of
    an interpreter directive on the first line of the file. Interpreter
    directives are examined first, followed by the filename when
    determining the mode mirroring what Emacs does by default.
    iainh committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    178b614 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. Further shebang scan work

    1) Constrain the number of characters examine when determining the
       interpreter directive to 256 to avoid performance penalty of scanning
       long lines unnecessarily.
    2) Move to a single mode_by_file() function in Context.
    3) Always attempt to match the mode based on the filename first,
       falling back to the shebang line only if no match is found.
    iainh committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    ecc4c48 View commit details
    Browse the repository at this point in the history
  2. Build fix

    iainh committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    7936db6 View commit details
    Browse the repository at this point in the history