diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-11-11 22:10:19 -0600 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-11-11 22:10:19 -0600 |
commit | afe98dfa700de5cf0493e8bf95b7d894e2734e47 (patch) | |
tree | 92a812b353bb09c1286e8a44fb552de9f1af3384 /lisp/org/org-mouse.el | |
parent | df26e1f58a7e484b7ed500ea48d0e1c49345ffbf (diff) | |
download | emacs-afe98dfa700de5cf0493e8bf95b7d894e2734e47.tar.gz emacs-afe98dfa700de5cf0493e8bf95b7d894e2734e47.tar.bz2 emacs-afe98dfa700de5cf0493e8bf95b7d894e2734e47.zip |
Install org-mode version 7.3
Diffstat (limited to 'lisp/org/org-mouse.el')
-rw-r--r-- | lisp/org/org-mouse.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 12a7dcb85af..e16c9778d77 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -4,7 +4,7 @@ ;; ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> -;; Version: 7.01 +;; Version: 7.3 ;; ;; This file is part of GNU Emacs. ;; @@ -148,6 +148,7 @@ (declare-function org-agenda-change-all-lines "org-agenda" (newhead hdmarker &optional fixface just-this)) (declare-function org-verify-change-for-undo "org-agenda" (l1 l2)) +(declare-function org-apply-on-list "org-list" (function init-value &rest args)) (defvar org-mouse-plain-list-regexp "\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) " "Regular expression that matches a plain list.") @@ -576,14 +577,11 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" (goto-char (second contextdata)) (re-search-forward ".*" (third contextdata)))))) -(defun org-mouse-for-each-item (function) - (save-excursion - (ignore-errors - (while t (org-previous-item))) - (ignore-errors - (while t - (funcall function) - (org-next-item))))) +(defun org-mouse-for-each-item (funct) + ;; Functions called by `org-apply-on-list' need an argument + (let ((wrap-fun (lambda (c) (funcall funct)))) + (when (org-in-item-p) + (org-apply-on-list wrap-fun nil)))) (defun org-mouse-bolp () "Return true if there only spaces, tabs, and '*' before point. |