diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-12-03 21:50:45 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-12-03 21:50:45 +0100 |
commit | 3a317abc23446ea8c5b4297f25315c08010ae871 (patch) | |
tree | 4c651e635bc71b1dea1bda13073577172ce0f2ea | |
parent | 3f6c64a8e2d11e003da4d2bd775807448427f5b8 (diff) | |
parent | af6f14d907dc2f0116af9e513bbbd3771cc690aa (diff) | |
download | org-mode-3a317abc23446ea8c5b4297f25315c08010ae871.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el index c0c51c4..590248d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20324,10 +20324,17 @@ This command does many different things, depending on context: (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")) - ;; When at a link, act according to the parent instead. - (when (eq type 'link) - (setq context (org-element-property :parent context)) - (setq type (org-element-type context))) + (case type + ;; When at a link, act according to the parent instead. + (link (setq context (org-element-property :parent context)) + (setq type (org-element-type context))) + ;; Unsupported object types: check parent element instead. + ((bold code entity export-snippet inline-babel-call inline-src-block + italic latex-fragment line-break macro strike-through subscript + superscript underline verbatim) + (while (and (setq context (org-element-property :parent context)) + (not (memq (setq type (org-element-type context)) + '(paragraph verse-block))))))) ;; For convenience: at the first line of a paragraph on the ;; same line as an item, apply function on that item instead. (when (eq type 'paragraph) |