>> But that's not what I meant. I meant that if we want to base this on >> text properties, we should do this via hi-lock or similar, not in the >> display engine which treats all characters the same. > > Or markchars.el, or uni-confusables.el. Like these packages maybe better > to create another package e.g. nobreak.el, based on font-lock-mode? Now I extended markchars.el to highlight exactly the same characters as highlighted by nobreak-char-display, and additionally highlight them only in files names in Dired. This is configurable with such hook: (add-hook 'dired-mode-hook (lambda () (setq-local nobreak-char-display nil) (setq-local markchars-what '(markchars-nobreak-space markchars-nobreak-hyphen)) (markchars-mode 1)))