0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Do not blank a table cell after expanding a snippet

* lisp/org.el (org-self-insert-command): Do not blank a table cell if
  last command is `yas-expand'.

Thanks to Sébastien Vauban for reporting it.
<http://permalink.gmane.org/gmane.emacs.orgmode/92918>
This commit is contained in:
Nicolas Goaziou 2014-12-03 21:36:15 +01:00
parent 6289d8ecf4
commit 6d2a661fcc

View file

@ -19829,8 +19829,8 @@ overwritten, and the table is not marked as requiring realignment."
(progn
;; 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 yas-expand))
(memq last-command
'(org-cycle org-return org-shifttab org-ctrl-c-ctrl-c))
(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))