mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-14 11:42:29 -08:00
todo-mode.el: Handle calling todo-mode interactively.
Fixes: debbugs:19112 * calendar/todo-mode.el (todo-mode): If called interactively, just display a message saying to call todo-show to enter Todo mode.
This commit is contained in:
parent
d9ad26a6df
commit
ebf026bdd0
2 changed files with 24 additions and 17 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2014-11-26 Stephen Berman <stephen.berman@gmx.net>
|
||||
|
||||
* calendar/todo-mode.el (todo-mode): If called interactively, just
|
||||
display a message saying to call todo-show to enter Todo mode
|
||||
(Bug#19112).
|
||||
|
||||
2014-11-24 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* vc/vc-hg.el (vc-hg-dir-status-files): Include ignored files.
|
||||
|
|
|
|||
|
|
@ -6573,23 +6573,24 @@ Added to `window-configuration-change-hook' in Todo mode."
|
|||
"Major mode for displaying, navigating and editing todo lists.
|
||||
|
||||
\\{todo-mode-map}"
|
||||
;; (easy-menu-add todo-menu)
|
||||
(todo-modes-set-1)
|
||||
(todo-modes-set-2)
|
||||
(todo-modes-set-3)
|
||||
;; Initialize todo-current-todo-file.
|
||||
(when (member (file-truename (buffer-file-name))
|
||||
(funcall todo-files-function))
|
||||
(setq-local todo-current-todo-file (file-truename (buffer-file-name))))
|
||||
(setq-local todo-show-done-only nil)
|
||||
(setq-local todo-categories-with-marks nil)
|
||||
;; (add-hook 'find-file-hook 'todo-add-to-buffer-list nil t)
|
||||
(add-hook 'post-command-hook 'todo-update-buffer-list nil t)
|
||||
(when todo-show-current-file
|
||||
(add-hook 'pre-command-hook 'todo-show-current-file nil t))
|
||||
(add-hook 'window-configuration-change-hook
|
||||
'todo-reset-and-enable-done-separator nil t)
|
||||
(add-hook 'kill-buffer-hook 'todo-reset-global-current-todo-file nil t))
|
||||
(if (called-interactively-p 'any)
|
||||
(message "Type `M-x todo-show' to enter Todo mode")
|
||||
(todo-modes-set-1)
|
||||
(todo-modes-set-2)
|
||||
(todo-modes-set-3)
|
||||
;; Initialize todo-current-todo-file.
|
||||
(when (member (file-truename (buffer-file-name))
|
||||
(funcall todo-files-function))
|
||||
(setq-local todo-current-todo-file (file-truename (buffer-file-name))))
|
||||
(setq-local todo-show-done-only nil)
|
||||
(setq-local todo-categories-with-marks nil)
|
||||
;; (add-hook 'find-file-hook 'todo-add-to-buffer-list nil t)
|
||||
(add-hook 'post-command-hook 'todo-update-buffer-list nil t)
|
||||
(when todo-show-current-file
|
||||
(add-hook 'pre-command-hook 'todo-show-current-file nil t))
|
||||
(add-hook 'window-configuration-change-hook
|
||||
'todo-reset-and-enable-done-separator nil t)
|
||||
(add-hook 'kill-buffer-hook 'todo-reset-global-current-todo-file nil t)))
|
||||
|
||||
(put 'todo-archive-mode 'mode-class 'special)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue