Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Buffer is marked modified in emacs 25.1 #307

@jorissteyn

Description

@jorissteyn

Lately I've found some buffers get marked as modified right after activating php-mode. It happens only in emacs 25. I've bisected it down to commit 86eab80 which makes php-mode call php-syntax-propertize-function.

It turns out that normally, the calling code takes care of retaining the modification state. So the proper thing to do is take care of the modification state ourselves. The macro with-silent-modifications does exactly that. I'll create a patch for that in a minute.

Steps to reproduce:

  • create a file, write a comment containing an apostrophe
  • open the file in a buffer, activate php-mode

Expected result:

  • (null (buffer-modified-p))

Actual result:

  • (buffer-modified-p)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions