Browse Source

Make byte-compiler happy

Nicolas Goaziou 14 years ago
parent
commit
6489346093
2 changed files with 14 additions and 15 deletions
  1. 1 0
      lisp/org-list.el
  2. 13 15
      lisp/org.el

+ 1 - 0
lisp/org-list.el

@@ -121,6 +121,7 @@
 (declare-function org-trim "org" (s))
 (declare-function org-uniquify "org" (list))
 (declare-function outline-invisible-p "outline" (&optional pos))
+(declare-function outline-flag-region "outline" (from to flag))
 (declare-function outline-next-heading "outline" ())
 (declare-function outline-previous-heading "outline" ())
 

+ 13 - 15
lisp/org.el

@@ -19096,23 +19096,21 @@ the functionality can be provided as a fall-back.")
 	       (save-restriction
 		 (narrow-to-region beg end)
 		 (save-excursion (fill-paragraph justify)))) t))
-	  ;; Special case where point is not in a list but is on a
-	  ;; paragraph adjacent to a list: make sure this paragraph
+	  ;; Special case where point is not in a list but is on
+	  ;; a paragraph adjacent to a list: make sure this paragraph
 	  ;; doesn't get merged with the end of the list by narrowing
 	  ;; buffer first.
-	  ((save-excursion
-	     (fill-forward-paragraph -1)
-	     (setq itemp (org-in-item-p)))
-	   (save-excursion
-	     (goto-char itemp)
-	     (setq struct (org-list-struct)))
-	   (save-restriction
-	     (narrow-to-region (org-list-get-bottom-point struct)
-			       (save-excursion
-				 (fill-forward-paragraph 1)
-				 (point)))
-	     (fill-paragraph justify) t))
-	  (t nil))))			; call `fill-paragraph'
+	  ((save-excursion (fill-forward-paragraph -1)
+			   (setq itemp (org-in-item-p)))
+	   (let ((struct (save-excursion (goto-char itemp)
+					 (org-list-struct))))
+	     (save-restriction
+	       (narrow-to-region (org-list-get-bottom-point struct)
+				 (save-excursion (fill-forward-paragraph 1)
+						 (point)))
+	       (fill-paragraph justify) t)))
+	  ;; Else simply call `fill-paragraph'.
+	  (t nil))))
 
 ;; For reference, this is the default value of adaptive-fill-regexp
 ;;  "[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"