[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Associating an empty replacement value for "\cr"
From: |
fatiparty |
Subject: |
Associating an empty replacement value for "\cr" |
Date: |
Tue, 11 Jan 2022 19:57:44 +0100 (CET) |
> fatiparty--- via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
> > Is this the way to associate an empty replacement value for "\cr".
> > When I do not place a space after
> > ? I get an error.
> >
> > (defvar texsym-cluster
> > ("\\alpha" . ?α) ("\\cr" . ? ))
>
> How is that var used?
>
> ?c is the read syntax for a character. There is no "empty" character of
> course. Can you use strings instead as replacements?
>
> Michael.
I have a keybinding sequence "H-s" that would remove "\cr" text from view
I am using texsym-cluster in this way
(defun texsym-predicate (start end _match)
"Prettify mathematical expressions defined by tex syntax.
Matches START with a backslash and END with a word constituent
[a-zA-Z0-9]. Uses the prettify functionality of `prog-mode'."
(not (or (memq (char-before start) '(?\\))
(memq (char-syntax (or (char-after end) ?\s)) '(?w))
(nth 8 (syntax-ppss)))) )
(defun prettify-symbols-cluster ()
"Set keywords and corresponding glyph."
(setq-local prettify-symbols-alist texsym-cluster)
(setq prettify-symbols-compose-predicate 'texsym-predicate))
Jan 12, 2022, 05:19 by help-gnu-emacs@gnu.org:
> Is this the way to associate an empty replacement value for "\cr". When I do
> not place a space after
> ? I get an error.
>
> (defvar texsym-cluster
> ("\\alpha" . ?α) ("\\cr" . ? ))
>