diff options
| author | Paul Eggert | 2016-05-05 23:11:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-05 23:11:11 -0700 |
| commit | 89ce83b20249dfb4e45f09dfdddf4c4b66d82968 (patch) | |
| tree | 3d75245a5514df2ad7b17ae6d56727b9629846a9 /lisp/calendar | |
| parent | d546ed13b04521308ef7ec8e7e5b68e03f1bbb38 (diff) | |
| parent | 50650cb6887d99b01eeb1e686fc1f695c2a0c64a (diff) | |
| download | emacs-89ce83b20249dfb4e45f09dfdddf4c4b66d82968.tar.gz emacs-89ce83b20249dfb4e45f09dfdddf4c4b66d82968.zip | |
Merge from origin/emacs-25
50650cb Doc fixes for fclist and grep
5e814e0 Minor doc fixes for quoting
3347a73 `nreverse' the marker pairs list
1a4127d Use save-excursion in xref-location-marker more
ab3ba91 shell-quote-argument DIR when appropriate
922c7a3 Rework xref-query-replace-in-results
3fe3510 * lisp/replace.el (query-replace-read-from): Use minibuffer-w...
0932b94 Fix todo-mode bug involving archived items (bug#23447)
e68ad1f ; * etc/NEWS: Tiny edit. (Bug#23432)
adc80b7 ; * test/automated/xref-tests.el: Add copyright and license.
4d8fd9c Handle "empty line" regexp in xref searches
f559b37 Add tests for xref-collect-matches
6428aa0 Use grep-find-ignored-directories instead of vc-directory-exc...
6f82d8e Clear buffer-undo-list when showing xrefs
c68a091 Note the quote translation in `message' in section "incompati...
52f86a7 * etc/NEWS: Mention (message "%s" (format ...)).
93703c5 (Common Keywords): Correct what missing :group means
79e5800 Improve documentation of Dired's 'A' and 'Q' commands
2ea2a2f Doc fixes for quoting
8544b98 posnp doc clarification
805204f Mention what a missing :group does
ec554d7 Fix documentation of dired-aux search/replace commands
Diffstat (limited to 'lisp/calendar')
| -rw-r--r-- | lisp/calendar/todo-mode.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 0529e970333..8e752586053 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el | |||
| @@ -902,17 +902,19 @@ Categories mode." | |||
| 902 | (todo-show) | 902 | (todo-show) |
| 903 | (let* ((archive (eq where 'archive)) | 903 | (let* ((archive (eq where 'archive)) |
| 904 | (cat (unless archive where)) | 904 | (cat (unless archive where)) |
| 905 | (goto-archive (and cat | ||
| 906 | todo-skip-archived-categories | ||
| 907 | (zerop (todo-get-count 'todo cat)) | ||
| 908 | (zerop (todo-get-count 'done cat)) | ||
| 909 | (not (zerop (todo-get-count 'archived cat))))) | ||
| 905 | (file0 (when cat ; We're in Todo Categories mode. | 910 | (file0 (when cat ; We're in Todo Categories mode. |
| 906 | ;; With non-nil `todo-skip-archived-categories' | 911 | (if goto-archive |
| 907 | ;; jump to archive file of a category with only | 912 | ;; If the category has only archived items and |
| 908 | ;; archived items. | 913 | ;; `todo-skip-archived-categories' is non-nil, jump to |
| 909 | (if (and todo-skip-archived-categories | 914 | ;; the archive category. |
| 910 | (zerop (todo-get-count 'todo cat)) | ||
| 911 | (zerop (todo-get-count 'done cat)) | ||
| 912 | (not (zerop (todo-get-count 'archived cat)))) | ||
| 913 | (concat (file-name-sans-extension | 915 | (concat (file-name-sans-extension |
| 914 | todo-current-todo-file) ".toda") | 916 | todo-current-todo-file) ".toda") |
| 915 | ;; Otherwise, jump to current todo file. | 917 | ;; Otherwise, jump to the category in the todo file. |
| 916 | todo-current-todo-file))) | 918 | todo-current-todo-file))) |
| 917 | (len (length todo-categories)) | 919 | (len (length todo-categories)) |
| 918 | (cat+file (unless cat | 920 | (cat+file (unless cat |
| @@ -923,18 +925,15 @@ Categories mode." | |||
| 923 | (category (or cat (car cat+file)))) | 925 | (category (or cat (car cat+file)))) |
| 924 | (unless cat (setq file0 (cdr cat+file))) | 926 | (unless cat (setq file0 (cdr cat+file))) |
| 925 | (with-current-buffer (find-file-noselect file0 'nowarn) | 927 | (with-current-buffer (find-file-noselect file0 'nowarn) |
| 926 | (setq todo-current-todo-file file0) | 928 | (when goto-archive (todo-archive-mode)) |
| 927 | ;; If called from Todo Categories mode, clean up before jumping. | 929 | (set-window-buffer (selected-window) |
| 928 | (if (string= (buffer-name) todo-categories-buffer) | 930 | (set-buffer (find-buffer-visiting file0))) |
| 929 | (kill-buffer)) | 931 | (unless todo-global-current-todo-file |
| 930 | (set-window-buffer (selected-window) | 932 | (setq todo-global-current-todo-file todo-current-todo-file)) |
| 931 | (set-buffer (find-buffer-visiting file0))) | 933 | (todo-category-number category) |
| 932 | (unless todo-global-current-todo-file | 934 | (todo-category-select) |
| 933 | (setq todo-global-current-todo-file todo-current-todo-file)) | 935 | (goto-char (point-min)) |
| 934 | (todo-category-number category) | 936 | (when add-item (todo-insert-item--basic)))))) |
| 935 | (todo-category-select) | ||
| 936 | (goto-char (point-min)) | ||
| 937 | (when add-item (todo-insert-item--basic)))))) | ||
| 938 | 937 | ||
| 939 | (defun todo-next-item (&optional count) | 938 | (defun todo-next-item (&optional count) |
| 940 | "Move point down to the beginning of the next item. | 939 | "Move point down to the beginning of the next item. |