[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 ebf026b: todo-mode.el: Handle calling todo-mode i
From: |
Stephen Berman |
Subject: |
[Emacs-diffs] emacs-24 ebf026b: todo-mode.el: Handle calling todo-mode interactively. |
Date: |
Wed, 26 Nov 2014 22:01:13 +0000 |
branch: emacs-24
commit ebf026bdd0afb368a8d5f89f29ef792ea21560e5
Author: Stephen Berman <address@hidden>
Date: Wed Nov 26 23:00:42 2014 +0100
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.
---
lisp/ChangeLog | 6 ++++++
lisp/calendar/todo-mode.el | 35 ++++++++++++++++++-----------------
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 351472d..0741bfd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-26 Stephen Berman <address@hidden>
+
+ * 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 <address@hidden>
* vc/vc-hg.el (vc-hg-dir-status-files): Include ignored files.
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index ab12ebc..ed7c607 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 ebf026b: todo-mode.el: Handle calling todo-mode interactively.,
Stephen Berman <=