فهرست منبع

Read-date: New hook

The new hook `org-read-date-minibuffer-setup-hook'.
Carsten Dominik 16 سال پیش
والد
کامیت
1aabee4a8a
2فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 3 0
      lisp/ChangeLog
  2. 8 0
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-03-22  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-read-date-minibiffer-septup-hook): New hook.
+	(org-read-date): Run the new hook.
+
 	* org-mac-message.el (org-mac-flagged-mail): New group.
 	(org-mac-mail-account): New variable.
 	(org-mac-create-flagged-mail, org-mac-insert-flagged-mail): New

+ 8 - 0
lisp/org.el

@@ -2052,6 +2052,13 @@ When nil, only the minibuffer will be available."
     (defvaralias 'org-popup-calendar-for-date-prompt
       'org-read-date-popup-calendar))
 
+(defcustom org-read-date-minibuffer-setup-hook nil
+  "Hook to be used to set up keys for the date/time interface.
+Add key definitions to `minibuffer-local-map', which will be a temporary
+copy."
+  :group 'org-time
+  :type 'hook)
+
 (defcustom org-extend-today-until 0
   "The hour when your day really ends.  Must be an integer.
 This has influence for the following applications:
@@ -11705,6 +11712,7 @@ user."
 	    (org-defkey minibuffer-local-map "<"
 	      (lambda () (interactive)
 		(org-eval-in-calendar '(scroll-calendar-right 1))))
+	    (run-hooks 'org-read-date-minibuffer-setup-hook)
 	    (unwind-protect
 		(progn
 		  (use-local-map map)