* image-mode.el (image-mode): Add image-after-revert-hook to after-revert-hook.
[bpt/emacs.git] / lisp / org / org-macs.el
index 0bc3d05..562715f 100644 (file)
@@ -1,12 +1,12 @@
 ;;; org-macs.el --- Top-level definitions for Org-mode
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.30c
+;; Version: 6.35i
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -63,6 +63,8 @@ Also, do not record undo information."
            (setq ss (replace-match "a-zA-Z0-9" t t ss)))
          (while (string-match "\\[:alpha:\\]" ss)
            (setq ss (replace-match "a-zA-Z" t t ss)))
+         (while (string-match "\\[:punct:\\]" ss)
+           (setq ss (replace-match "\001-@[-`{-~" t t ss)))
          ss))
     s))
 
@@ -102,6 +104,7 @@ We use a macro so that the test can happen at compilation time."
      (save-excursion
        (goto-char (or ,pom (point)))
        ,@body)))
+(put 'org-with-point-at 'lisp-indent-function 1)
 
 (defmacro org-no-warnings (&rest body)
   (cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body))
@@ -117,9 +120,19 @@ We use a macro so that the test can happen at compilation time."
      ,@body))
 
 (defmacro org-if-unprotected-at (pos &rest body)
-  "Execute BODY if there is no `org-protected' text property at point-1."
+  "Execute BODY if there is no `org-protected' text property at POS."
   `(unless (get-text-property ,pos 'org-protected)
      ,@body))
+(put 'org-if-unprotected-at 'lisp-indent-function 1)
+
+(defun org-re-search-forward-unprotected (&rest args)
+  "Like re-search-forward, but stop only in unprotected places."
+  (catch 'exit
+    (while t
+      (unless (apply 're-search-forward args)
+       (throw 'exit nil))
+      (unless (get-text-property (match-beginning 0) 'org-protected)
+       (throw 'exit (point))))))
 
 (defmacro org-with-remote-undo (_buffer &rest _body)
   "Execute BODY while recording undo information in two buffers."
@@ -172,7 +185,7 @@ We use a macro so that the test can happen at compilation time."
        (t (cdr (assq 'default option)))))
 
 (defsubst org-check-external-command (cmd &optional use no-error)
-  "Check if external progam CMD for USE exists, error if not.
+  "Check if external program CMD for USE exists, error if not.
 When the program does exist, return its path.
 When it does not exist and NO-ERROR is set, return nil.
 Otherwise, throw an error.  The optional argument USE can describe what this