0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

Better recognizing of source code snippets

* lisp/org.el (org-edit-special): Make sure source code editing goes
before table formula editing.
* lisp/org-table.el (org-table-fedit-map): "C-c '" will now also exit
the formula editor.
This commit is contained in:
Carsten Dominik 2010-06-06 12:50:44 +02:00
parent 7920c4425c
commit 28babd4dff
2 changed files with 6 additions and 5 deletions

View file

@ -2764,6 +2764,7 @@ Parameters get priority."
(org-defkey map "\C-x\C-s" 'org-table-fedit-finish)
(org-defkey map "\C-c\C-s" 'org-table-fedit-finish)
(org-defkey map "\C-c\C-c" 'org-table-fedit-finish)
(org-defkey map "\C-c'" 'org-table-fedit-finish)
(org-defkey map "\C-c\C-q" 'org-table-fedit-abort)
(org-defkey map "\C-c?" 'org-table-show-reference)
(org-defkey map [(meta shift up)] 'org-table-fedit-line-up)
@ -2860,7 +2861,7 @@ Parameters get priority."
(if (eq org-table-use-standard-references t)
(org-table-fedit-toggle-ref-type))
(org-goto-line startline)
(message "Edit formulas and finish with `C-c C-c'. See menu for more commands.")))
(message "Edit formulas, finish with `C-c C-c' or `C-c ' '. See menu for more commands.")))
(defun org-table-fedit-post-command ()
(when (not (memq this-command '(lisp-complete-symbol)))

View file

@ -16859,16 +16859,16 @@ When in an #+include line, visit the include file. Otherwise call
`ffap' to visit the file at point."
(interactive)
(cond
((org-at-table.el-p)
(org-edit-src-code))
((org-at-table-p)
(call-interactively 'org-table-edit-formulas))
((save-excursion
(beginning-of-line 1)
(looking-at "\\(?:#\\+\\(?:setupfile\\|include\\):?[ \t]+\"?\\|[ \t]*<include\\>.*?file=\"\\)\\([^\"\n>]+\\)"))
(find-file (org-trim (match-string 1))))
((org-edit-src-code))
((org-edit-fixed-width-region))
((org-at-table.el-p)
(org-edit-src-code))
((org-at-table-p)
(call-interactively 'org-table-edit-formulas))
(t (call-interactively 'ffap))))