diff options
author | Glenn Morris <rgm@gnu.org> | 2014-06-25 23:55:15 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-06-25 23:55:15 -0700 |
commit | 9ac6d28ab8c29547d9f9365dc8f7cea13c32ef7a (patch) | |
tree | 026dc1d5a858b27086c4f9d8e0f4a60b7907eb80 /lisp/calendar | |
parent | a0e2175a9055f2ea8ae03744d495e5179885029d (diff) | |
parent | 436550da1bf8d2cdd92a60f6ce84f131a8045062 (diff) | |
download | emacs-9ac6d28ab8c29547d9f9365dc8f7cea13c32ef7a.tar.gz |
Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org
Diffstat (limited to 'lisp/calendar')
-rw-r--r-- | lisp/calendar/todo-mode.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index ab2ab3e4cb8..1a54cc2c67b 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -1962,13 +1962,12 @@ their associated keys and their effects." ;; 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 @@ meaning to raise or lower the item's priority by one." (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) |