* set background color without using faces @ 2013-04-08 16:38 Bois Francois-Xavier 2013-04-08 17:26 ` Eli Zaretskii ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Bois Francois-Xavier @ 2013-04-08 16:38 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 765 bytes --] Dear emacsians, For my project [1] I am wondering if it is possible to achieve this : after I have fontified the various blocks [2] (with direct use of font-lock-fontify-region [3]) , can I force the background for specific regions (ie. the server blocks and not the client ones) ? I am working on the compatiblity with the razor language (also used by the Play framework) and want to achieve this : http://weblogs.asp.net/blogs/scottgu/image_thumb_4C76B8A4.png Thank you in advance [1] web-mode.el , a major mode for editing web templates , available on http://web-mode.org [2] clients parts (css/js) and server blocks (ie php, jsp, dtl, etc.) [3] in the faq of http://web-mode.org , I explain why I use different method in order to fontify buffers. fxbois [-- Attachment #2: Type: text/html, Size: 1963 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set background color without using faces 2013-04-08 16:38 set background color without using faces Bois Francois-Xavier @ 2013-04-08 17:26 ` Eli Zaretskii [not found] ` <mailman.23781.1365441972.855.help-gnu-emacs@gnu.org> ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Eli Zaretskii @ 2013-04-08 17:26 UTC (permalink / raw) To: help-gnu-emacs > From: Bois Francois-Xavier <fxbois@gmail.com> > Date: Mon, 8 Apr 2013 18:38:13 +0200 > > For my project [1] I am wondering if it is possible to achieve this : after > I have fontified the various blocks [2] (with direct use of > font-lock-fontify-region [3]) But font-lock-fontify-region does use faces. > can I force the background for specific regions (ie. the server > blocks and not the client ones) ? What's wrong with the same technique, i.e. using font-lock-fontify-region? ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.23781.1365441972.855.help-gnu-emacs@gnu.org>]
* Re: set background color without using faces [not found] ` <mailman.23781.1365441972.855.help-gnu-emacs@gnu.org> @ 2013-04-08 19:26 ` fxbois 0 siblings, 0 replies; 5+ messages in thread From: fxbois @ 2013-04-08 19:26 UTC (permalink / raw) To: help-gnu-emacs; +Cc: help-gnu-emacs > What's wrong with the same technique, i.e. using font-lock-fontify-region? For my keyword rules I almost never set the "override" element to t So if i use a first keyword that set all the entire region (".*") to a face that set the background, the other rules won't work. An other issue with this kind of "background rule", my code that shows the whitespaces would not work either. Is it possible for a (point) in the buffer to have a face and a background color that is different from the background property of the face ? This way I would be able to set the background of the region and after that play with faces. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: set background color without using faces 2013-04-08 16:38 set background color without using faces Bois Francois-Xavier 2013-04-08 17:26 ` Eli Zaretskii [not found] ` <mailman.23781.1365441972.855.help-gnu-emacs@gnu.org> @ 2013-04-08 20:24 ` Stefan Monnier [not found] ` <mailman.23790.1365452710.855.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 5+ messages in thread From: Stefan Monnier @ 2013-04-08 20:24 UTC (permalink / raw) To: help-gnu-emacs > For my project [1] I am wondering if it is possible to achieve this : after > I have fontified the various blocks [2] (with direct use of > font-lock-fontify-region [3]) , can I force the background for specific > regions (ie. the server blocks and not the client ones) ? You can try to use font-lock-append-text-property. Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.23790.1365452710.855.help-gnu-emacs@gnu.org>]
* Re: set background color without using faces [not found] ` <mailman.23790.1365452710.855.help-gnu-emacs@gnu.org> @ 2013-04-08 22:35 ` fxbois 0 siblings, 0 replies; 5+ messages in thread From: fxbois @ 2013-04-08 22:35 UTC (permalink / raw) To: gnu.emacs.help; +Cc: help-gnu-emacs > > You can try to use font-lock-append-text-property. > Stefan, it is exactly what I was looking for. Thanks a lot ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-08 22:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-04-08 16:38 set background color without using faces Bois Francois-Xavier 2013-04-08 17:26 ` Eli Zaretskii [not found] ` <mailman.23781.1365441972.855.help-gnu-emacs@gnu.org> 2013-04-08 19:26 ` fxbois 2013-04-08 20:24 ` Stefan Monnier [not found] ` <mailman.23790.1365452710.855.help-gnu-emacs@gnu.org> 2013-04-08 22:35 ` fxbois
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).