瀏覽代碼

org-mobile: Demote `org-mobile-action-alist' as a defvar

* lisp/org-mobile.el (org-mobile-action-alist): Make it a defconst
  instead of a defcustom.

This variable is not meant to be modified, because the interface used is
not clear enough.
Nicolas Goaziou 8 年之前
父節點
當前提交
f5500e033c
共有 1 個文件被更改,包括 20 次插入24 次删除
  1. 20 24
      lisp/org-mobile.el

+ 20 - 24
lisp/org-mobile.el

@@ -191,30 +191,6 @@ the editing types for which the mobile version should always dominate."
 	       (const heading)
 	       (const body))))
 
-(defcustom org-mobile-action-alist
-  '(("edit" . #'org-mobile-edit))
-  "Alist with flags and actions for mobile sync.
-When flagging an entry, MobileOrg will create entries that look like
-
-  * F(action:data)  [[id:entry-id][entry title]]
-
-This alist defines that the ACTION in the parentheses of F()
-should mean, i.e. what action should be taken.  The :data part in
-the parenthesis is optional.  If present, the string after the
-colon will be passed to the action function as the first argument
-variable.
-
-The car of each elements of the alist is an actions string.  The
-cdr is a function that is called with the cursor on the headline
-of that entry.  It should accept three arguments, the :data part,
-the old and new values for the entry.
-
-For now, it is not recommended to change this variable."
-  :group 'org-mobile
-  :type '(repeat
-	  (cons (string :tag "Action flag")
-		(sexp   :tag "Action form"))))
-
 (defcustom org-mobile-checksum-binary (or (executable-find "shasum")
 					  (executable-find "sha1sum")
 					  (executable-find "md5sum")
@@ -251,6 +227,26 @@ by the mobile device, this hook should be used to copy the emptied
 capture file `mobileorg.org' back to the WebDAV directory, for example
 using `rsync' or `scp'.")
 
+(defvar org-mobile-action-alist
+  '(("edit" . #'org-mobile-edit))
+  "Alist with flags and actions for mobile sync.
+When flagging an entry, MobileOrg will create entries that look like
+
+  * F(action:data)  [[id:entry-id][entry title]]
+
+This alist defines that the ACTION in the parentheses of F()
+should mean, i.e. what action should be taken.  The :data part in
+the parenthesis is optional.  If present, the string after the
+colon will be passed to the action function as the first argument
+variable.
+
+The car of each elements of the alist is an actions string.  The
+cdr is a function that is called with the cursor on the headline
+of that entry.  It should accept three arguments, the :data part,
+the old and new values for the entry.
+
+For now, it is not recommended to change this variable.")
+
 (defvar org-mobile-last-flagged-files nil
   "List of files containing entries flagged in the latest pull.")