help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prettify keywords


From: pietru
Subject: Re: Prettify keywords
Date: Wed, 3 Feb 2021 22:37:02 +0100

Have looked at prettify-symbols-mode and it is defined in prog-mode.el.
This gets me quite confused as I thought that I can only activate a single
major mode at a time on a particular buffer.

Thank you for helping me make some progress on this as I thought that the
prettify functionality would be hard to implement on tex commands whilst I
am in texinfo-mode.

> Sent: Thursday, February 04, 2021 at 9:27 AM
> From: "Gregory Heytings" <gregory@heytings.org>
> To: pietru@caramail.com
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Prettify keywords
>
> 
> >
> > I am asking where does texinfo-mode call prettify.  And which prettify 
> > code is it using.
> >
> 
> Texinfo-mode does not call prettify-symbols-mode (I believe no mode does 
> that by default), which is why I wrote:
> 
> If you want to turn [prettify-symbols-mode] on by default, do:
> 
> (add-hook 'texinfo-mode-hook
>            (lambda ()
>              (push '("\\alpha" . ?α) prettify-symbols-alist)
>              (push '("\\beta" . ?β) prettify-symbols-alist)
>              (prettify-symbols-mode)))
> 
> In the last line, "(prettify-symbols-mode)" calls prettify-symbols-mode. 
> If you want to see the code of "prettify-symbols-mode", type C-h f 
> prettify-symbols-mode RET TAB RET.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]