1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

New hooks to attach commands to S-cursor hooks

This commit is contained in:
Carsten Dominik 2010-04-23 20:52:28 +02:00
parent 899302ce86
commit 98026d21e3
2 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2010-04-23 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-shiftup-hook, org-shiftdown-hook)
(org-shiftleft-hook, org-shiftright-hook): New hooks.
* org-entities.el (org-entities): Use \land and \lor for logical
operators.

View File

@ -15930,6 +15930,18 @@ See `org-ctrl-c-ctrl-c-hook' for more information.")
(defvar org-metareturn-hook nil
"Hook for functions attaching themselves to `M-RET'.
See `org-ctrl-c-ctrl-c-hook' for more information.")
(defvar org-shiftup-hook nil
"Hook for functions attaching themselves to `S-up'.
See `org-ctrl-c-ctrl-c-hook' for more information.")
(defvar org-shiftdown-hook nil
"Hook for functions attaching themselves to `S-down'.
See `org-ctrl-c-ctrl-c-hook' for more information.")
(defvar org-shiftleft-hook nil
"Hook for functions attaching themselves to `S-left'.
See `org-ctrl-c-ctrl-c-hook' for more information.")
(defvar org-shiftright-hook nil
"Hook for functions attaching themselves to `S-right'.
See `org-ctrl-c-ctrl-c-hook' for more information.")
(defun org-modifier-cursor-error ()
"Throw an error, a modified cursor command was applied in wrong context."
@ -16126,6 +16138,7 @@ Calls `org-timestamp-up' or `org-priority-up', or `org-previous-item',
depending on context. See the individual commands for more information."
(interactive "P")
(cond
((run-hook-with-args-until-success 'org-shiftup-hook))
((and org-support-shift-select (org-region-active-p))
(org-call-for-shift-select 'previous-line))
((org-at-timestamp-p t)
@ -16148,6 +16161,7 @@ Calls `org-timestamp-down' or `org-priority-down', or `org-next-item'
depending on context. See the individual commands for more information."
(interactive "P")
(cond
((run-hook-with-args-until-success 'org-shiftdown-hook))
((and org-support-shift-select (org-region-active-p))
(org-call-for-shift-select 'next-line))
((org-at-timestamp-p t)
@ -16175,6 +16189,7 @@ Depending on context, this does one of the following:
- on a clocktable definition line, move time block into the future"
(interactive "P")
(cond
((run-hook-with-args-until-success 'org-shiftright-hook))
((and org-support-shift-select (org-region-active-p))
(org-call-for-shift-select 'forward-char))
((org-at-timestamp-p t) (call-interactively 'org-timestamp-up-day))
@ -16209,6 +16224,7 @@ Depending on context, this does one of the following:
- on a clocktable definition line, move time block into the past"
(interactive "P")
(cond
((run-hook-with-args-until-success 'org-shiftleft-hook))
((and org-support-shift-select (org-region-active-p))
(org-call-for-shift-select 'backward-char))
((org-at-timestamp-p t) (call-interactively 'org-timestamp-down-day))