Fix RET in orgtbl-mode, when cursor is at the beginning of the buffer.

RET did fail in orgtbl-mode, if the cursor was at the beginning of the
buffer.  Now it opens a new line whenever the cursor is at the
beginning of a line, and that includes the beginning of the buffer.....
This commit is contained in:
Carsten Dominik 2008-11-24 22:45:56 +01:00
parent 663960af62
commit aacbb2756c
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2008-11-24 Carsten Dominik <carsten.dominik@gmail.com>
* org-table.el (orgtbl-ret): Fix RET at beginning-of-buffer.
* org-publish.el (org-publish-org-index): Improve removal of
temporary buffers.

View File

@ -3461,8 +3461,10 @@ With prefix arg, also recompute table."
(defun orgtbl-ret ()
"Justification and field motion for `orgtbl-mode'."
(interactive)
(org-table-justify-field-maybe)
(org-table-next-row))
(if (bobp)
(newline)
(org-table-justify-field-maybe)
(org-table-next-row)))
(defun orgtbl-self-insert-command (N)
"Like `self-insert-command', use overwrite-mode for whitespace in tables.