aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2013-05-31 15:43:25 +0200
committerStephen Berman2013-05-31 15:43:25 +0200
commit9fa64073386ba6607afdddd773be9aed2a85370d (patch)
treee497f53f84a0c01f41c747371acd9bfb995ea426
parenta9b0e28e232e4043267f3ee3d739e12c04c7a170 (diff)
downloademacs-9fa64073386ba6607afdddd773be9aed2a85370d.tar.gz
emacs-9fa64073386ba6607afdddd773be9aed2a85370d.zip
* todos.el (todos-edit-quit): After editing an item, make sure to
return to its category.
-rw-r--r--lisp/calendar/ChangeLog5
-rw-r--r--lisp/calendar/todos.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog
index fe8f83e2df2..43fbbf2ec41 100644
--- a/lisp/calendar/ChangeLog
+++ b/lisp/calendar/ChangeLog
@@ -1,5 +1,10 @@
12013-05-31 Stephen Berman <stephen.berman@gmx.net> 12013-05-31 Stephen Berman <stephen.berman@gmx.net>
2 2
3 * todos.el (todos-edit-quit): After editing an item, make sure to
4 return to its category.
5
62013-05-31 Stephen Berman <stephen.berman@gmx.net>
7
3 * todos.el: Clean up code. Uncapitalize file name in first line. 8 * todos.el: Clean up code. Uncapitalize file name in first line.
4 Require cl-lib instead of cl. Add section title separators. 9 Require cl-lib instead of cl. Add section title separators.
5 Reindent some code and comments. Comment out Todos mode menu 10 Reindent some code and comments. Comment out Todos mode menu
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el
index 2e28e9e9bfc..0bbf139b7ee 100644
--- a/lisp/calendar/todos.el
+++ b/lisp/calendar/todos.el
@@ -1385,7 +1385,8 @@ in the number or names of categories."
1385 (if (> (buffer-size) (- (point-max) (point-min))) 1385 (if (> (buffer-size) (- (point-max) (point-min)))
1386 ;; We got here via `e m'. 1386 ;; We got here via `e m'.
1387 (let ((item (buffer-string)) 1387 (let ((item (buffer-string))
1388 (regex "\\(\n\\)[^[:blank:]]")) 1388 (regex "\\(\n\\)[^[:blank:]]")
1389 (buf (buffer-base-buffer)))
1389 (while (not (string-match (concat todos-date-string-start 1390 (while (not (string-match (concat todos-date-string-start
1390 todos-date-pattern) item)) 1391 todos-date-pattern) item))
1391 (setq item (read-from-minibuffer 1392 (setq item (read-from-minibuffer
@@ -1395,7 +1396,9 @@ in the number or names of categories."
1395 (setq item (replace-regexp-in-string regex "\n\t" item nil nil 1)) 1396 (setq item (replace-regexp-in-string regex "\n\t" item nil nil 1))
1396 (delete-region (point-min) (point-max)) 1397 (delete-region (point-min) (point-max))
1397 (insert item)) 1398 (insert item))
1398 (kill-buffer)) 1399 (kill-buffer)
1400 (unless (eq (current-buffer) buf)
1401 (set-window-buffer (selected-window) (set-buffer buf))))
1399 ;; We got here via `F e'. 1402 ;; We got here via `F e'.
1400 (when (todos-check-format) 1403 (when (todos-check-format)
1401 ;; FIXME: separate out sexp check? 1404 ;; FIXME: separate out sexp check?