emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Fontify text between quotes?


From: Eric S Fraga
Subject: Re: [O] Fontify text between quotes?
Date: Thu, 22 Nov 2018 06:44:05 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Wednesday, 21 Nov 2018 at 14:50, Will Pierce wrote:
> Ahah! Thanks for the tip!
>
> Added the following to my init:
>
> ;; use org-block face in verse/quote blocks
> (setq org-fontify-quote-and-verse-blocks t)
>
> ;; use org-block for smart-quoted text
> (defun my-org-smart-quote-fontify ()
>   "Use org-block face for text between smart quotes."
>   (font-lock-add-keywords nil
>                           '(("“\\(.*?\\)”" . 'org-block))))

You might want to replace the .* with [^"]* to avoid cases where you
have two or more quoted bits of text in a single line leading to
fontification of all the text between the first " and the last ".

(untested)
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442



reply via email to

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