Browse Source

Merge branch 'maint'

Bastien Guerry 12 years ago
parent
commit
196c5797d2
1 changed files with 12 additions and 13 deletions
  1. 12 13
      lisp/org-agenda.el

+ 12 - 13
lisp/org-agenda.el

@@ -3753,19 +3753,18 @@ A good way to set it is through options in `org-agenda-custom-commands'.")
 Also moves point to the end of the skipped region, so that search can
 Also moves point to the end of the skipped region, so that search can
 continue from there."
 continue from there."
   (let ((p (point-at-bol)) to)
   (let ((p (point-at-bol)) to)
-    (when (org-in-src-block-p t) (throw :skip t))
-    (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
-	 (get-text-property p :org-archived)
-	 (org-end-of-subtree t)
-	 (throw :skip t))
-    (and org-agenda-skip-comment-trees
-	 (get-text-property p :org-comment)
-	 (org-end-of-subtree t)
-	 (throw :skip t))
-    (if (equal (char-after p) ?#) (throw :skip t))
-    (when (setq to (or (org-agenda-skip-eval org-agenda-skip-function-global)
-		       (org-agenda-skip-eval org-agenda-skip-function)))
-      (goto-char to)
+    (when (or
+	   (eq (get-text-property p 'face) 'font-lock-comment-face)
+	   (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
+		(get-text-property p :org-archived)
+		(org-end-of-subtree t))
+	   (and org-agenda-skip-comment-trees
+		(get-text-property p :org-comment)
+		(org-end-of-subtree t))
+	   (and (setq to (or (org-agenda-skip-eval org-agenda-skip-function-global)
+			     (org-agenda-skip-eval org-agenda-skip-function)))
+		(goto-char to))
+	   (org-in-src-block-p t))
       (throw :skip t))))
       (throw :skip t))))
 
 
 (defun org-agenda-skip-eval (form)
 (defun org-agenda-skip-eval (form)