emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117295: * calendar/todo-mode.el: Fix two bugs.


From: Stephen Berman
Subject: [Emacs-diffs] emacs-24 r117295: * calendar/todo-mode.el: Fix two bugs.
Date: Wed, 25 Jun 2014 12:06:28 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117295
revision-id: address@hidden
parent: address@hidden
committer: Stephen Berman <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-06-25 14:06:00 +0200
message:
  * calendar/todo-mode.el: Fix two bugs.
  (todo-insert-item--basic): If user cancels item insertion to
  another category before setting priority, show original category
  whether it is in the same or a different file.
  (todo-set-item-priority): After selecting category, instead of
  moving point to top, which extends an active region, restore it.
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-06-25 00:48:10 +0000
+++ b/lisp/ChangeLog    2014-06-25 12:06:00 +0000
@@ -1,3 +1,12 @@
+2014-06-25  Stephen Berman  <address@hidden>
+
+       * calendar/todo-mode.el: Fix two bugs.
+       (todo-insert-item--basic): If user cancels item insertion to
+       another category before setting priority, show original category
+       whether it is in the same or a different file.
+       (todo-set-item-priority): After selecting category, instead of
+       moving point to top, which extends an active region, restore it.
+
 2014-06-25  Stefan Monnier  <address@hidden>
 
        * help-fns.el (describe-function-1): Check file-name is a string before

=== modified file 'lisp/calendar/todo-mode.el'
--- a/lisp/calendar/todo-mode.el        2014-05-23 16:54:35 +0000
+++ b/lisp/calendar/todo-mode.el        2014-06-25 12:06:00 +0000
@@ -1962,13 +1962,12 @@
            ;; If user cancels before setting priority, restore
            ;; display.
            (unless item-added
-             (if ocat
-                 (progn
-                   (unless (equal cat ocat)
-                     (todo-category-number ocat)
-                     (todo-category-select))
-                   (and done-only (todo-toggle-view-done-only)))
-               (set-window-buffer (selected-window) (set-buffer obuf)))
+             (set-window-buffer (selected-window) (set-buffer obuf))
+             (when ocat
+               (unless (equal cat ocat)
+                 (todo-category-number ocat)
+                 (todo-category-select))
+               (and done-only (todo-toggle-view-done-only)))
              (goto-char opoint))
            ;; If the todo items section is not visible when the
            ;; insertion command is called (either because only done
@@ -2553,9 +2552,9 @@
                (goto-char (point-min))
                (setq done (re-search-forward todo-done-string-start nil t))))
            (let ((todo-show-with-done done))
-             (todo-category-select)
-             ;; Keep top of category in view while setting priority.
-             (goto-char (point-min)))))
+             ;; Keep current item or top of moved to category in view
+             ;; while setting priority.
+             (save-excursion (todo-category-select)))))
        ;; Prompt for priority only when the category has at least one
        ;; todo item.
        (when (> maxnum 1)


reply via email to

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