Browse Source

Fix customization types of variables

* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
Carsten Dominik 8 years ago
11 changed files with 45 additions and 28 deletions
  1. 1 1
  2. 1 1
  3. 8 7
  4. 3 1
  5. 2 1
  6. 1 0
  7. 1 1
  8. 16 7
  9. 7 5
  10. 2 1
  11. 3 3

+ 1 - 1

@@ -67,7 +67,7 @@ googlegroups otherwise."
 (defcustom org-wl-namazu-default-index nil
   "Default namazu search index."
-  :type 'directory
+  :type '(choice (const nil) (directory))
   :group 'org-wl)
 ;; Declare external functions and variables

+ 1 - 1

@@ -35,7 +35,7 @@
 This is an association list.  Populate the library by adding
 files to `org-babel-lob-files'.")
-(defcustom org-babel-lob-files '()
+(defcustom org-babel-lob-files nil
   "Files used to populate the `org-babel-library-of-babel'.
 To add files to this list use the `org-babel-lob-ingest' command."
   :group 'org-babel

+ 8 - 7

@@ -227,7 +227,9 @@ As the value of this option simply gets inserted into the HTML <head> header,
 you can \"misuse\" it to also add other text to the header."
   :group 'org-agenda-export
   :group 'org-export-html
-  :type 'string)
+  :type '(choice
+	  (const nil)
+	  (string)))
 (defcustom org-agenda-persistent-filter nil
   "When set, keep filters from one agenda view to the next."
@@ -1124,7 +1126,8 @@ option will be ignored."
 Should be 1 or 7.
 Obsolete, see `org-agenda-span'."
   :group 'org-agenda-daily/weekly
-  :type 'integer)
+  :type '(choice (const nil)
+		 (integer)))
 (make-obsolete-variable 'org-agenda-ndays 'org-agenda-span "24.1")
@@ -1729,9 +1732,7 @@ that passed since this item was scheduled first."
 These entries are added to the agenda when pressing \"[\"."
   :group 'org-agenda-line-format
   :version "24.1"
-  :type '(list
-	  (string :tag "Scheduled today     ")
-	  (string :tag "Scheduled previously")))
+  :type 'string)
 (defcustom org-agenda-deadline-leaders '("Deadline:  " "In %3d d.: " "%2d d. ago: ")
   "Text preceding deadline items in the agenda view.
@@ -1894,7 +1895,7 @@ returns a face, or nil if does not want to specify a face and let
 the normal rules apply."
   :group 'org-agenda-line-format
   :version "24.1"
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defcustom org-agenda-category-icon-alist nil
   "Alist of category icon to be displayed in agenda views.
@@ -1976,7 +1977,7 @@ Note that for the purpose of tag filtering, only the lower-case version of
 all tags will be considered, so that this function will only ever see
 the lower-case version of all tags."
   :group 'org-agenda
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defcustom org-agenda-bulk-custom-functions nil
   "Alist of characters and custom functions for bulk actions.

+ 3 - 1

@@ -224,7 +224,9 @@
 For example setting to 'BIB_' would allow interoperability with fireforg."
   :group 'org-bibtex
   :version "24.1"
-  :type  'string)
+  :type  '(choice
+	   (const nil)
+	   (string)))
 (defcustom org-bibtex-treat-headline-as-title t
   "Treat headline text as title if title property is absent.

+ 2 - 1

@@ -159,7 +159,7 @@ state to switch it to."
 This is the string shown in the mode line when a clock is running.
 The function is called with point at the beginning of the headline."
   :group 'org-clock
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defcustom org-clock-string-limit 0
   "Maximum length of clock strings in the mode line.  0 means no limit."
@@ -263,6 +263,7 @@ The function or program will be called with the notification
 string as argument."
   :group 'org-clock
   :type '(choice
+	  (const nil)
 	  (string :tag "Program")
 	  (function :tag "Function")))

+ 1 - 0

@@ -166,6 +166,7 @@ The main values of this variable can be set with in-buffer options:
 #+STARTUP: nofnadjust"
   :group 'org-footnote
   :type '(choice
+	  (const :tag "No adjustment" nil)
 	  (const :tag "Renumber" renumber)
 	  (const :tag "Sort" sort)
 	  (const :tag "Renumber and Sort" t)))

+ 1 - 1

@@ -265,7 +265,7 @@ Here is an example:
 This is usually a single character string but can also be a
 string with two characters."
   :group 'org-protocol
-  :type 'string)
+  :type '(choice (const nil) (string)))
 (defcustom org-protocol-data-separator "/+\\|\\?"
   "The default data separator to use.

+ 16 - 7

@@ -1595,7 +1595,7 @@ two parameters: the first one is the link, the second one is the
 description generated by `org-insert-link'.  The function should
 return the description to use."
   :group 'org-link
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defgroup org-link-store nil
   "Options concerning storing links in Org-mode."
@@ -1684,7 +1684,7 @@ Org contains a function for this, so if you set this variable to
 `org-translate-link-from-planner', you should be able follow many
 links created by planner."
   :group 'org-link-follow
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defcustom org-follow-link-hook nil
   "Hook that is run after a link has been followed."
@@ -1766,6 +1766,11 @@ another window."
 		 (const vm-visit-folder)
 		 (const vm-visit-folder-other-window)
 		 (const vm-visit-folder-other-frame)))
