aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2014-07-22 23:32:04 +0200
committerStephen Berman2014-07-22 23:32:04 +0200
commit37a21453db134292b99291226d541df838e7d711 (patch)
treea4a2a5aa29cbe9730147a977d3e9ad28961fab67
parentad4c5263f5d597ff181d85ecef01b4af29c16cda (diff)
downloademacs-37a21453db134292b99291226d541df838e7d711.tar.gz
emacs-37a21453db134292b99291226d541df838e7d711.zip
* calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
of file-wide setting when changing category-wide setting.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/todo-mode.el15
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7c19f7fb665..02189365b4f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-07-22 Stephen Berman <stephen.berman@gmx.net>
2
3 * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
4 of file-wide setting when changing category-wide setting.
5
12014-07-21 Glenn Morris <rgm@gnu.org> 62014-07-21 Glenn Morris <rgm@gnu.org>
2 7
3 * progmodes/hideif.el (hide-ifdef-mode-submap): 8 * progmodes/hideif.el (hide-ifdef-mode-submap):
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index d8bca81ed9b..e5f486a2056 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -4283,24 +4283,25 @@ set the user customizable option `todo-top-priorities-overrides'."
4283 (frule (assoc-string file rules)) 4283 (frule (assoc-string file rules))
4284 (crules (nth 2 frule)) 4284 (crules (nth 2 frule))
4285 (crule (assoc-string cat crules)) 4285 (crule (assoc-string cat crules))
4286 (cur (or (and arg (cdr crule)) 4286 (fcur (or (nth 1 frule)
4287 (nth 1 frule) 4287 todo-top-priorities))
4288 todo-top-priorities)) 4288 (ccur (or (and arg (cdr crule))
4289 fcur))
4289 (prompt (if arg (concat "Number of top priorities in this category" 4290 (prompt (if arg (concat "Number of top priorities in this category"
4290 " (currently %d): ") 4291 " (currently %d): ")
4291 (concat "Default number of top priorities per category" 4292 (concat "Default number of top priorities per category"
4292 " in this file (currently %d): "))) 4293 " in this file (currently %d): ")))
4293 (new -1)) 4294 (new -1))
4294 (while (< new 0) 4295 (while (< new 0)
4295 (let ((cur0 cur)) 4296 (let ((cur (if arg ccur fcur)))
4296 (setq new (read-number (format prompt cur0)) 4297 (setq new (read-number (format prompt cur))
4297 prompt "Enter a non-negative number: " 4298 prompt "Enter a non-negative number: "
4298 cur0 nil))) 4299 cur nil)))
4299 (let ((nrule (if arg 4300 (let ((nrule (if arg
4300 (append (delete crule crules) (list (cons cat new))) 4301 (append (delete crule crules) (list (cons cat new)))
4301 (append (list file new) (list crules))))) 4302 (append (list file new) (list crules)))))
4302 (setq rules (cons (if arg 4303 (setq rules (cons (if arg
4303 (list file cur nrule) 4304 (list file fcur nrule)
4304 nrule) 4305 nrule)
4305 (delete frule rules))) 4306 (delete frule rules)))
4306 (customize-save-variable 'todo-top-priorities-overrides rules) 4307 (customize-save-variable 'todo-top-priorities-overrides rules)