Provide more consistent regexps for headlines
commitdfcb6faef11a2439b56b18a6289803361d402130
authorNicolas Goaziou <n.goaziou@gmail.com>
Wed, 24 Aug 2011 23:58:29 +0000 (25 01:58 +0200)
committerNicolas Goaziou <n.goaziou@gmail.com>
Sun, 23 Oct 2011 07:30:13 +0000 (23 09:30 +0200)
tree4f31535b19997c95fdd5ba7de4ceb76cd875c20e
parent440ec7e2daac77cd6002f4b1ce749319ab16b065
Provide more consistent regexps for headlines

* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
lisp/org-agenda.el
lisp/org-archive.el
lisp/org-ascii.el
lisp/org-colview-xemacs.el
lisp/org-colview.el
lisp/org-docbook.el
lisp/org-exp.el
lisp/org-html.el
lisp/org-mouse.el
lisp/org.el