+	  (cons (const vm-imap)
+		(choice
+		 (const vm-visit-imap-folder)
+		 (const vm-visit-imap-folder-other-window)
+		 (const vm-visit-imap-folder-other-frame)))
 	  (cons (const gnus)
 		 (const gnus)
@@ -2164,7 +2169,9 @@ should be continued.  For example, the function may decide that the entire
 subtree of the current entry should be excluded and move point to the end
 of the subtree."
   :group 'org-refile
-  :type 'function)
+  :type '(choice
+	  (const nil)
+	  (function)))
 (defcustom org-refile-use-cache nil
   "Non-nil means cache refile targets to speed up the process.
@@ -2807,7 +2814,9 @@ The user can set a different function here, which should take a string
 as an argument and return the numeric priority."
   :group 'org-priorities
   :version "24.1"
-  :type 'function)
+  :type '(choice
+	  (const nil)
+	  (function)))
 (defgroup org-time nil
   "Options concerning time stamps and deadlines in Org-mode."
@@ -3270,7 +3279,7 @@ automatically if necessary."
   :type '(choice
 	  (const :tag "Always" t)
 	  (const :tag "Never" nil)
-	  (const :tag "When selection characters are configured" 'auto)))
+	  (const :tag "When selection characters are configured" auto)))
 (defcustom org-fast-tag-selection-single-key nil
   "Non-nil means fast tag selection exits after first change.
@@ -3491,7 +3500,7 @@ value           The value that should be modified.
 The function should return the value that should be displayed,
 or nil if the normal value should be used."
   :group 'org-properties
-  :type 'function)
+  :type '(choice (const nil) (function)))
 (defcustom org-effort-property "Effort"
   "The property that is being used to keep track of effort estimates.
@@ -4491,7 +4500,7 @@ Otherwise, these types are allowed:
    inactive: only inactive timestamps (<...)
   scheduled: only scheduled timestamps
    deadline: only deadline timestamps"
-  :type '(choice (const :tag "Scheduled or deadline" 'scheduled-or-deadline)
+  :type '(choice (const :tag "Scheduled or deadline" scheduled-or-deadline)
 		 (const :tag "All timestamps" all)
 		 (const :tag "Only active timestamps" active)
 		 (const :tag "Only inactive timestamps" inactive)

+ 7 - 5

@@ -1078,7 +1078,7 @@ Setting :html-postamble in publishing projects will take
 precedence over this variable."
   :group 'org-export-html
   :type '(choice (const :tag "No postamble" nil)
-		 (const :tag "Auto postamble" 'auto)
+		 (const :tag "Auto postamble" auto)
 		 (const :tag "Default formatting string" t)
 		 (string :tag "Custom formatting string")
 		 (function :tag "Function (must return a string)")))
@@ -1108,8 +1108,9 @@ postamble itself.  This format string can contain these elements:
 If you need to use a \"%\" character, you need to escape it
 like that: \"%%\"."
   :group 'org-export-html
-  :type '(alist :key-type (string :tag "Language")
-		:value-type (string :tag "Format string")))
+  :type '(repeat
+	  (list (string :tag "Language")
+		(string :tag "Format string"))))
 (defcustom org-html-validation-link
   "<a href=\"\">Validate</a>"
@@ -1172,8 +1173,9 @@ like that: \"%%\".
 See the default value of `org-html-postamble-format' for an
   :group 'org-export-html
-  :type '(alist :key-type (string :tag "Language")
-		:value-type (string :tag "Format string")))
+  :type '(repeat
+	  (list (string :tag "Language")
+		(string :tag "Format string"))))
 (defcustom org-html-link-up ""
   "Where should the \"UP\" link of exported HTML pages lead?"

+ 2 - 1

@@ -454,7 +454,8 @@ The exporter embeds the exported content just before
 If unspecified, the file named \"OrgOdtContentTemplate.xml\"
 under `org-odt-styles-dir' is used."
-  :type 'file
+  :type '(choice (const nil)
+		 (file))
   :group 'org-export-odt
   :version "24.1")

+ 3 - 3

@@ -333,7 +333,7 @@ e.g. \"arch:nil\"."
   :group 'org-export-general
   :type '(choice
 	  (const :tag "Not at all" nil)
-	  (const :tag "Headline only" 'headline)
+	  (const :tag "Headline only" headline)
 	  (const :tag "Entirely" t)))
 (defcustom org-export-with-author t
@@ -797,8 +797,8 @@ HTML code while every other back-end will ignore it."
 This variable can be either set to `buffer' or `subtree'."
   :group 'org-export-general
   :type '(choice
-	  (const :tag "Export current buffer" 'buffer)
-	  (const :tag "Export current subtree" 'subtree)))
+	  (const :tag "Export current buffer" buffer)
+	  (const :tag "Export current subtree" subtree)))
 (defcustom org-export-show-temporary-export-buffer t
   "Non-nil means show buffer after exporting to temp buffer.