Mercurial > emacs
comparison lisp/textmodes/org.el @ 69685:15d9920a3a63
(org-get-level-face): Fixed bug with level counting.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Mon, 27 Mar 2006 08:03:33 +0000 |
parents | fd0fd3b4eeb9 |
children | 9544ae02c58d e6bf73e43cf4 |
comparison
equal
deleted
inserted
replaced
69684:b1bbdea96d2b | 69685:15d9920a3a63 |
---|---|
2381 (defvar org-f nil) | 2381 (defvar org-f nil) |
2382 (defun org-get-level-face (n) | 2382 (defun org-get-level-face (n) |
2383 "Get the right face for match N in font-lock matching of healdines." | 2383 "Get the right face for match N in font-lock matching of healdines." |
2384 (setq org-l (- (match-end 2) (match-beginning 1))) | 2384 (setq org-l (- (match-end 2) (match-beginning 1))) |
2385 (if org-odd-levels-only (setq org-l (1+ (/ org-l 2)))) | 2385 (if org-odd-levels-only (setq org-l (1+ (/ org-l 2)))) |
2386 (setq org-f (nth (1- (% org-l org-n-levels)) org-level-faces)) | 2386 (setq org-f (nth (% (1- org-l) org-n-levels) org-level-faces)) |
2387 (cond | 2387 (cond |
2388 ((eq n 1) (if org-hide-leading-stars 'org-hide org-f)) | 2388 ((eq n 1) (if org-hide-leading-stars 'org-hide org-f)) |
2389 ((eq n 2) org-f) | 2389 ((eq n 2) org-f) |
2390 (t (if org-level-color-stars-only nil org-f)))) | 2390 (t (if org-level-color-stars-only nil org-f)))) |
2391 | 2391 |