0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 14:10:42 +00:00

Revert "org.el (org-fixup-indentation): Correctly indent meta lines."

This reverts commit 6b04befa48.
This commit is contained in:
Bastien Guerry 2011-09-09 19:47:41 +02:00
parent 16333d4a53
commit 28ae6b4de1

View file

@ -7346,31 +7346,12 @@ After top level, it switches back to sibling level."
However, if any line in the current entry has no indentation, or if it However, if any line in the current entry has no indentation, or if it
would end up with no indentation after the change, nothing at all is done." would end up with no indentation after the change, nothing at all is done."
(save-excursion (save-excursion
(let* ((end (save-excursion (outline-next-heading) (let ((end (save-excursion (outline-next-heading)
(point-marker))) (point-marker)))
;; FIXME we should use `org-end-of-meta-data-and-drawers'
;; here but it matches misplaced :END:...
(drawer-end (save-excursion
(and (re-search-forward
org-property-end-re end t)
(match-end 0))))
(prohibit (if (> diff 0) (prohibit (if (> diff 0)
"^\\S-" "^\\S-"
(concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-")))
col) col)
(while (re-search-forward
(concat "\\(" (regexp-opt org-all-time-keywords)
"\\|" "^[ \t]*" org-tsr-regexp-both "*$"
"\\|" "^[ \t]*:[a-zA-Z][a-zA-Z0-9_]*:.*$"
"\\)") (or drawer-end end) t)
(beginning-of-line)
(when (looking-at "^[ \t]+")
(goto-char (match-end 0))
(setq col (current-column))
(if (< diff 0) (replace-match ""))
(org-indent-to-column (+ diff col))
(if drawer-end (setq drawer-end (+ diff drawer-end))))
(end-of-line))
(unless (save-excursion (end-of-line 1) (unless (save-excursion (end-of-line 1)
(re-search-forward prohibit end t)) (re-search-forward prohibit end t))
(while (and (< (point) end) (while (and (< (point) end)
@ -13707,7 +13688,7 @@ Being in this list makes sure that they are offered for completion.")
(defsubst org-re-property (property) (defsubst org-re-property (property)
"Return a regexp matching PROPERTY. "Return a regexp matching PROPERTY.
Match group 1 will be set to the value of the property." Match group 1 will be set to the value "
(concat "^[ \t]*:" (regexp-quote property) ":[ \t]*\\(\\S-.*\\)")) (concat "^[ \t]*:" (regexp-quote property) ":[ \t]*\\(\\S-.*\\)"))
(defun org-property-action () (defun org-property-action ()
@ -20335,7 +20316,6 @@ If there is no such heading, return nil."
(unless (eobp) (backward-char 1))) (unless (eobp) (backward-char 1)))
ad-do-it)) ad-do-it))
;; FIXME This should not match :END: for custom drawers?
(defun org-end-of-meta-data-and-drawers () (defun org-end-of-meta-data-and-drawers ()
"Jump to the first text after meta data and drawers in the current entry. "Jump to the first text after meta data and drawers in the current entry.
This will move over empty lines, lines with planning time stamps, This will move over empty lines, lines with planning time stamps,