[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog calendar/todo-mode.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog calendar/todo-mode.el |
Date: |
Sat, 31 Oct 2009 02:22:34 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/10/31 02:22:33
Modified files:
lisp : ChangeLog
lisp/calendar : todo-mode.el
Log message:
Stephen Berman <stephen.berman at gmx.net>
(todo-edit-item): Signal an error if there is no item to edit.
(Bug#4820)
(todo-top-priorities): Restore point and restore narrowing in Todo
buffer. (Bug#4820)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16532&r2=1.16533
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/calendar/todo-mode.el?cvsroot=emacs&r1=1.76&r2=1.77
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16532
retrieving revision 1.16533
diff -u -b -r1.16532 -r1.16533
--- ChangeLog 31 Oct 2009 02:19:41 -0000 1.16532
+++ ChangeLog 31 Oct 2009 02:22:30 -0000 1.16533
@@ -1,3 +1,10 @@
+2009-10-31 Stephen Berman <address@hidden>
+
+ * calendar/todo-mode.el (todo-edit-item): Signal an error if there
+ is no item to edit. (Bug#4820)
+ (todo-top-priorities): Restore point and restore narrowing in Todo
+ buffer. (Bug#4820)
+
2009-10-31 Glenn Morris <address@hidden>
* net/ange-ftp.el (top-level): Don't require dired when compiling.
Index: calendar/todo-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/todo-mode.el,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- calendar/todo-mode.el 2 Oct 2009 03:48:43 -0000 1.76
+++ calendar/todo-mode.el 31 Oct 2009 02:22:33 -0000 1.77
@@ -505,6 +505,7 @@
(defun todo-edit-item ()
"Edit current TODO list entry."
(interactive)
+ (if (< (point-min) (point-max))
(let ((item (todo-item-string)))
(if (todo-string-multiline-p item)
(todo-edit-multiline)
@@ -512,7 +513,8 @@
(todo-remove-item)
(insert new "\n")
(todo-backward-item)
- (message "")))))
+ (message ""))))
+ (error "No TODO list entry to edit")))
(defalias 'todo-cmd-edit 'todo-edit-item)
(defun todo-edit-multiline ()
@@ -745,9 +747,10 @@
(regexp-quote todo-prefix) " " todo-category-sep "\n")
(concat todo-category-end "\n"))))
beg end)
- (todo-show)
(save-excursion
+ (todo-show)
(save-restriction
+ (save-current-buffer
(widen)
(copy-to-buffer todo-print-buffer-name (point-min) (point-max))
(set-buffer todo-print-buffer-name)
@@ -772,7 +775,7 @@
(widen))
(and (looking-at "") (replace-match "")) ;Remove trailing form-feed.
(goto-char (point-min)) ;Due to display buffer
- ))
+ )))
;; Could have used switch-to-buffer as it has a norecord argument,
;; which is nice when we are called from e.g. todo-print.
;; Else we could have used pop-to-buffer.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog calendar/todo-mode.el,
Glenn Morris <=