Implement org-return-follows-link directly in `org-return'.

This used to depend on the mouse map, but I no longer think this is a
good idea.  So the function org-return now directly handles this case.
This commit is contained in:
Carsten Dominik 2009-02-09 12:15:19 +01:00
parent bc5b23def7
commit aeba61e640
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2009-02-09 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-return): Implement `org-return-follows-link' in the
function org-return. This is more robust than using the mouse
map, I think.
2009-02-07 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-preprocess-string): Remove clock lines

View File

@ -3704,9 +3704,6 @@ The following commands are available:
(when org-tab-follows-link
(org-defkey org-mouse-map [(tab)] 'org-open-at-point)
(org-defkey org-mouse-map "\C-i" 'org-open-at-point))
(when org-return-follows-link
(org-defkey org-mouse-map [(return)] 'org-open-at-point)
(org-defkey org-mouse-map "\C-m" 'org-open-at-point))
(require 'font-lock)
@ -13588,15 +13585,18 @@ See the individual commands for more information."
(interactive)
(cond
((bobp) (if indent (newline-and-indent) (newline)))
((org-at-table-p)
(org-table-justify-field-maybe)
(call-interactively 'org-table-next-row))
((and org-return-follows-link
(eq (get-text-property (point) 'face) 'org-link))
(call-interactively 'org-open-at-point))
((and (org-at-heading-p)
(looking-at
(org-re "\\([ \t]+\\(:[[:alnum:]_@:]+:\\)\\)[ \t]*$")))
(org-show-entry)
(end-of-line 1)
(newline))
((org-at-table-p)
(org-table-justify-field-maybe)
(call-interactively 'org-table-next-row))
(t (if indent (newline-and-indent) (newline)))))
(defun org-return-indent ()