Browse Source

Fix thinko

* lisp/org.el (org-toggle-tag): Do not call `match-string' after
  `replace-match'.
Nicolas Goaziou 7 years ago
parent
commit
d777d5e0b7
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lisp/org.el

+ 3 - 3
lisp/org.el

@@ -14746,9 +14746,9 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
     (org-back-to-heading t)
     (let ((current
 	   (when (re-search-forward "[ \t]:\\([[:alnum:]_@#%:]+\\):[ \t]*$"
-				    (point-at-eol) t)
-	     (replace-match "")
-	     (nreverse (org-split-string (match-string 1) ":"))))
+				    (line-end-position) t)
+	     (prog1 (nreverse (org-split-string (match-string 1) ":"))
+	       (replace-match ""))))
 	  res)
       (pcase onoff
 	(`off (setq current (delete tag current)))