Trevoke / sqlup-mode.el

An emacs minor mode to upcase SQL keyword and functions
GNU General Public License v3.0
88 stars 15 forks source link

if sqlup is hooked to a major mode, the first word might get upcased #65

Closed Trevoke closed 7 years ago

Trevoke commented 7 years ago

sqlup shouldn't modify an existing file when the buffer is loaded; there is code that gets executed on buffer init / major mode init / minor mode init / somewhere around there.. And that code shouldn't be executed.

Version: 0.7.1

davidshepherd7 commented 7 years ago

I think the problem is that sqlup-should-do-work-p checks if the last command was sqlup-mode but not for other things like sql-mode.

We might be able to do it using post-self-insert-hook instead, depends exactly what the intended behaviour for the return keypress is...

I'll have a play now and see if I can come up with a simple pull request.

Trevoke commented 7 years ago

Fixed in #66