Browse Source

Tiny refactoring

* lisp/org.el (org-cycle): Use `org-match-line' instead of
`save-excursion' + `beginning-of-line' + `looking-at'.
Nicolas Goaziou 4 years ago
parent
commit
7dbd749bf8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lisp/org.el

+ 1 - 2
lisp/org.el

@@ -6352,8 +6352,7 @@ Use `\\[org-edit-special]' to edit table.el tables"))
 				 (= (line-beginning-position)
 				    (org-element-property :post-affiliated
 							  item)))))
-		     (save-excursion (beginning-of-line 1)
-				     (looking-at org-outline-regexp)))
+		     (org-match-line org-outline-regexp))
 		 (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
 	    (org-cycle-internal-local))
 	   ;; From there: TAB emulation and template completion.