Просмотр исходного кода

Default to only notifying about updates overrides

The new default for "ido-ubiquitous-auto-update-overrides" is "notify",
which will display a message using "display-warning" whenever updates
are available. This warning will happen on every startup until the user
customizes "ido-ubiquitous-auto-update-overrides" to t or nil, but now
the default will not modify the configuration.

this also more or less reverts the previous commit, since it is made
obsolete by this one.
Ryan C. Thompson 10 лет назад
Родитель
Сommit
ec41a9739e
2 измененных файлов с 11 добавлено и 9 удалено
  1. 8 0
      ChangeLog
  2. 3 9
      ido-ubiquitous.el

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2016-01-29  Ryan C. Thompson  <rct@thompsonclan.org>
+
+	* ido-ubiquitous.el (ido-ubiquitous--maybe-update-overrides):
+	Change default auto-update setting to notify. If the user has
+	customized overrides and new ones are added upstream, it will nag
+	them until they choose to explicitly enable or disable
+	auto-updating.
+
 2016-01-16  Rasmus <rasmus@gmx.us>
 2016-01-16  Rasmus <rasmus@gmx.us>
 
 
 	* ido-ubiquitous.el (ido-ubiquitous-update-overrides): Remove
 	* ido-ubiquitous.el (ido-ubiquitous-update-overrides): Remove

+ 3 - 9
ido-ubiquitous.el

@@ -509,7 +509,7 @@ each function to apply the appropriate override."
            finally return
            finally return
            (set-default sym final-value)))
            (set-default sym final-value)))
 
 
-(defcustom ido-ubiquitous-auto-update-overrides t
+(defcustom ido-ubiquitous-auto-update-overrides 'notify
   "Whether to add new overrides when updating ido-ubiquitous.
   "Whether to add new overrides when updating ido-ubiquitous.
 
 
 Ido-ubiquitous comes with a default set of overrides for commands
 Ido-ubiquitous comes with a default set of overrides for commands
@@ -960,16 +960,10 @@ See `ido-ubiquitous-auto-update-overrides."
             (if (eq ido-ubiquitous-auto-update-overrides 'notify)
             (if (eq ido-ubiquitous-auto-update-overrides 'notify)
                 (display-warning
                 (display-warning
                  'ido-ubiquitous
                  'ido-ubiquitous
-                 (format "There are %s new overrides available. Use `M-x ido-ubiquitous-update-overrides' to enable them."
+                 (format "There are %s new overrides available. Use `M-x ido-ubiquitous-update-overrides' to enable them. (See `ido-ubiquitous-auto-update-overrides' for more information.)"
                          update-count))
                          update-count))
               (ido-ubiquitous--debug-message "Applying override updates.")
               (ido-ubiquitous--debug-message "Applying override updates.")
-              (let (updated-vars
-                    (ido-ubiquitous-update-overrides t))
-                (when updated-vars
-                  (display-warning
-                   'ido-ubiquitous
-                   "If you want to disable automatic updating of overrides, customize `ido-ubiquitous-auto-update-overrides'."
-                   :warning))))
+              (ido-ubiquitous-update-overrides t))
           (ido-ubiquitous--debug-message "No override updates availble.")))
           (ido-ubiquitous--debug-message "No override updates availble.")))
     (ido-ubiquitous--debug-message "Skipping override updates by user preference.")))
     (ido-ubiquitous--debug-message "Skipping override updates by user preference.")))