diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-02-15 16:08:09 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-02-15 16:14:15 +0100 |
commit | 0b6a2e2416b0acc28469661d7013f92f82a34267 (patch) | |
tree | ce622b124eb6f81a377ff8f506d6c1e84f53e3e4 | |
parent | dbadb2916b713853a79cc8b8aa8c65086d9fff7e (diff) | |
download | org-mode-0b6a2e2416b0acc28469661d7013f92f82a34267.tar.gz |
C-c C-c does nothing when at a blank line
* lisp/org.el (org-ctrl-c-ctrl-c): Do nothing when at a blank line,
but still run `org-ctrl-c-ctrl-c-final-hook'.
-rw-r--r-- | lisp/org.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index 81926f1..c37f507 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19651,13 +19651,8 @@ This command does many different things, depending on context: ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-hook)) (t (let* ((context (org-element-context)) (type (org-element-type context))) - ;; Test if point is within blanks at the end of an element. - (if (save-excursion - (or (not context) - (beginning-of-line) - (and (looking-at "[ \t]*$") - (skip-chars-forward " \r\t\n") - (>= (point) (org-element-property :end context))))) + ;; Test if point is within a blank line. + (if (save-excursion (beginning-of-line) (looking-at "[ \t]*$")) (or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook) (user-error "C-c C-c can do nothing useful at this location")) ;; For convenience: at the first line of a paragraph on the |