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

Disable propertize #659

Open
fxbois opened this issue Apr 13, 2021 · 6 comments
Open

Disable propertize #659

fxbois opened this issue Apr 13, 2021 · 6 comments

Comments

@fxbois
Copy link
Contributor

fxbois commented Apr 13, 2021

Hi
could you provide a way to disable "propertize" features ?
I do not want my comments to be propertized.
I would like also to disable php-phpdoc-font-lock-keywords.
Best regards

@phil-s
Copy link
Contributor

phil-s commented Nov 10, 2021

Something like this?

(add-hook 'php-mode-hook #'my-php-mode-hook)

(defun my-php-mode-hook ()
  "Custom `php-mode' behaviours.  Used in `php-mode-hook'."
  (setq-local syntax-propertize-function nil)
  (remove-hook 'syntax-propertize-extend-region-functions
               #'php-syntax-propertize-extend-region t))

(advice-add 'php-syntax-propertize-function :override #'ignore)

(setq php-phpdoc-font-lock-keywords nil)

@fxbois
Copy link
Contributor Author

fxbois commented Nov 10, 2021

Would it be possible to provide customs for this ?

@phil-s
Copy link
Contributor

phil-s commented Nov 10, 2021

That's up to the maintainers, but they probably have many higher priorities.

Does it work?

@fxbois
Copy link
Contributor Author

fxbois commented Nov 10, 2021

I already have solutions to disable this but I think that this kind of options should really be easily configurable

@phil-s
Copy link
Contributor

phil-s commented Nov 10, 2021

Perhaps you could provide your solutions up front when you post something like this, then?

(a) I wouldn't have wasted any time trying to help if you'd made it clear that you already knew what to do.

(b) You can help other people who might have the same question.

(c) If you want the maintainers to do something, and you show them what needs to be done in code form, you will probably improve your chances of them considering it.

@fxbois
Copy link
Contributor Author

fxbois commented Nov 11, 2021

I've checked my init.el and I only had the solution for the php-phpdoc-font-lock-keywords issue. I'll try to post a pull request for the "propertize" issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants