]> git.eshelyaron.com Git - emacs.git/commitdiff
* todos.el (todos-edit-multiline-item): Make a no-op when point is
authorStephen Berman <stephen.berman@gmx.net>
Sat, 27 Apr 2013 13:28:18 +0000 (15:28 +0200)
committerStephen Berman <stephen.berman@gmx.net>
Sat, 27 Apr 2013 13:28:18 +0000 (15:28 +0200)
not on an item.

lisp/calendar/ChangeLog
lisp/calendar/todos.el

index e3d3b45f5a9f25c5fe96e50b5454748bac92679a..2619ef72a540842157124d517b4fec90a03a9d07 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-27  Stephen Berman  <stephen.berman@gmx.net>
+
+       * todos.el (todos-edit-multiline-item): Make a no-op when point is
+       not on an item.
+
 2013-04-24  Stephen Berman  <stephen.berman@gmx.net>
 
        * todos.el (todos-check-format): Add check of well-formedness of
index 9e1e4904d9c5a09213d758d99aaa8be544809b9c..24a39cf136d2e9d3030bdfda9620aea55a626cca 100644 (file)
@@ -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