Browse Source

Tables: Fix auto-blanking of fields is yasnippet is active.

When yasnippet is active, it is the official binding of TAB.  That
means, the org-mode self-insert command must know that it may blank
table fields if the last command was yas/expand.
Carsten Dominik 16 years ago
parent
commit
94c4f801a2
2 changed files with 3 additions and 2 deletions
  1. 2 1
      lisp/org-table.el
  2. 1 1
      lisp/org.el

+ 2 - 1
lisp/org-table.el

@@ -3608,7 +3608,8 @@ overwritten, and the table is not marked as requiring realignment."
 			   orgtbl-hijacker-command-102
 			   orgtbl-hijacker-command-103
 			   orgtbl-hijacker-command-104
-			   orgtbl-hijacker-command-105))
+			   orgtbl-hijacker-command-105
+			   yas/expand))
 		 (org-table-blank-field))
 	    t)
 	   (eq N 1)

+ 1 - 1
lisp/org.el

@@ -13975,7 +13975,7 @@ overwritten, and the table is not marked as requiring realignment."
 	 ;; check if we blank the field, and if that triggers align
 	 (and (featurep 'org-table) org-table-auto-blank-field
 	      (member last-command
-		      '(org-cycle org-return org-shifttab org-ctrl-c-ctrl-c))
+		      '(org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))
 	      (if (or (equal (char-after) ?\ ) (looking-at "[^|\n]*  |"))
 		  ;; got extra space, this field does not determine column width
 		  (let (org-table-may-need-update) (org-table-blank-field))