Timeline for modify syntax table for strings in perl modes
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 2, 2016 at 21:15 | vote | accept | Prgrm.celeritas | ||
Nov 18, 2016 at 4:47 | answer | added | Prgrm.celeritas | timeline score: 2 | |
Nov 17, 2016 at 22:43 | comment | added | Prgrm.celeritas | I got it to work changing the source code directly but can't seem create a hook that works. I will probably open a new question and then apply the answer here. | |
Nov 17, 2016 at 21:58 | comment | added | wasamasa |
perl-mode-hook . Generally, every properly defined mode (read: via define-derived-mode ) offers a variable named as the mode with -hook appended to it after its definition. Feel free to self-answer this question with the code involved!
|
|
Nov 17, 2016 at 21:02 | comment | added | Prgrm.celeritas |
@wasamasa I did some digging based on you mentioning syntax-propertize-function and I was able to add addition rule to syntax-propertize-rules that makes things work correctly. Now the question is, how do I add it to my perl-mode ? (I was hacking the source file directly) Is there a hook or something?
|
|
Nov 17, 2016 at 20:36 | comment | added | Prgrm.celeritas |
HåkonHægland I know that is how binary numbers are defined in Perl. But my companies Perl interpreter accepts 'b as well (probably because it is really old) and all of our Perl files use 'b . So I have to find someone to correct for this. I can't go through all our repo's and change it.
|
|
Nov 17, 2016 at 20:12 | comment | added | Håkon Hægland |
In perl you define a binary number using 0b as a prefix, see perldoc perlnumber . I am not sure why you need to use a single quote instead of 0b ?
|
|
Nov 17, 2016 at 19:00 | comment | added | wasamasa |
syntax-propertize-function is a way to set up custom rules for applying text properties.
|
|
Nov 17, 2016 at 17:30 | history | edited | Prgrm.celeritas | CC BY-SA 3.0 |
added 1 character in body
|
Nov 17, 2016 at 0:03 | history | asked | Prgrm.celeritas | CC BY-SA 3.0 |