diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f42e4c604..4d4a41995 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2009-11-18 Carsten Dominik + * org.el (org-fontify-meta-lines-and-blocks): Apply special faces + for special blocks. + + * org-faces.el (org-copy-face): Set lisp indentation. + (org-quote, org-verse): New faces. + * org-agenda.el (org-agenda-remove-date): Remove variable. 2009-11-17 Carsten Dominik diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 23d000bfb..75ba13d10 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -44,6 +44,7 @@ (copy-face old-face new-face) (if (fboundp 'set-face-doc-string) (set-face-doc-string new-face docstring))))) +(put 'org-copy-face 'lisp-indent-function 2) (defgroup org-faces nil "Faces in Org-mode." @@ -468,6 +469,11 @@ changes." :group 'org-faces :version "22.1") +(org-copy-face 'org-block 'org-quote + "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.") +(org-copy-face 'org-block 'org-verse + "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.") + (defface org-clock-overlay ;; copied from secondary-selection (org-compatible-face nil '((((class color) (min-colors 88) (background light)) diff --git a/lisp/org.el b/lisp/org.el index 20477d634..356925e43 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4540,7 +4540,7 @@ will be prompted for." (beg1 (line-beginning-position 2)) (dc1 (downcase (match-string 2))) (dc3 (downcase (match-string 3))) - end end1 quoting) + end end1 quoting block-type) (cond ((member dc1 '("html:" "ascii:" "latex:" "docbook:")) ;; a single line of backend-specific content @@ -4554,8 +4554,8 @@ will be prompted for." t) ((and (match-end 4) (equal dc3 "begin")) ;; Truely a block - (setq quoting (member (downcase (match-string 5)) - org-protecting-blocks)) + (setq block-type (downcase (match-string 5)) + quoting (member block-type org-protecting-blocks)) (when (re-search-forward (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") nil t) ;; on purpose, we look further than LIMIT @@ -4568,8 +4568,13 @@ will be prompted for." '(font-lock-fontified t font-lock-multiline t)) (add-text-properties beg beg1 '(face org-meta-line)) (add-text-properties end1 end '(face org-meta-line)) - (when quoting + (cond + (quoting (add-text-properties beg1 end1 '(face org-block))) + ((string= block-type "quote") + (add-text-properties beg1 end1 '(face org-quote))) + ((string= block-type "verse") + (add-text-properties beg1 end1 '(face org-verse)))) t)) ((not (member (char-after beg) '(?\ ?\t))) ;; just any other in-buffer setting, but not indented