diff options
| author | Stephen Berman | 2013-03-14 00:58:32 +0100 |
|---|---|---|
| committer | Stephen Berman | 2013-03-14 00:58:32 +0100 |
| commit | 426e1d46edc21c944e82d92e8dce6f9a5e55cd11 (patch) | |
| tree | fda8a28636252724283f8c853ea8bec8903719d2 | |
| parent | c898b975737e7bc9cd14ea40cb5e307cd2c10a53 (diff) | |
| download | emacs-426e1d46edc21c944e82d92e8dce6f9a5e55cd11.tar.gz emacs-426e1d46edc21c944e82d92e8dce6f9a5e55cd11.zip | |
* calendar/todos.el (todos-quit): If quitting
todos-filtered-items-mode makes todos-mode current, don't call
todos-show, which (here wrongly) prompts for a new Todos file.
(todos-delete-category): Fix incorrect quotation mark.
(todos-set-item-priority): Make prefix argument a no-op with
commands for raising or lowering item priority. Move mistakenly
place right paren to end of defun, where it belongs.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/calendar/todos.el | 22 |
2 files changed, 23 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 446557b3442..a9412b3e6ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-03-13 Stephen Berman <stephen.berman@gmx.net> | ||
| 2 | |||
| 3 | * calendar/todos.el (todos-quit): If quitting | ||
| 4 | todos-filtered-items-mode makes todos-mode current, don't call | ||
| 5 | todos-show, which (here wrongly) prompts for a new Todos file. | ||
| 6 | (todos-delete-category): Fix incorrect quotation mark. | ||
| 7 | (todos-set-item-priority): Make prefix argument a no-op with | ||
| 8 | commands for raising or lowering item priority. Move mistakenly | ||
| 9 | place right paren to end of defun, where it belongs. | ||
| 10 | |||
| 1 | 2013-02-25 Stephen Berman <stephen.berman@gmx.net> | 11 | 2013-02-25 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 12 | ||
| 3 | * calendar/todos.el (todos-key-bindings): Add binding for `todos-show'. | 13 | * calendar/todos.el (todos-key-bindings): Add binding for `todos-show'. |
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 4dbb1e3f50b..fc43c8f3faa 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el | |||
| @@ -532,6 +532,8 @@ items in that category, which overrides NUM." | |||
| 532 | :type 'sexp | 532 | :type 'sexp |
| 533 | :group 'todos-filtered) | 533 | :group 'todos-filtered) |
| 534 | 534 | ||
| 535 | ;; FIXME: rename to todos-top-priorities AFTER renaming command | ||
| 536 | ;; todos-top-priorities to todos-filter-top-priorities | ||
| 535 | (defcustom todos-show-priorities 1 | 537 | (defcustom todos-show-priorities 1 |
| 536 | "Default number of top priorities shown by `todos-top-priorities'." | 538 | "Default number of top priorities shown by `todos-top-priorities'." |
| 537 | :type 'integer | 539 | :type 'integer |
| @@ -611,7 +613,7 @@ categories display according to priority." | |||
| 611 | :group 'todos-categories) | 613 | :group 'todos-categories) |
| 612 | 614 | ||
| 613 | ;; --------------------------------------------------------------------------- | 615 | ;; --------------------------------------------------------------------------- |
| 614 | ;;; Faces and font-lock matcher functions | 616 | ;;; Faces and font locking |
| 615 | 617 | ||
| 616 | (defgroup todos-faces nil | 618 | (defgroup todos-faces nil |
| 617 | "Faces for the Todos modes." | 619 | "Faces for the Todos modes." |
| @@ -2867,17 +2869,19 @@ which is the value of the user option | |||
| 2867 | (defvar todos-categories-mode-map | 2869 | (defvar todos-categories-mode-map |
| 2868 | (let ((map (make-sparse-keymap))) | 2870 | (let ((map (make-sparse-keymap))) |
| 2869 | (suppress-keymap map t) | 2871 | (suppress-keymap map t) |
| 2872 | ;; (define-key map "c" 'todos-display-categories-numberically-or-alphabetically) | ||
| 2870 | (define-key map "c" 'todos-display-categories-alphabetically-or-by-priority) | 2873 | (define-key map "c" 'todos-display-categories-alphabetically-or-by-priority) |
| 2871 | (define-key map "t" 'todos-display-categories-sorted-by-todo) | 2874 | (define-key map "t" 'todos-display-categories-sorted-by-todo) |
| 2872 | (define-key map "y" 'todos-display-categories-sorted-by-diary) | 2875 | (define-key map "y" 'todos-display-categories-sorted-by-diary) |
| 2873 | (define-key map "d" 'todos-display-categories-sorted-by-done) | 2876 | (define-key map "d" 'todos-display-categories-sorted-by-done) |
| 2874 | (define-key map "a" 'todos-display-categories-sorted-by-archived) | 2877 | (define-key map "a" 'todos-display-categories-sorted-by-archived) |
| 2878 | (define-key map "#" 'todos-set-category-priority) | ||
| 2875 | (define-key map "l" 'todos-lower-category-priority) | 2879 | (define-key map "l" 'todos-lower-category-priority) |
| 2876 | (define-key map "+" 'todos-lower-category-priority) | 2880 | (define-key map "+" 'todos-lower-category-priority) |
| 2877 | (define-key map "r" 'todos-raise-category-priority) | 2881 | (define-key map "r" 'todos-raise-category-priority) |
| 2878 | (define-key map "-" 'todos-raise-category-priority) | 2882 | (define-key map "-" 'todos-raise-category-priority) |
| 2879 | (define-key map "n" 'todos-forward-button) | 2883 | (define-key map "n" 'todos-forward-button) ; todos-next-button |
| 2880 | (define-key map "p" 'todos-backward-button) | 2884 | (define-key map "p" 'todos-backward-button) ; todos-previous-button |
| 2881 | (define-key map [tab] 'todos-forward-button) | 2885 | (define-key map [tab] 'todos-forward-button) |
| 2882 | (define-key map [backtab] 'todos-backward-button) | 2886 | (define-key map [backtab] 'todos-backward-button) |
| 2883 | (define-key map "q" 'todos-quit) | 2887 | (define-key map "q" 'todos-quit) |
| @@ -3252,7 +3256,7 @@ buries it and restores state as needed." | |||
| 3252 | (kill-buffer buf))) | 3256 | (kill-buffer buf))) |
| 3253 | ((eq major-mode 'todos-filtered-items-mode) | 3257 | ((eq major-mode 'todos-filtered-items-mode) |
| 3254 | (kill-buffer) | 3258 | (kill-buffer) |
| 3255 | (todos-show)) | 3259 | (unless (eq major-mode 'todos-mode) (todos-show))) |
| 3256 | ((member major-mode (list 'todos-mode 'todos-archive-mode)) | 3260 | ((member major-mode (list 'todos-mode 'todos-archive-mode)) |
| 3257 | ;; Have to write previously nonexistant archives to file, and might | 3261 | ;; Have to write previously nonexistant archives to file, and might |
| 3258 | ;; as well save Todos file also. | 3262 | ;; as well save Todos file also. |
| @@ -4119,7 +4123,7 @@ i.e. including all existing todo and done items." | |||
| 4119 | "the archived category will remain\n" | 4123 | "the archived category will remain\n" |
| 4120 | "after deleting the todo category. " | 4124 | "after deleting the todo category. " |
| 4121 | "Do you still want to delete it\n" | 4125 | "Do you still want to delete it\n" |
| 4122 | "(see 'todos-skip-archived-categories' " | 4126 | "(see `todos-skip-archived-categories' " |
| 4123 | "for another option)? "))) | 4127 | "for another option)? "))) |
| 4124 | (t | 4128 | (t |
| 4125 | (y-or-n-p (concat "Permanently remove category \"" cat | 4129 | (y-or-n-p (concat "Permanently remove category \"" cat |
| @@ -5296,7 +5300,7 @@ meaning to raise or lower the item's priority by one." | |||
| 5296 | (todos-get-count 'todo cat)))) | 5300 | (todos-get-count 'todo cat)))) |
| 5297 | (maxnum (if new (1+ todo) todo)) | 5301 | (maxnum (if new (1+ todo) todo)) |
| 5298 | (prompt (format "Set item priority (1-%d): " maxnum)) | 5302 | (prompt (format "Set item priority (1-%d): " maxnum)) |
| 5299 | (priority (cond ((numberp current-prefix-arg) | 5303 | (priority (cond ((and (not arg) (numberp current-prefix-arg)) |
| 5300 | current-prefix-arg) | 5304 | current-prefix-arg) |
| 5301 | ((and (eq arg 'raise) (>= curnum 1)) | 5305 | ((and (eq arg 'raise) (>= curnum 1)) |
| 5302 | (1- curnum)) | 5306 | (1- curnum)) |
| @@ -5318,7 +5322,7 @@ meaning to raise or lower the item's priority by one." | |||
| 5318 | (goto-char (point-min)) | 5322 | (goto-char (point-min)) |
| 5319 | (setq done (re-search-forward todos-done-string-start nil t)))) | 5323 | (setq done (re-search-forward todos-done-string-start nil t)))) |
| 5320 | (let ((todos-show-with-done done)) | 5324 | (let ((todos-show-with-done done)) |
| 5321 | (todos-category-select))))) | 5325 | (todos-category-select)))) |
| 5322 | ;; Prompt for priority only when the category has at least one todo item. | 5326 | ;; Prompt for priority only when the category has at least one todo item. |
| 5323 | (when (> maxnum 1) | 5327 | (when (> maxnum 1) |
| 5324 | (while (not priority) | 5328 | (while (not priority) |
| @@ -5371,7 +5375,7 @@ meaning to raise or lower the item's priority by one." | |||
| 5371 | (and marked | 5375 | (and marked |
| 5372 | (let* ((ov (todos-get-overlay 'prefix)) | 5376 | (let* ((ov (todos-get-overlay 'prefix)) |
| 5373 | (pref (overlay-get ov 'before-string))) | 5377 | (pref (overlay-get ov 'before-string))) |
| 5374 | (overlay-put ov 'before-string (concat todos-item-mark pref))))))) | 5378 | (overlay-put ov 'before-string (concat todos-item-mark pref)))))))) |
| 5375 | 5379 | ||
| 5376 | (defun todos-raise-item-priority () | 5380 | (defun todos-raise-item-priority () |
| 5377 | "Raise priority of current item by moving it up by one item." | 5381 | "Raise priority of current item by moving it up by one item." |
| @@ -5641,7 +5645,7 @@ With prefix ARG delete an existing comment." | |||
| 5641 | (defun todos-item-undo () | 5645 | (defun todos-item-undo () |
| 5642 | "Restore this done item to the todo section of this category. | 5646 | "Restore this done item to the todo section of this category. |
| 5643 | If done item has a comment, ask whether to omit the comment from | 5647 | If done item has a comment, ask whether to omit the comment from |
| 5644 | the restored item." | 5648 | the restored item." ;FIXME: marked done items |
| 5645 | (interactive) | 5649 | (interactive) |
| 5646 | (let* ((cat (todos-current-category)) | 5650 | (let* ((cat (todos-current-category)) |
| 5647 | (marked (assoc cat todos-categories-with-marks))) | 5651 | (marked (assoc cat todos-categories-with-marks))) |