소스 검색

org-table: Better fix for `:org-untouchable'

* lisp/org-table.el (org-table-recalculate): Fix typo in existing
  `remove-text-properties' call instead of adding a new one.

Also, cleaning property before processing formulas is more robust,
e.g., if last process raised an error.
Nicolas Goaziou 7 년 전
부모
커밋
946f76d707
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      lisp/org-table.el

+ 2 - 5
lisp/org-table.el

@@ -3242,7 +3242,7 @@ existing formula for column %s"
 	 (goto-char beg)
 	 ;; Mark named fields untouchable.  Also check if several
 	 ;; field/range formulas try to set the same field.
-	 (remove-text-properties beg end '(org-untouchable t))
+	 (remove-text-properties beg end '(:org-untouchable t))
 	 (let ((current-line (count-lines org-table-current-begin-pos
 					  (line-beginning-position)))
 	       seen-fields)
@@ -3270,9 +3270,7 @@ existing formula for column %s"
 		 (org-table-goto-field name)
 		 (org-table-put-field-property :org-untouchable t)))))
 	 ;; Evaluate the column formulas, but skip fields covered by
-	 ;; field formulas.  This is done by setting
-	 ;; `:org-untouchable' property on such fields.  The property
-	 ;; is them removed once column formulas have been applied.
+	 ;; field formulas.
 	 (goto-char beg)
 	 (while (re-search-forward line-re end t)
 	   (unless (string-match "\\` *[_^!$/] *\\'" (org-table-get-field 1))
@@ -3294,7 +3292,6 @@ existing formula for column %s"
 	       (unless (get-text-property (point) :org-untouchable)
 		 (org-table-eval-formula
 		  nil (cdr entry) 'noalign 'nocst 'nostore 'noanalysis)))))
-	 (remove-text-properties beg end '(:org-untouchable))
 	 ;; Evaluate the field formulas.
 	 (dolist (eq eqlfield)
 	   (let ((reference (car eq))