all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to set faces?
@ 2010-09-27 10:24 Uwe Brauer
  2010-09-28 16:10 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2010-09-27 10:24 UTC (permalink / raw)
  To: emacs-orgmode


Hello 

The following setting works in lisp mode

  (let ((lisp-regexp-4 " ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)"))
    (setq lisp-font-lock-keywords-1
	  (append lisp-font-lock-keywords-1
		  (list (list lisp-regexp-4 0
			      'font-lock-log-warn-face t)))) 
    (setq lisp-font-lock-keywords-2
	  (append lisp-font-lock-keywords-2
		  (list (list lisp-regexp-4 0
			      'font-lock-log-warn-face t)))))

Every word surrounded by an * gets highlighted by the
font-lock-log-warn-face. 

I tried something similar for org-mode, like 

  (let ((lisp-regexp-4 " ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)"))
    (setq org-font-lock-keywords
	  (append lisp-font-lock-keywords-1
		  (list (list lisp-regexp-4 0
			      'font-lock-comment-warn-face t)))))


Or 

(add-to-list 'org-font-lock-keywords		
'(" ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)" 1 'font-lock-comment-warn-face append t))

But it does not work, 

Can somebody give me a hint please?

Uwe Brauer 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* how to set faces?
@ 2010-09-28 16:56 Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-09-28 16:56 UTC (permalink / raw)
  To: emacs-orgmode


Hello

The following setting works in lisp mode

  (let ((lisp-regexp-4 " ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)"))
    (setq lisp-font-lock-keywords-1
	  (append lisp-font-lock-keywords-1
		  (list (list lisp-regexp-4 0
			      'font-lock-log-warn-face t))))
    (setq lisp-font-lock-keywords-2
	  (append lisp-font-lock-keywords-2
		  (list (list lisp-regexp-4 0
			      'font-lock-log-warn-face t)))))

Every word surrounded by an * gets highlighted by the
font-lock-log-warn-face.

I tried something similar for org-mode, like

  (let ((lisp-regexp-4 " ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)"))
    (setq org-font-lock-keywords
	  (append lisp-font-lock-keywords-1

I guess this should be org-font-lock-keywords here?

		  (list (list lisp-regexp-4 0
			      'font-lock-comment-warn-face t)))))


Or

(add-to-list 'org-font-lock-keywords		
'(" ?\\(\\<\\*[a-zA-Z]*\\*\\>\\)" 1 'font-lock-comment-warn-face  
append t))

But it does not work,

Can somebody give me a hint please?

Uwe Brauer


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-28 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 10:24 how to set faces? Uwe Brauer
2010-09-28 16:10 ` Carsten Dominik
2010-09-28 17:48   ` Uwe Brauer
2010-09-28 17:53     ` Carsten Dominik
2010-09-28 20:12       ` Uwe Brauer
  -- strict thread matches above, loose matches on Subject: below --
2010-09-28 16:56 Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.