I want to test if char at point is, let's say, "{"
I found:
(string= "{" (buffer-substring-no-properties (point) (+ 1 (point))))
and:
(string-match-p "{" (what-cursor-position))
both working.
In the sencond case, if there isn't something better, I'd like to hide the message in the echo area (minibuffer).
Some hint?
=for character comparison, seeing as theequality of Elisp integers is mostly an implementation detail. – Basil Feb 08 '18 at 22:19=is certainly fine as well. – phils Feb 08 '18 at 22:51char-afterfor the simplerfollowing-char. The former can returnnil, in which caseeqis needed and=would eventually fail, whereas the latter is guaranteed to return an integer, and so in newer Emacs sources you would usually see(= (following-char) ?{). – Basil Feb 08 '18 at 22:59char-beforedid what I wanted. – HappyFace May 02 '21 at 13:59