diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2008-11-24 22:45:56 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2008-11-24 22:45:56 +0100 |
commit | aacbb2756c259bd3ea746954137f299ddd3c2543 (patch) | |
tree | 864f0d09cebc1707693d9a5142a70343c340bf62 | |
parent | 663960af62f3ac0184c0a0afb0bc3eee42417f25 (diff) | |
download | org-mode-aacbb2756c259bd3ea746954137f299ddd3c2543.tar.gz |
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.....
-rwxr-xr-x | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/org-table.el | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24087ef..2249679 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/org-table.el b/lisp/org-table.el index 5e8442c..4dbbda4 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -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. |