What is the convention for using { and } characters in Emacs Lisp if they are used at all?

Do macros make use of them?


What I tried: I opened info for Elisp and started incremental search for {.

Among other, { is used

  • for Unicode character names ("\N{SUBSCRIPT FOUR}")
  • as quantifier operator in regular expressions ("\\.\\{3\\}")
  • in doc strings for modes' keymaps (\\{colorcomp-mode-map})
  • 1
    There is an index which makes this far easier. – wasamasa Sep 25 '18 at 19:30
  • @wasamasa: If you mean this, it doesn't contain { at all. – choroba Sep 25 '18 at 19:32
  • Yes, this is precisely the point. Braces do not carry any specific meaning. – wasamasa Sep 25 '18 at 19:35
  • The regular expression example should have more backslashes, e.g.: "\\.\\{3\\}" – npostavs Sep 25 '18 at 22:29
  • In what context is the third example encountered? Certainly not in raw elisp! But in doc strings, perhaps? – Harald Hanche-Olsen Sep 26 '18 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.