瀏覽代碼

Move some functions in "org-macs.el"

* lisp/org.el (org--line-empty-p):
(org-previous-line-empty-p):
(org-next-line-empty-p): Move these functions...
* lisp/org-macs.el: ... here.
Nicolas Goaziou 5 年之前
父節點
當前提交
1e1328b41c
共有 2 個文件被更改,包括 19 次插入21 次删除
  1. 19 0
      lisp/org-macs.el
  2. 0 21
      lisp/org.el

+ 19 - 0
lisp/org-macs.el

@@ -645,6 +645,25 @@ The number of levels is controlled by `org-inlinetask-min-level'."
 			  limit-level)))
 	   (format "\\*\\{1,%d\\} " nstars)))))
 
+(defun org--line-empty-p (n)
+  "Is the Nth next line empty?
+Counts the current line as N = 1 and the previous line as N = 0;
+see `beginning-of-line'."
+  (and (not (bobp))
+       (save-excursion
+	 (beginning-of-line n)
+	 (looking-at-p "[ \t]*$"))))
+
+(defun org-previous-line-empty-p ()
+  "Is the previous line a blank line?
+When NEXT is non-nil, check the next line instead."
+  (org--line-empty-p 0))
+
+(defun org-next-line-empty-p ()
+  "Is the previous line a blank line?
+When NEXT is non-nil, check the next line instead."
+  (org--line-empty-p 2))
+
 
 
 ;;; Motion

+ 0 - 21
lisp/org.el

@@ -6804,27 +6804,6 @@ frame is not changed."
 
 ;;; Inserting headlines
 
-(defun org--line-empty-p (n)
-  "Is the Nth next line empty?
-
-Counts the current line as N = 1 and the previous line as N = 0;
-see `beginning-of-line'."
-  (save-excursion
-    (and (not (bobp))
-	 (or (beginning-of-line n) t)
-	 (save-match-data
-	   (looking-at "[ \t]*$")))))
-
-(defun org-previous-line-empty-p ()
-  "Is the previous line a blank line?
-When NEXT is non-nil, check the next line instead."
-  (org--line-empty-p 0))
-
-(defun org-next-line-empty-p ()
-  "Is the previous line a blank line?
-When NEXT is non-nil, check the next line instead."
-  (org--line-empty-p 2))
-
 (defun org--blank-before-heading-p (&optional parent)
   "Non-nil when an empty line should precede a new heading here.
 When optional argument PARENT is non-nil, consider parent