Created
June 16, 2017 14:40
-
-
Save aplaice/edfd17427a3422e1579ffae879c1955b to your computer and use it in GitHub Desktop.
Re-definition of IT_DISPLAYING_WHITESPACE allowing wrapping at '/'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define IT_DISPLAYING_WHITESPACE(it) \ | |
| ((it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t' || it->c == '/')) \ | |
| || ((STRINGP (it->string) \ | |
| && (SREF (it->string, IT_STRING_BYTEPOS (*it)) == ' ' \ | |
| || SREF (it->string, IT_STRING_BYTEPOS (*it)) == '\t' \ | |
| || SREF (it->string, IT_STRING_BYTEPOS (*it)) == '/')) \ | |
| || (it->s \ | |
| && (it->s[IT_BYTEPOS (*it)] == ' ' \ | |
| || it->s[IT_BYTEPOS (*it)] == '\t' \ | |
| || it->s[IT_BYTEPOS (*it)] == '/')) \ | |
| || (IT_BYTEPOS (*it) < ZV_BYTE \ | |
| && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \ | |
| || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t' \ | |
| || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '/')))) \ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested with latest emacs — works and surprisingly doesn't cause emacs to crash and burn (despite having been written by blind copying :/). Obviously, this is is not very flexible. Also, IT_DISPLAYING_WHITESPACE becomes a bit of a misnomer...