Skip to main content
9 events
when toggle format what by license comment
Sep 3, 2018 at 21:34 comment added zwol @Stefan That was just an example - the actual syntactic situation is too complicated for (syntax-ppss) to be any help, unfortunately.
Sep 3, 2018 at 20:04 comment added Stefan BTW, you question mentions "in code but not in strings or comments". You can test that with (nth 8 (syntax-ppss))
Sep 3, 2018 at 15:14 answer added Stefan timeline score: 3
Sep 3, 2018 at 14:01 comment added zwol @Stefan However, thank you for telling me about post-self-insert-hook, I'm going to look at whether it will help.
Sep 3, 2018 at 14:00 comment added zwol @Stefan The trouble is that ~ (or whatever) has syntactic significance in itself and will probably be given a different face than the one x would be.
Sep 3, 2018 at 13:02 comment added Stefan Indeed, sorry: please replace x in my comment with ~ (or whatever is the "squigle" you're trying to electrify). I posted it as a comment because it is not an answer to your question, only a side remark about the definition you posted.
Sep 2, 2018 at 21:18 comment added zwol @Stefan I'm not trying to make something special happen when x is inserted. I'm trying to make something special happen, upon insertion of several different characters none of which is x, when x would be given a particular face if it had been the character inserted.
Sep 1, 2018 at 3:29 comment added Stefan I'll recommend you don't rebind the key to a new command, but that you instead use post-self-insert-hook and put there a function which checks if x was just inserted (with the additional conditions you want). This will be more likely to correctly interact with other forms of electricity!
Sep 1, 2018 at 1:26 history asked zwol CC BY-SA 4.0