Преглед изворни кода

Fix last commit

* lisp/org.el (org-edit-headline): Fix `save-match-data' scope.

`org-trim' modifies match data. `read-string' doesn't.
Nicolas Goaziou пре 8 година
родитељ
комит
cf77060d18
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -8003,7 +8003,8 @@ Set it to HEADING when provided."
    (org-back-to-heading t)
    (when (looking-at org-complex-heading-regexp)
      (let* ((old (match-string-no-properties 4))
-	    (new (org-trim (or heading (save-match-data (read-string "Edit: " old))))))
+	    (new (save-match-data
+		   (org-trim (or heading (read-string "Edit: " old))))))
        (unless (equal old new)
 	 (if old (replace-match new t t nil 4)
 	   (goto-char (or (match-end 3) (match-end 2) (match-end 1)))