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

Numerous fixes #1

Merged
merged 2 commits into from
Jul 15, 2017
Merged

Numerous fixes #1

merged 2 commits into from
Jul 15, 2017

Conversation

purcell
Copy link
Contributor

@purcell purcell commented Jul 15, 2017

Rather than try to explain what was necessary here, I sat down and fixed a bunch of stuff. These commits make config-general-mode use conf-mode appropriately, which should solve some of your confusion about why things weren't working.

Additionally, all the code for overriding the user's electric pair and completion behaviour was inappropriate, so I've removed it. All of that belongs in your personal config, not in a major mode: for example, if a user wants "indent or complete" behaviour on TAB, they can (setq tab-always-indent 'complete) globally (or in a mode hook if preferred), and this will work with whatever completion mechanism they prefer. Same with electric-pair-mode.

As a result of all this, the code is much shorter and hopefully more correct and reliable. Hope this helps!

- buffer-face-mode is unnecessary
- Use conf-mode to set up comment behaviour and font lock defaults
- Overriding the user's preferences for completion behaviour and
  mechanisms is inappropriate: removed.
- Overriding the user's electric pair preferences is
  inappropriate: removed.
- Fix code that was breaking the global syntax table (calling
  modify-syntax-table without a table arg)
- Misc small fixes & improvements
@purcell
Copy link
Contributor Author

purcell commented Jul 15, 2017

(P.S. Tested this with an example file found at http://download.vikis.lt/doc/perl-Config-General-2.52/example.cfg)

@TLINDEN
Copy link
Owner

TLINDEN commented Jul 15, 2017

Ok, thank you for your work, so I need to put all this stuff into my config then, well. Thank you very much @purcell 👍

@TLINDEN TLINDEN merged commit 137fe96 into TLINDEN:master Jul 15, 2017
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

Successfully merging this pull request may close these issues.

2 participants