emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117398: * calendar/todo-mode.el (todo-set-top-pr


From: Stephen Berman
Subject: [Emacs-diffs] emacs-24 r117398: * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
Date: Tue, 22 Jul 2014 21:32:12 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117398
revision-id: address@hidden
parent: address@hidden
committer: Stephen Berman <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-07-22 23:32:04 +0200
message:
  * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
  of file-wide setting when changing category-wide setting.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/calendar/todo-mode.el     todos.el-20120911155047-0ytqo2nidwqquefa-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-07-21 14:41:19 +0000
+++ b/lisp/ChangeLog    2014-07-22 21:32:04 +0000
@@ -1,3 +1,8 @@
+2014-07-22  Stephen Berman  <address@hidden>
+
+       * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
+       of file-wide setting when changing category-wide setting.
+
 2014-07-21  Glenn Morris  <address@hidden>
 
        * progmodes/hideif.el (hide-ifdef-mode-submap):

=== modified file 'lisp/calendar/todo-mode.el'
--- a/lisp/calendar/todo-mode.el        2014-07-06 20:28:38 +0000
+++ b/lisp/calendar/todo-mode.el        2014-07-22 21:32:04 +0000
@@ -4283,24 +4283,25 @@
         (frule (assoc-string file rules))
         (crules (nth 2 frule))
         (crule (assoc-string cat crules))
-        (cur (or (and arg (cdr crule))
-                 (nth 1 frule)
-                 todo-top-priorities))
+        (fcur (or (nth 1 frule)
+                  todo-top-priorities))
+        (ccur (or (and arg (cdr crule))
+                  fcur))
         (prompt (if arg (concat "Number of top priorities in this category"
                                 " (currently %d): ")
                   (concat "Default number of top priorities per category"
                                 " in this file (currently %d): ")))
         (new -1))
     (while (< new 0)
-      (let ((cur0 cur))
-       (setq new (read-number (format prompt cur0))
+      (let ((cur (if arg ccur fcur)))
+       (setq new (read-number (format prompt cur))
              prompt "Enter a non-negative number: "
-             cur0 nil)))
+             cur nil)))
     (let ((nrule (if arg
                     (append (delete crule crules) (list (cons cat new)))
                   (append (list file new) (list crules)))))
       (setq rules (cons (if arg
-                           (list file cur nrule)
+                           (list file fcur nrule)
                          nrule)
                        (delete frule rules)))
       (customize-save-variable 'todo-top-priorities-overrides rules)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]