From 1171e4321c9b3a32793934eb83f8c3dc88378dae Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Sat, 27 Apr 2013 15:28:18 +0200 Subject: [PATCH] * todos.el (todos-edit-multiline-item): Make a no-op when point is not on an item. --- lisp/calendar/ChangeLog | 5 +++++ lisp/calendar/todos.el | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index e3d3b45f5a9..2619ef72a54 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog @@ -1,3 +1,8 @@ +2013-04-27 Stephen Berman + + * todos.el (todos-edit-multiline-item): Make a no-op when point is + not on an item. + 2013-04-24 Stephen Berman * todos.el (todos-check-format): Add check of well-formedness of diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 9e1e4904d9c..24a39cf136d 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -4909,14 +4909,15 @@ minibuffer; otherwise, edit it in Todos Edit mode." Use of newlines invokes `todos-indent' to insure compliance with the format of Diary entries." (interactive) - (let ((buf todos-edit-buffer)) - (set-window-buffer (selected-window) - (set-buffer (make-indirect-buffer (buffer-name) buf))) - (narrow-to-region (todos-item-start) (todos-item-end)) - (todos-edit-mode) - (message "%s" (substitute-command-keys - (concat "Type \\[todos-edit-quit] " - "to return to Todos mode.\n"))))) + (when (todos-item-string) + (let ((buf todos-edit-buffer)) + (set-window-buffer (selected-window) + (set-buffer (make-indirect-buffer (buffer-name) buf))) + (narrow-to-region (todos-item-start) (todos-item-end)) + (todos-edit-mode) + (message "%s" (substitute-command-keys + (concat "Type \\[todos-edit-quit] " + "to return to Todos mode.\n")))))) (defun todos-edit-multiline (&optional item) ;FIXME: not item editing command "" ;FIXME -- 2.39.5