diff options
author | Case Duckworth | 2021-04-19 15:46:31 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-19 15:46:31 -0500 |
commit | 2f35181b9ae81aba268a3770113a0482364ce8ea (patch) | |
tree | cf2d75449a04ff7a869a0ab18325395000a3f984 /lisp | |
parent | Merge branch 'main' of https://tildegit.org/acdw/emacs (diff) | |
download | emacs-2f35181b9ae81aba268a3770113a0482364ce8ea.tar.gz emacs-2f35181b9ae81aba268a3770113a0482364ce8ea.zip |
Tweak `org-table-copy-down'
Now <S-return> will do its regular thing /in/ a table, but will also work /outside/ a table as a regular <return>.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-org.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index c4431ab..46497f6 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el | |||
@@ -212,7 +212,7 @@ appropriate. In tables, insert a new row or end the table." | |||
212 | title) | 212 | title) |
213 | 213 | ||
214 | 214 | ||
215 | ;;; ADVICE | 215 | ;;; ADVICE AND TWEAKS |
216 | 216 | ||
217 | ;; Correct `org-delete-backward-char' to use `backward-delete-char-untabify' | 217 | ;; Correct `org-delete-backward-char' to use `backward-delete-char-untabify' |
218 | (defun acdw-org/delete-backward-char (N) | 218 | (defun acdw-org/delete-backward-char (N) |
@@ -236,4 +236,12 @@ the deletion might narrow the column." | |||
236 | (backward-delete-char-untabify N) | 236 | (backward-delete-char-untabify N) |
237 | (org-fix-tags-on-the-fly)))) | 237 | (org-fix-tags-on-the-fly)))) |
238 | 238 | ||
239 | (defun acdw-org/org-table-copy-down (n) | ||
240 | "Like `org-table-copy-down', except instead of erroring when | ||
241 | that command makes no sense, just call `org-return'." | ||
242 | (interactive "p") | ||
243 | (if (org-table-check-inside-data-field 'noerror) | ||
244 | (org-table-copy-down n) | ||
245 | (unpackaged/org-return-dwim n))) | ||
246 | |||
239 | (provide 'acdw-org) | 247 | (provide 'acdw-org) |