Function: prettify-symbols-default-compose-p
prettify-symbols-default-compose-p is a byte-compiled function defined
in prog-mode.el.gz.
Signature
(prettify-symbols-default-compose-p START END MATCH)
Documentation
Return non-nil iff the symbol MATCH should be composed.
The symbol starts at position START and ends at position END.
This is the default for prettify-symbols-compose-predicate
which is suitable for most programming languages such as C or Lisp.
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/prog-mode.el.gz
(defun prettify-symbols-default-compose-p (start end _match)
"Return non-nil iff the symbol MATCH should be composed.
The symbol starts at position START and ends at position END.
This is the default for `prettify-symbols-compose-predicate'
which is suitable for most programming languages such as C or Lisp."
;; Check that the chars should really be composed into a symbol.
(let* ((syntaxes-beg (if (memq (char-syntax (char-after start)) '(?w ?_))
'(?w ?_) '(?. ?\\)))
(syntaxes-end (if (memq (char-syntax (char-before end)) '(?w ?_))
'(?w ?_) '(?. ?\\))))
(not (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes-beg)
(memq (char-syntax (or (char-after end) ?\s)) syntaxes-end)
(nth 8 (syntax-ppss))))))