diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-09 12:15:19 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-09 12:15:19 +0100 |
commit | aeba61e640b801e28c9089417ea140550d84ae79 (patch) | |
tree | 3d19fe7e2d968921b279c18f38c159016bc24656 | |
parent | bc5b23def7ea4a80fcc50063a9dd36f54c602616 (diff) | |
download | org-mode-aeba61e640b801e28c9089417ea140550d84ae79.tar.gz |
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.
-rwxr-xr-x | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/org.el | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b152ee..3d73f5f 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/org.el b/lisp/org.el index 21aa09a..8283cda 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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 () |