浏览代码

Add custom vars for override auto-update

These currently have no effect, since no code has been written to handle
them.
Ryan C. Thompson 9 年之前
父节点
当前提交
667544e309
共有 1 个文件被更改,包括 45 次插入0 次删除
  1. 45 0
      ido-ubiquitous.el

+ 45 - 0
ido-ubiquitous.el

@@ -778,6 +778,51 @@ advice has any effect."
 
 ;;; Overrides
 
+(defcustom ido-ubiquitous-auto-update-overrides t
+  "Whether to add new overrides when updating ido-ubiquitous.
+
+Ido-ubiquitous comes with a default set of overrides for commands
+that are known to require them. New versions of ido-ubiquitous
+may come with updates to the default overrides as more commands
+are discovered to require them. However, customizing your own
+overrides would normally prevent you from receiving these
+updates, since Emacs will not overwrite your customizations.
+
+To resolve this problem, you can set this variable to `t', and
+then ido-ubiquitous can automatically add any new built-in
+overrides whenever it is updated. (Actually, the update will
+happen the next time Emacs is restarted after the update.) This
+allows you to add your own overrides but still receive updates to
+the default set. The default overrides will always be added with
+lower precedence than user-added ones.
+
+If you want ido-ubiquitous to just notify you about new default
+overrides instead of adding them itself, set this variable to
+`notify'. If you don't want this auto-update behavior at all, set
+it to `nil'.
+
+(Note that having this option enabled effectively prevents you
+from removing any of the built-in default overrides, since they
+will simply be re-added the next time Emacs starts.)"
+  :type '(choice :tag "When new overrides are available:"
+                 (const :menu-tag "Auto-add"
+                        :tag "Add them automatically"
+                        t)
+                 (const :menu-tag "Notify"
+                        :tag "Notify the user about them"
+                        notify)
+                 (const :menu-tag "Ignore"
+                        :tag "Ignore them"
+                        nil))
+  :group 'ido-ubiquitous)
+
+(defcustom ido-ubiquitous-prompt-to-report-custom-overrides t
+  "If non-nil, remind the user to report any overrides they add.
+
+TODO doc"
+  :type 'boolean
+  :group 'ido-ubiquitous)
+
 (defun ido-ubiquitous-restore-default-overrides (&optional save)
   "Re-add the default overrides for ido-ubiquitous.