[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Check marker is valid before use
From: |
Leo |
Subject: |
[O] [PATCH] Check marker is valid before use |
Date: |
Fri, 21 Oct 2011 03:56:31 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.8) |
lisp/org-agenda.el | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bf03b68c..f4b8bcbf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6784,13 +6784,13 @@ (defun org-agenda-previous-line ()
(defun org-agenda-do-context-action ()
"Show outline path and, maybe, follow mode window."
(let ((m (org-get-at-bol 'org-marker)))
- (if (and org-agenda-follow-mode m)
- (if org-agenda-follow-indirect
- (org-agenda-tree-to-indirect-buffer)
- (org-agenda-show)))
- (if (and m org-agenda-show-outline-path)
- (org-with-point-at m
- (org-display-outline-path t)))))
+ (when (and (markerp m) (marker-buffer m))
+ (and org-agenda-follow-mode
+ (if org-agenda-follow-indirect
+ (org-agenda-tree-to-indirect-buffer)
+ (org-agenda-show)))
+ (and org-agenda-show-outline-path
+ (org-with-point-at m (org-display-outline-path t))))))
(defun org-agenda-show-priority ()
"Show the priority of the current item.
--
1.7.7
- [O] [PATCH] Check marker is valid before use,
Leo <=