I am differentiating em-dashes (—) from hypens (-) in emacs using this code in my .emacs:
(let* ((glyph-em-dash (make-glyph-code ?\u002D 'font-lock-function-name-face)) )
(aset standard-display-table 8212
`[,glyph-em-dash ,glyph-em-dash ,glyph-em-dash]))
The issue is that emacs counts these characters as taking up three columns (which they do visually). How can I tell emacs to count the em-dash as only one character when calculating line lengths, etc.?
(current-column)
to determine where things are. – lawlist Apr 19 '18 at 5:22length
of a string (number of chars) versusstring-width
(number of columns that would be displayed in a buffer). – Drew Apr 19 '18 at 13:42