Browse Source

Merge branch 'simplify-but-keep-xemacs-compatibility'

Conflicts:
	lisp/ChangeLog
Carsten Dominik 15 years ago
parent
commit
a000f6163d

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2010-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* Makefile (BATCH): Write the BATCH command a bit more compact.
+
 2010-04-05  Carsten Dominik  <carsten.dominik@gmail.com>
 2010-04-05  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* ORGWEBPAGE/Changes.org: More details on LaTeX headers.
 	* ORGWEBPAGE/Changes.org: More details on LaTeX headers.

+ 1 - 1
Makefile

@@ -29,7 +29,7 @@ infodir = $(prefix)/share/info
 # Using emacs in batch mode.
 # Using emacs in batch mode.
 
 
 BATCH=$(EMACS) -batch -q -no-site-file -eval                             \
 BATCH=$(EMACS) -batch -q -no-site-file -eval                             \
-  "(progn (add-to-list (quote load-path) \"$(lispdir)\") (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
+  "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))"
 
 
 # Specify the byte-compiler for compiling org-mode files
 # Specify the byte-compiler for compiling org-mode files
 ELC= $(BATCH) -f batch-byte-compile
 ELC= $(BATCH) -f batch-byte-compile

+ 15 - 0
contrib/ChangeLog

@@ -1,3 +1,18 @@
+2010-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* lisp/org-learn.el (require): `calendar' is now required already
+	by org.el on top level.
+
+	* lisp/org-toc.el (org-toc-cycle-subtree, org-toc-show)
+	(org-toc-restore-config): Use the normal overlay API.
+
+	* lisp/org-expiry.el (org-expiry-process-entry): Use the normal
+	overlay API.
+
+	* babel/lisp/org-babel.el (org-babel-hide-hash)
+	(org-babel-hash-at-point, org-babel-show-result-all)
+	(org-babel-hide-result-toggle): Use the normal overlay API.
+
 2010-03-31  Carsten Dominik  <carsten.dominik@gmail.com>
 2010-03-31  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* lisp/org-mac-iCal.el (org-mac-iCal): Snow Leopard
 	* lisp/org-mac-iCal.el (org-mac-iCal): Snow Leopard

+ 14 - 14
contrib/babel/lisp/org-babel.el

@@ -403,10 +403,10 @@ visible."
              (end (match-end 3))
              (end (match-end 3))
              (hash (match-string 3))
              (hash (match-string 3))
              ov1 ov2)
              ov1 ov2)
-        (setq ov1 (org-make-overlay start hide-start))
+        (setq ov1 (make-overlay start hide-start))
-        (setq ov2 (org-make-overlay hide-start end))
+        (setq ov2 (make-overlay hide-start end))
-        (org-overlay-put ov2 'invisible 'org-babel-hide-hash)
+        (overlay-put ov2 'invisible 'org-babel-hide-hash)
-        (org-overlay-put ov1 'babel-hash hash)))))
+        (overlay-put ov1 'babel-hash hash)))))
 
 
 (defun org-babel-hide-all-hashes ()
 (defun org-babel-hide-all-hashes ()
   "Hide the hash in the current buffer.  Only the initial
   "Hide the hash in the current buffer.  Only the initial
@@ -426,7 +426,7 @@ added as the last element of the kill ring.  This can be called
 with C-c C-c."
 with C-c C-c."
   (interactive)
   (interactive)
   (let ((hash (car (delq nil (mapcar
   (let ((hash (car (delq nil (mapcar
-                               (lambda (ol) (org-overlay-get ol 'babel-hash))
+                               (lambda (ol) (overlay-get ol 'babel-hash))
                               (org-overlays-at (or point (point))))))))
                               (org-overlays-at (or point (point))))))))
     (when hash (kill-new hash) (message hash))))
     (when hash (kill-new hash) (message hash))))
 (add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-hash-at-point)
 (add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-hash-at-point)
@@ -449,7 +449,7 @@ with C-c C-c."
 
 
 (defun org-babel-show-result-all ()
 (defun org-babel-show-result-all ()
   "Unfold all results in the current buffer."
   "Unfold all results in the current buffer."
-  (mapc 'org-delete-overlay org-babel-hide-result-overlays)
+  (mapc 'delete-overlay org-babel-hide-result-overlays)
   (setq org-babel-hide-result-overlays nil))
   (setq org-babel-hide-result-overlays nil))
 
 
 (defun org-babel-hide-result-toggle-maybe ()
 (defun org-babel-hide-result-toggle-maybe ()
@@ -473,7 +473,7 @@ with C-c C-c."
               (end (progn (goto-char (- (org-babel-result-end) 1)) (point)))
               (end (progn (goto-char (- (org-babel-result-end) 1)) (point)))
               ov)
               ov)
           (if (memq t (mapcar (lambda (overlay)
           (if (memq t (mapcar (lambda (overlay)
-                                (eq (org-overlay-get overlay 'invisible)
+                                (eq (overlay-get overlay 'invisible)
 				    'org-babel-hide-result))
 				    'org-babel-hide-result))
                               (org-overlays-at start)))
                               (org-overlays-at start)))
               (if (or (not force) (eq force 'off))
               (if (or (not force) (eq force 'off))
@@ -481,22 +481,22 @@ with C-c C-c."
                           (when (member ov org-babel-hide-result-overlays)
                           (when (member ov org-babel-hide-result-overlays)
                             (setq org-babel-hide-result-overlays
                             (setq org-babel-hide-result-overlays
                                   (delq ov org-babel-hide-result-overlays)))
                                   (delq ov org-babel-hide-result-overlays)))
-                          (when (eq (org-overlay-get ov 'invisible)
+                          (when (eq (overlay-get ov 'invisible)
                                     'org-babel-hide-result)
                                     'org-babel-hide-result)
-                            (org-delete-overlay ov)))
+                            (delete-overlay ov)))
                         (org-overlays-at start)))
                         (org-overlays-at start)))
-            (setq ov (org-make-overlay start end))
+            (setq ov (make-overlay start end))
-            (org-overlay-put ov 'invisible 'org-babel-hide-result)
+            (overlay-put ov 'invisible 'org-babel-hide-result)
             ;; make the block accessible to isearch
             ;; make the block accessible to isearch
-            (org-overlay-put
+            (overlay-put
              ov 'isearch-open-invisible
              ov 'isearch-open-invisible
              (lambda (ov)
              (lambda (ov)
                (when (member ov org-babel-hide-result-overlays)
                (when (member ov org-babel-hide-result-overlays)
                  (setq org-babel-hide-result-overlays
                  (setq org-babel-hide-result-overlays
                        (delq ov org-babel-hide-result-overlays)))
                        (delq ov org-babel-hide-result-overlays)))
-               (when (eq (org-overlay-get ov 'invisible)
+               (when (eq (overlay-get ov 'invisible)
                          'org-babel-hide-result)
                          'org-babel-hide-result)
-                 (org-delete-overlay ov))))
+                 (delete-overlay ov))))
             (push ov org-babel-hide-result-overlays)))
             (push ov org-babel-hide-result-overlays)))
       (error "Not looking at a result line"))))
       (error "Not looking at a result line"))))
 
 

+ 3 - 3
contrib/lisp/org-expiry.el

@@ -237,10 +237,10 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
     (when (org-expiry-expired-p)
     (when (org-expiry-expired-p)
       (org-back-to-heading)
       (org-back-to-heading)
       (looking-at org-complex-heading-regexp)
       (looking-at org-complex-heading-regexp)
-      (let* ((ov (org-make-overlay (point) (match-end 0)))
+      (let* ((ov (make-overlay (point) (match-end 0)))
 	     (e (org-expiry-expired-p))
 	     (e (org-expiry-expired-p))
 	     (d (time-to-number-of-days e)))
 	     (d (time-to-number-of-days e)))
-	(org-overlay-put ov 'face 'secondary-selection)
+	(overlay-put ov 'face 'secondary-selection)
 	(if (or force
 	(if (or force
 		(null org-expiry-confirm-flag)
 		(null org-expiry-confirm-flag)
 		(and (eq org-expiry-confirm-flag 'interactive)
 		(and (eq org-expiry-confirm-flag 'interactive)
@@ -248,7 +248,7 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
 		(and org-expiry-confirm-flag
 		(and org-expiry-confirm-flag
 		     (y-or-n-p (format "Entry expired by %d days.  Process? " d))))
 		     (y-or-n-p (format "Entry expired by %d days.  Process? " d))))
 	  (funcall 'org-expiry-handler-function))
 	  (funcall 'org-expiry-handler-function))
-	(org-delete-overlay ov)))))
+	(delete-overlay ov)))))
 
 
 (defun org-expiry-process-entries (beg end)
 (defun org-expiry-process-entries (beg end)
   "Process all expired entries between BEG and END.
   "Process all expired entries between BEG and END.

+ 1 - 2
contrib/lisp/org-learn.el

@@ -36,8 +36,7 @@
 
 
 (require 'org)
 (require 'org)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
+  (require 'cl))
-  (require 'calendar))
 
 
 (defgroup org-learn nil
 (defgroup org-learn nil
   "Options concerning the learning code in Org-mode."
   "Options concerning the learning code in Org-mode."

+ 12 - 12
contrib/lisp/org-toc.el

@@ -190,20 +190,20 @@ specified, then make `org-toc-recenter' use this value."
 	(end (save-excursion (end-of-line) (point)))
 	(end (save-excursion (end-of-line) (point)))
 	(ov (car (org-overlays-at (point))))
 	(ov (car (org-overlays-at (point))))
 	status)
 	status)
-    (if ov (setq status (org-overlay-get ov 'status))
+    (if ov (setq status (overlay-get ov 'status))
-      (setq ov (org-make-overlay beg end)))
+      (setq ov (make-overlay beg end)))
     ;; change the folding status of this headline
     ;; change the folding status of this headline
     (cond ((or (null status) (eq status 'folded))
     (cond ((or (null status) (eq status 'folded))
 	   (show-children)
 	   (show-children)
 	   (message "CHILDREN")
 	   (message "CHILDREN")
-	   (org-overlay-put ov 'status 'children))
+	   (overlay-put ov 'status 'children))
 	  ((eq status 'children)
 	  ((eq status 'children)
 	   (show-branches)
 	   (show-branches)
 	   (message "BRANCHES")
 	   (message "BRANCHES")
-	   (org-overlay-put ov 'status 'branches))
+	   (overlay-put ov 'status 'branches))
 	  (t (hide-subtree)
 	  (t (hide-subtree)
 	     (message "FOLDED")
 	     (message "FOLDED")
-	     (org-overlay-put ov 'status 'folded)))))
+	     (overlay-put ov 'status 'folded)))))
 
 
 ;;; Main show function:
 ;;; Main show function:
 ;; FIXME name this org-before-first-heading-p?
 ;; FIXME name this org-before-first-heading-p?
@@ -239,11 +239,11 @@ specified, then make `org-toc-recenter' use this value."
     (let* ((beg (point-min))
     (let* ((beg (point-min))
 	   (end (and (re-search-forward "^\\*" nil t)
 	   (end (and (re-search-forward "^\\*" nil t)
 		     (1- (match-beginning 0))))
 		     (1- (match-beginning 0))))
-	   (ov (org-make-overlay beg end))
+	   (ov (make-overlay beg end))
 	   (help (format "Table of contents for %s (press ? for a quick help):\n"
 	   (help (format "Table of contents for %s (press ? for a quick help):\n"
 			 (buffer-name org-toc-base-buffer))))
 			 (buffer-name org-toc-base-buffer))))
-      (org-overlay-put ov 'invisible t)
+      (overlay-put ov 'invisible t)
-      (org-overlay-put ov 'before-string help))
+      (overlay-put ov 'before-string help))
     ;; build the browsable TOC
     ;; build the browsable TOC
     (cond (depth
     (cond (depth
 	   (let* ((dpth (if org-toc-odd-levels-only
 	   (let* ((dpth (if org-toc-odd-levels-only
@@ -417,16 +417,16 @@ current table of contents to it."
 	(goto-char (point-min))
 	(goto-char (point-min))
 	(when (search-forward (car hlcfg0) nil t)
 	(when (search-forward (car hlcfg0) nil t)
 	  (unless (org-overlays-at (match-beginning 0))
 	  (unless (org-overlays-at (match-beginning 0))
-	    (setq ov (org-make-overlay (match-beginning 0)
+	    (setq ov (make-overlay (match-beginning 0)
-				       (match-end 0))))
+				   (match-end 0))))
 	  (cond ((eq (cdr hlcfg0) 'children)
 	  (cond ((eq (cdr hlcfg0) 'children)
 		 (show-children)
 		 (show-children)
 		 (message "CHILDREN")
 		 (message "CHILDREN")
-		 (org-overlay-put ov 'status 'children))
+		 (overlay-put ov 'status 'children))
 		((eq (cdr hlcfg0) 'branches)
 		((eq (cdr hlcfg0) 'branches)
 		 (show-branches)
 		 (show-branches)
 		 (message "BRANCHES")
 		 (message "BRANCHES")
-		 (org-overlay-put ov 'status 'branches))))))
+		 (overlay-put ov 'status 'branches))))))
     (goto-char pos)
     (goto-char pos)
     (if org-toc-follow-mode (org-toc-goto))
     (if org-toc-follow-mode (org-toc-goto))
     (message "Last TOC configuration restored")
     (message "Last TOC configuration restored")

+ 73 - 0
lisp/ChangeLog

@@ -3,6 +3,79 @@
 	* org-html.el (org-export-as-html-and-open): Add argument to
 	* org-html.el (org-export-as-html-and-open): Add argument to
 	kill-buffer.
 	kill-buffer.
 
 
+	* org-habit.el (require): `calendar' is now required already by
+	org.el on top level.
+
+	* org-clock.el (require): `calendar' is now required already by
+	org.el on top level.
+
+	* org-agenda.el (require, org-timeline, org-agenda-list)
+	(org-todo-list, org-agenda-to-appt): `calendar' is now required
+	already by org.el on top level.
+
+	* org.el (org-export-latex-fix-inputenc): Declare function.
+
+	* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete
+	variables.
+
+	* org.el (calendar): Require calendar now on top level in org.el
+	and define aliases to new variables when needed.
+	(org-read-date, org-goto-calendar): Do not bind obsolete
+	variables.
+
+	* org-clock.el (org-clock-out, org-clock-cancel): Get rid of
+	compilation warning, add comment that this cannot be done with
+	`with-current-buffer'.
+
+	* org-wl.el (org-wl-open): Use `with-current-buffer'.
+
+	* org.el (overlay, org-remove-empty-overlays-at)
+	(org-outline-overlay-data, org-set-outline-overlay-data)
+	(org-show-block-all, org-hide-block-toggle)
+	(org-highlight-new-match, org-remove-occur-highlights)
+	(org-tags-overlay, org-fast-tag-selection, org-date-ovl)
+	(org-read-date, org-read-date-display, org-eval-in-calendar)
+	(org-format-latex, org-context)
+	(org-speedbar-restriction-lock-overlay)
+	(org-speedbar-set-agenda-restriction): Use the normal overlay API.
+
+	* org-table.el (org-table-add-rectangle-overlay)
+	(org-table-remove-rectangle-highlight)
+	(org-table-overlay-coordinates)
+	(org-table-toggle-coordinate-overlays): Use the normal overlay
+	API.
+
+	* org-src.el (org-edit-src-code, org-edit-fixed-width-region)
+	(org-edit-src-exit, org-src-mode-configure-edit-buffer): Use the
+	normal overlay API.
+
+	* org-colview.el (org-columns-new-overlay)
+	(org-columns-display-here, org-columns-remove-overlays)
+	(org-columns-edit-value, org-columns-next-allowed-value)
+	(org-columns-update): Use the normal overlay API.
+
+	* org-clock.el (org-clock-out, org-clock-cancel)
+	(org-clock-put-overlay, org-clock-remove-overlays): Use the normal
+	overlay API.
+
+	* org-agenda.el (org-agenda-mark-filtered-text)
+	(org-agenda-mark-clocking-task, org-agenda-fontify-priorities)
+	(org-agenda-dim-blocked-tasks, org-agenda-entry-text-show-here)
+	(org-agenda-entry-text-hide)
+	(org-agenda-restriction-lock-overlay)
+	(org-agenda-set-restriction-lock)
+	(org-agenda-filter-by-tag-hide-line)
+	(org-agenda-fix-tags-filter-overlays-at)
+	(org-agenda-filter-by-tag-show-all, org-hl)
+	(org-agenda-goto-calendar, org-agenda-bulk-mark)
+	(org-agenda-bulk-remove-overlays): Use the normal overlay API.
+
+	* org-freemind.el (org-freemind-from-org-mode-node)
+	(org-freemind-from-org-mode, )
+	(org-freemind-from-org-sparse-tree, org-freemind-to-org-mode): Use
+	interactive-p instead of called-interactively, because this is
+	backward compatible with older Emacsen I still support..
+
 2010-04-16  Carsten Dominik  <carsten.dominik@gmail.com>
 2010-04-16  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org-exp.el (org-export-define-heading-targets): Fix bug in
 	* org-exp.el (org-export-define-heading-targets): Fix bug in

+ 48 - 57
lisp/org-agenda.el

@@ -32,8 +32,7 @@
 
 
 (require 'org)
 (require 'org)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
+  (require 'cl))
-  (require 'calendar))
 
 
 (declare-function diary-add-to-list "diary-lib"
 (declare-function diary-add-to-list "diary-lib"
                   (date string specifier &optional marker globcolor literal))
                   (date string specifier &optional marker globcolor literal))
@@ -1967,7 +1966,6 @@ Pressing `<' twice means to restrict to the current subtree or region
 	    (move-marker org-agenda-restrict-end
 	    (move-marker org-agenda-restrict-end
 			 (progn (org-end-of-subtree t)))))))
 			 (progn (org-end-of-subtree t)))))))
 
 
-      (require 'calendar)  ; FIXME: can we avoid this for some commands?
       ;; For example the todo list should not need it (but does...)
       ;; For example the todo list should not need it (but does...)
       (cond
       (cond
        ((setq entry (assoc keys org-agenda-custom-commands))
        ((setq entry (assoc keys org-agenda-custom-commands))
@@ -2518,9 +2516,9 @@ higher priority settings."
   (let ((inhibit-read-only t))
   (let ((inhibit-read-only t))
     (mapc
     (mapc
      (lambda (o)
      (lambda (o)
-       (when (equal (org-overlay-buffer o) (current-buffer))
+       (when (equal (overlay-buffer o) (current-buffer))
 	 (put-text-property
 	 (put-text-property
-	  (org-overlay-start o) (org-overlay-end o)
+	  (overlay-start o) (overlay-end o)
 	  'org-filtered t)))
 	  'org-filtered t)))
      org-agenda-filter-overlays)))
      org-agenda-filter-overlays)))
 
 
@@ -2797,8 +2795,8 @@ bind it in the options section.")
 (defun org-agenda-mark-clocking-task ()
 (defun org-agenda-mark-clocking-task ()
   "Mark the current clock entry in the agenda if it is present."
   "Mark the current clock entry in the agenda if it is present."
   (mapc (lambda (o)
   (mapc (lambda (o)
-	  (if (eq (org-overlay-get o 'type) 'org-agenda-clocking)
+	  (if (eq (overlay-get o 'type) 'org-agenda-clocking)
-	      (org-delete-overlay o)))
+	      (delete-overlay o)))
 	(org-overlays-in (point-min) (point-max)))
 	(org-overlays-in (point-min) (point-max)))
   (when (marker-buffer org-clock-hd-marker)
   (when (marker-buffer org-clock-hd-marker)
     (save-excursion
     (save-excursion
@@ -2808,17 +2806,17 @@ bind it in the options section.")
 	  (goto-char s)
 	  (goto-char s)
 	  (when (equal (org-get-at-bol 'org-hd-marker)
 	  (when (equal (org-get-at-bol 'org-hd-marker)
 		       org-clock-hd-marker)
 		       org-clock-hd-marker)
-	    (setq ov (org-make-overlay (point-at-bol) (1+ (point-at-eol))))
+	    (setq ov (make-overlay (point-at-bol) (1+ (point-at-eol))))
-	    (org-overlay-put ov 'type 'org-agenda-clocking)
+	    (overlay-put ov 'type 'org-agenda-clocking)
-	    (org-overlay-put ov 'face 'org-agenda-clocking)
+	    (overlay-put ov 'face 'org-agenda-clocking)
-	    (org-overlay-put ov 'help-echo
+	    (overlay-put ov 'help-echo
 			     "The clock is running in this item")))))))
 			     "The clock is running in this item")))))))
 
 
 (defun org-agenda-fontify-priorities ()
 (defun org-agenda-fontify-priorities ()
   "Make highest priority lines bold, and lowest italic."
   "Make highest priority lines bold, and lowest italic."
   (interactive)
   (interactive)
-  (mapc (lambda (o) (if (eq (org-overlay-get o 'org-type) 'org-priority)
+  (mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-priority)
-			(org-delete-overlay o)))
+			(delete-overlay o)))
 	(org-overlays-in (point-min) (point-max)))
 	(org-overlays-in (point-min) (point-max)))
   (save-excursion
   (save-excursion
     (let ((inhibit-read-only t)
     (let ((inhibit-read-only t)
@@ -2834,8 +2832,8 @@ bind it in the options section.")
 	      e (if (eq org-agenda-fontify-priorities 'cookies)
 	      e (if (eq org-agenda-fontify-priorities 'cookies)
 		    (match-end 0)
 		    (match-end 0)
 		  (point-at-eol))
 		  (point-at-eol))
-	      ov (org-make-overlay b e))
+	      ov (make-overlay b e))
-	(org-overlay-put
+	(overlay-put
 	 ov 'face
 	 ov 'face
 	 (cond ((org-face-from-face-or-color
 	 (cond ((org-face-from-face-or-color
 		 'priority nil
 		 'priority nil
@@ -2846,12 +2844,12 @@ bind it in the options section.")
 		      (cdr (assoc p org-agenda-fontify-priorities)))))
 		      (cdr (assoc p org-agenda-fontify-priorities)))))
 	       ((equal p l) 'italic)
 	       ((equal p l) 'italic)
 	       ((equal p h) 'bold)))
 	       ((equal p h) 'bold)))
-	(org-overlay-put ov 'org-type 'org-priority)))))
+	(overlay-put ov 'org-type 'org-priority)))))
 
 
 (defun org-agenda-dim-blocked-tasks ()
 (defun org-agenda-dim-blocked-tasks ()
   "Dim currently blocked TODO's in the agenda display."
   "Dim currently blocked TODO's in the agenda display."
-  (mapc (lambda (o) (if (eq (org-overlay-get o 'org-type) 'org-blocked-todo)
+  (mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo)
-			(org-delete-overlay o)))
+			(delete-overlay o)))
 	(org-overlays-in (point-min) (point-max)))
 	(org-overlays-in (point-min) (point-max)))
   (save-excursion
   (save-excursion
     (let ((inhibit-read-only t)
     (let ((inhibit-read-only t)
@@ -2881,11 +2879,11 @@ bind it in the options section.")
 			(max (point-min) (1- (point-at-bol)))
 			(max (point-min) (1- (point-at-bol)))
 		      (point-at-bol))
 		      (point-at-bol))
 		  e (point-at-eol)
 		  e (point-at-eol)
-		  ov (org-make-overlay b e))
+		  ov (make-overlay b e))
 	    (if invis1
 	    (if invis1
-		(org-overlay-put ov 'invisible t)
+		(overlay-put ov 'invisible t)
-	      (org-overlay-put ov 'face 'org-agenda-dimmed-todo-face))
+	      (overlay-put ov 'face 'org-agenda-dimmed-todo-face))
-	    (org-overlay-put ov 'org-type 'org-blocked-todo)))))))
+	    (overlay-put ov 'org-type 'org-blocked-todo)))))))
 
 
 (defvar org-agenda-skip-function nil
 (defvar org-agenda-skip-function nil
   "Function to be called at each match during agenda construction.
   "Function to be called at each match during agenda construction.
@@ -2958,10 +2956,10 @@ no longer in use."
 			    (org-agenda-get-some-entry-text
 			    (org-agenda-get-some-entry-text
 			     m org-agenda-entry-text-maxlines "    > "))))
 			     m org-agenda-entry-text-maxlines "    > "))))
     (when (string-match "\\S-" txt)
     (when (string-match "\\S-" txt)
-      (setq o (org-make-overlay (point-at-bol) (point-at-eol)))
+      (setq o (make-overlay (point-at-bol) (point-at-eol)))
-      (org-overlay-put o 'evaporate t)
+      (overlay-put o 'evaporate t)
-      (org-overlay-put o 'org-overlay-type 'agenda-entry-content)
+      (overlay-put o 'org-overlay-type 'agenda-entry-content)
-      (org-overlay-put o 'after-string txt))))
+      (overlay-put o 'after-string txt))))
 
 
 (defun org-agenda-entry-text-show ()
 (defun org-agenda-entry-text-show ()
   "Add entry context for all agenda lines."
   "Add entry context for all agenda lines."
@@ -2978,9 +2976,9 @@ no longer in use."
   "Remove any shown entry context."
   "Remove any shown entry context."
   (delq nil
   (delq nil
 	(mapcar (lambda (o)
 	(mapcar (lambda (o)
-		  (if (eq (org-overlay-get o 'org-overlay-type)
+		  (if (eq (overlay-get o 'org-overlay-type)
 			  'agenda-entry-content)
 			  'agenda-entry-content)
-		      (progn (org-delete-overlay o) t)))
+		      (progn (delete-overlay o) t)))
 		(org-overlays-in (point-min) (point-max)))))
 		(org-overlays-in (point-min) (point-max)))))
 
 
 ;;; Agenda timeline
 ;;; Agenda timeline
@@ -2995,7 +2993,6 @@ under the current date.
 If the buffer contains an active region, only check the region for
 If the buffer contains an active region, only check the region for
 dates."
 dates."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'timeline)
   (org-compile-prefix-format 'timeline)
   (org-set-sorting-strategy 'timeline)
   (org-set-sorting-strategy 'timeline)
   (let* ((dopast t)
   (let* ((dopast t)
@@ -3197,7 +3194,6 @@ given in `org-agenda-start-on-weekday'."
   (setq org-agenda-last-arguments (list include-all start-day ndays))
   (setq org-agenda-last-arguments (list include-all start-day ndays))
   (org-compile-prefix-format 'agenda)
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
   (org-set-sorting-strategy 'agenda)
-  (require 'calendar)
   (let* ((org-agenda-start-on-weekday
   (let* ((org-agenda-start-on-weekday
 	  (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
 	  (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
 	      org-agenda-start-on-weekday nil))
 	      org-agenda-start-on-weekday nil))
@@ -3624,7 +3620,6 @@ the list to these.  When using \\[universal-argument], you will be prompted
 for a keyword.  A numeric prefix directly selects the Nth keyword in
 for a keyword.  A numeric prefix directly selects the Nth keyword in
 `org-todo-keywords-1'."
 `org-todo-keywords-1'."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'todo)
   (org-compile-prefix-format 'todo)
   (org-set-sorting-strategy 'todo)
   (org-set-sorting-strategy 'todo)
   (org-prepare-agenda "TODO")
   (org-prepare-agenda "TODO")
@@ -3981,7 +3976,6 @@ MATCH is being ignored."
   "Get the (Emacs Calendar) diary entries for DATE."
   "Get the (Emacs Calendar) diary entries for DATE."
   (require 'diary-lib)
   (require 'diary-lib)
   (let* ((diary-fancy-buffer "*temporary-fancy-diary-buffer*")
   (let* ((diary-fancy-buffer "*temporary-fancy-diary-buffer*")
-	 (fancy-diary-buffer diary-fancy-buffer)
 	 (diary-display-hook '(fancy-diary-display))
 	 (diary-display-hook '(fancy-diary-display))
 	 (diary-display-function 'fancy-diary-display)
 	 (diary-display-function 'fancy-diary-display)
 	 (pop-up-frames nil)
 	 (pop-up-frames nil)
@@ -5274,12 +5268,12 @@ HH:MM."
 
 
 ;;; Agenda restriction lock
 ;;; Agenda restriction lock
 
 
-(defvar org-agenda-restriction-lock-overlay (org-make-overlay 1 1)
+(defvar org-agenda-restriction-lock-overlay (make-overlay 1 1)
   "Overlay to mark the headline to which agenda commands are restricted.")
   "Overlay to mark the headline to which agenda commands are restricted.")
-(org-overlay-put org-agenda-restriction-lock-overlay
+(overlay-put org-agenda-restriction-lock-overlay
-		 'face 'org-agenda-restriction-lock)
+	     'face 'org-agenda-restriction-lock)
-(org-overlay-put org-agenda-restriction-lock-overlay
+(overlay-put org-agenda-restriction-lock-overlay
-		 'help-echo "Agendas are currently limited to this subtree.")
+	     'help-echo "Agendas are currently limited to this subtree.")
 (org-detach-overlay org-agenda-restriction-lock-overlay)
 (org-detach-overlay org-agenda-restriction-lock-overlay)
 
 
 (defun org-agenda-set-restriction-lock (&optional type)
 (defun org-agenda-set-restriction-lock (&optional type)
@@ -5302,7 +5296,7 @@ in the file.  Otherwise, restriction will be to the current subtree."
 	(put 'org-agenda-files 'org-restrict
 	(put 'org-agenda-files 'org-restrict
 	     (list (buffer-file-name (buffer-base-buffer))))
 	     (list (buffer-file-name (buffer-base-buffer))))
 	(org-back-to-heading t)
 	(org-back-to-heading t)
-	(org-move-overlay org-agenda-restriction-lock-overlay (point) (point-at-eol))
+	(move-overlay org-agenda-restriction-lock-overlay (point) (point-at-eol))
 	(move-marker org-agenda-restrict-begin (point))
 	(move-marker org-agenda-restrict-begin (point))
 	(move-marker org-agenda-restrict-end
 	(move-marker org-agenda-restrict-end
 		     (save-excursion (org-end-of-subtree t)))
 		     (save-excursion (org-end-of-subtree t)))
@@ -5588,25 +5582,25 @@ If the line does not have an effort defined, return nil."
 
 
 (defun org-agenda-filter-by-tag-hide-line ()
 (defun org-agenda-filter-by-tag-hide-line ()
   (let (ov)
   (let (ov)
-    (setq ov (org-make-overlay (max (point-min) (1- (point-at-bol)))
+    (setq ov (make-overlay (max (point-min) (1- (point-at-bol)))
 			       (point-at-eol)))
 			       (point-at-eol)))
-    (org-overlay-put ov 'invisible t)
+    (overlay-put ov 'invisible t)
-    (org-overlay-put ov 'type 'tags-filter)
+    (overlay-put ov 'type 'tags-filter)
     (push ov org-agenda-filter-overlays)))
     (push ov org-agenda-filter-overlays)))
 
 
 (defun org-agenda-fix-tags-filter-overlays-at (&optional pos)
 (defun org-agenda-fix-tags-filter-overlays-at (&optional pos)
   (setq pos (or pos (point)))
   (setq pos (or pos (point)))
   (save-excursion
   (save-excursion
     (dolist (ov (org-overlays-at pos))
     (dolist (ov (org-overlays-at pos))
-      (when (and (org-overlay-get ov 'invisible)
+      (when (and (overlay-get ov 'invisible)
-		 (eq (org-overlay-get ov 'type) 'tags-filter))
+		 (eq (overlay-get ov 'type) 'tags-filter))
 	(goto-char pos)
 	(goto-char pos)
-	(if (< (org-overlay-start ov) (point-at-eol))
+	(if (< (overlay-start ov) (point-at-eol))
-	    (org-move-overlay ov (point-at-eol)
+	    (move-overlay ov (point-at-eol)
-			      (org-overlay-end ov)))))))
+			      (overlay-end ov)))))))
 
 
 (defun org-agenda-filter-by-tag-show-all ()
 (defun org-agenda-filter-by-tag-show-all ()
-  (mapc 'org-delete-overlay org-agenda-filter-overlays)
+  (mapc 'delete-overlay org-agenda-filter-overlays)
   (setq org-agenda-filter-overlays nil)
   (setq org-agenda-filter-overlays nil)
   (setq org-agenda-filter nil)
   (setq org-agenda-filter nil)
   (setq org-agenda-filter-form nil)
   (setq org-agenda-filter-form nil)
@@ -5881,8 +5875,8 @@ so that the date SD will be in that range."
       (error "No previous date before this line in this buffer")))
       (error "No previous date before this line in this buffer")))
 
 
 ;; Initialize the highlight
 ;; Initialize the highlight
-(defvar org-hl (org-make-overlay 1 1))
+(defvar org-hl (make-overlay 1 1))
-(org-overlay-put org-hl 'face 'highlight)
+(overlay-put org-hl 'face 'highlight)
 
 
 (defun org-highlight (begin end &optional buffer)
 (defun org-highlight (begin end &optional buffer)
   "Highlight a region with overlay."
   "Highlight a region with overlay."
@@ -7313,9 +7307,7 @@ argument, latitude and longitude will be prompted for."
 	 (date (calendar-gregorian-from-absolute day))
 	 (date (calendar-gregorian-from-absolute day))
 	 (calendar-move-hook nil)
 	 (calendar-move-hook nil)
 	 (calendar-view-holidays-initially-flag nil)
 	 (calendar-view-holidays-initially-flag nil)
-	 (calendar-view-diary-initially-flag nil)
+	 (calendar-view-diary-initially-flag nil))
-	 (view-calendar-holidays-initially nil)
-	 (view-diary-entries-initially nil))
     (calendar)
     (calendar)
     (calendar-goto-date date)))
     (calendar-goto-date date)))
 
 
@@ -7374,11 +7366,11 @@ This is a command that has to be installed in `calendar-mode-map'."
     (unless (org-agenda-bulk-marked-p)
     (unless (org-agenda-bulk-marked-p)
       (unless m (error "Nothing to mark at point"))
       (unless m (error "Nothing to mark at point"))
       (push m org-agenda-bulk-marked-entries)
       (push m org-agenda-bulk-marked-entries)
-      (setq ov (org-make-overlay (point-at-bol) (+ 2 (point-at-bol))))
+      (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol))))
       (org-overlay-display ov "> "
       (org-overlay-display ov "> "
 			   (org-get-todo-face "TODO")
 			   (org-get-todo-face "TODO")
 			   'evaporate)
 			   'evaporate)
-      (org-overlay-put ov 'type 'org-marked-entry-overlay))
+      (overlay-put ov 'type 'org-marked-entry-overlay))
     (beginning-of-line 2)
     (beginning-of-line 2)
     (while (and (get-char-property (point) 'invisible) (not (eobp)))
     (while (and (get-char-property (point) 'invisible) (not (eobp)))
       (beginning-of-line 2))
       (beginning-of-line 2))
@@ -7415,8 +7407,8 @@ This only removes the overlays, it does not remove the markers
 from the list in `org-agenda-bulk-marked-entries'."
 from the list in `org-agenda-bulk-marked-entries'."
   (interactive)
   (interactive)
   (mapc (lambda (ov)
   (mapc (lambda (ov)
-	  (and (eq (org-overlay-get ov 'type) 'org-marked-entry-overlay)
+	  (and (eq (overlay-get ov 'type) 'org-marked-entry-overlay)
-	       (org-delete-overlay ov)))
+	       (delete-overlay ov)))
 	(org-overlays-in (or beg (point-min)) (or end (point-max)))))
 	(org-overlays-in (or beg (point-min)) (or end (point-max)))))
 
 
 (defun org-agenda-bulk-remove-all-marks ()
 (defun org-agenda-bulk-remove-all-marks ()
@@ -7596,7 +7588,6 @@ either 'headline or 'category.  For example:
 will only add headlines containing IMPORTANT or headlines
 will only add headlines containing IMPORTANT or headlines
 belonging to the \"Work\" category."
 belonging to the \"Work\" category."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (if refresh (setq appt-time-msg-list nil))
   (if refresh (setq appt-time-msg-list nil))
   (if (eq filter t)
   (if (eq filter t)
       (setq filter (read-from-minibuffer "Regexp filter: ")))
       (setq filter (read-from-minibuffer "Regexp filter: ")))

+ 10 - 11
lisp/org-clock.el

@@ -30,8 +30,7 @@
 
 
 (require 'org)
 (require 'org)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
+  (require 'cl))
-  (require 'calendar))
 
 
 (declare-function calendar-absolute-from-iso    "cal-iso"    (&optional date))
 (declare-function calendar-absolute-from-iso    "cal-iso"    (&optional date))
 (defvar org-time-stamp-formats)
 (defvar org-time-stamp-formats)
@@ -1199,8 +1198,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
     (if (not (org-clocking-p))
     (if (not (org-clocking-p))
 	(if fail-quietly (throw 'exit t) (error "No active clock")))
 	(if fail-quietly (throw 'exit t) (error "No active clock")))
     (let (ts te s h m remove)
     (let (ts te s h m remove)
-      (save-excursion
+      (save-excursion ; Do not replace this with `with-current-buffer'.
-	(set-buffer (org-clocking-buffer))
+	(with-no-warnings (set-buffer (org-clocking-buffer)))
 	(save-restriction
 	(save-restriction
 	  (widen)
 	  (widen)
 	  (goto-char org-clock-marker)
 	  (goto-char org-clock-marker)
@@ -1267,8 +1266,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
   (interactive)
   (interactive)
   (if (not (org-clocking-p))
   (if (not (org-clocking-p))
       (error "No active clock"))
       (error "No active clock"))
-  (save-excursion
+  (save-excursion ; Do not replace this with `with-current-buffer'.
-    (set-buffer (org-clocking-buffer))
+    (with-no-warnings (set-buffer (org-clocking-buffer)))
     (goto-char org-clock-marker)
     (goto-char org-clock-marker)
     (delete-region (1- (point-at-bol)) (point-at-eol))
     (delete-region (1- (point-at-bol)) (point-at-eol))
     ;; Just in case, remove any empty LOGBOOK left over
     ;; Just in case, remove any empty LOGBOOK left over
@@ -1430,7 +1429,7 @@ will be easy to remove."
     (org-move-to-column c)
     (org-move-to-column c)
     (unless (eolp) (skip-chars-backward "^ \t"))
     (unless (eolp) (skip-chars-backward "^ \t"))
     (skip-chars-backward " \t")
     (skip-chars-backward " \t")
-    (setq ov (org-make-overlay (1- (point)) (point-at-eol))
+    (setq ov (make-overlay (1- (point)) (point-at-eol))
 	  tx (concat (buffer-substring (1- (point)) (point))
 	  tx (concat (buffer-substring (1- (point)) (point))
 		     (make-string (+ off (max 0 (- c (current-column)))) ?.)
 		     (make-string (+ off (max 0 (- c (current-column)))) ?.)
 		     (org-add-props (if org-time-clocksum-use-fractional
 		     (org-add-props (if org-time-clocksum-use-fractional
@@ -1444,9 +1443,9 @@ will be easy to remove."
 			 (list 'face 'org-clock-overlay))
 			 (list 'face 'org-clock-overlay))
 		     ""))
 		     ""))
     (if (not (featurep 'xemacs))
     (if (not (featurep 'xemacs))
-	(org-overlay-put ov 'display tx)
+	(overlay-put ov 'display tx)
-      (org-overlay-put ov 'invisible t)
+      (overlay-put ov 'invisible t)
-      (org-overlay-put ov 'end-glyph (make-glyph tx)))
+      (overlay-put ov 'end-glyph (make-glyph tx)))
     (push ov org-clock-overlays)))
     (push ov org-clock-overlays)))
 
 
 (defun org-clock-remove-overlays (&optional beg end noremove)
 (defun org-clock-remove-overlays (&optional beg end noremove)
@@ -1455,7 +1454,7 @@ BEG and END are ignored.  If NOREMOVE is nil, remove this function
 from the `before-change-functions' in the current buffer."
 from the `before-change-functions' in the current buffer."
   (interactive)
   (interactive)
   (unless org-inhibit-highlight-removal
   (unless org-inhibit-highlight-removal
-    (mapc 'org-delete-overlay org-clock-overlays)
+    (mapc 'delete-overlay org-clock-overlays)
     (setq org-clock-overlays nil)
     (setq org-clock-overlays nil)
     (unless noremove
     (unless noremove
       (remove-hook 'before-change-functions
       (remove-hook 'before-change-functions

+ 28 - 28
lisp/org-colview-xemacs.el

@@ -284,14 +284,14 @@ This is the compiled version of the format.")
 
 
 (defun org-columns-new-overlay (beg end &optional string face)
 (defun org-columns-new-overlay (beg end &optional string face)
   "Create a new column overlay and add it to the list."
   "Create a new column overlay and add it to the list."
-  (let ((ov (org-make-overlay beg end)))
+  (let ((ov (make-overlay beg end)))
     (if (featurep 'xemacs)
     (if (featurep 'xemacs)
         (progn
         (progn
-          (org-overlay-put ov 'face (or face 'org-columns-space1))
+          (overlay-put ov 'face (or face 'org-columns-space1))
-          (org-overlay-put ov 'start-open t)
+          (overlay-put ov 'start-open t)
           (if string
           (if string
               (org-overlay-display ov string (or face 'org-columns-space1))))
               (org-overlay-display ov string (or face 'org-columns-space1))))
-      (org-overlay-put ov 'face (or face 'secondary-selection))
+      (overlay-put ov 'face (or face 'secondary-selection))
       (org-overlay-display ov string face))
       (org-overlay-display ov string face))
     (push ov org-columns-overlays)
     (push ov org-columns-overlays)
     ov))
     ov))
@@ -370,12 +370,12 @@ This is the compiled version of the format.")
       (org-unmodified
       (org-unmodified
        (setq ov (org-columns-new-overlay
        (setq ov (org-columns-new-overlay
 		 beg (setq beg (1+ beg)) string face))
 		 beg (setq beg (1+ beg)) string face))
-       (org-overlay-put ov 'keymap org-columns-map)
+       (overlay-put ov 'keymap org-columns-map)
-       (org-overlay-put ov 'org-columns-key property)
+       (overlay-put ov 'org-columns-key property)
-       (org-overlay-put ov 'org-columns-value (cdr ass))
+       (overlay-put ov 'org-columns-value (cdr ass))
-       (org-overlay-put ov 'org-columns-value-modified modval)
+       (overlay-put ov 'org-columns-value-modified modval)
-       (org-overlay-put ov 'org-columns-pom pom)
+       (overlay-put ov 'org-columns-pom pom)
-       (org-overlay-put ov 'org-columns-format f)
+       (overlay-put ov 'org-columns-format f)
        (when (featurep 'xemacs)
        (when (featurep 'xemacs)
 	 (if (or (not (char-after beg))
 	 (if (or (not (char-after beg))
 		 (equal (char-after beg) ?\n))
 		 (equal (char-after beg) ?\n))
@@ -400,12 +400,12 @@ This is the compiled version of the format.")
     ;; Make the rest of the line disappear.
     ;; Make the rest of the line disappear.
     (org-unmodified
     (org-unmodified
      (setq ov (org-columns-new-overlay beg (point-at-eol)))
      (setq ov (org-columns-new-overlay beg (point-at-eol)))
-     (org-overlay-put ov 'invisible t)
+     (overlay-put ov 'invisible t)
-     (org-overlay-put ov 'keymap org-columns-map)
+     (overlay-put ov 'keymap org-columns-map)
-     (org-overlay-put ov 'intangible t)
+     (overlay-put ov 'intangible t)
      (push ov org-columns-overlays)
      (push ov org-columns-overlays)
-     (setq ov (org-make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
+     (setq ov (make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
-     (org-overlay-put ov 'keymap org-columns-map)
+     (overlay-put ov 'keymap org-columns-map)
      (push ov org-columns-overlays)
      (push ov org-columns-overlays)
      (let ((inhibit-read-only t))
      (let ((inhibit-read-only t))
        (put-text-property (max (point-min) (1- (point-at-bol)))
        (put-text-property (max (point-min) (1- (point-at-bol)))
@@ -497,7 +497,7 @@ This is the compiled version of the format.")
       (move-marker org-columns-begin-marker nil)
       (move-marker org-columns-begin-marker nil)
       (move-marker org-columns-top-level-marker nil)
       (move-marker org-columns-top-level-marker nil)
       (org-unmodified
       (org-unmodified
-       (mapc 'org-delete-overlay org-columns-overlays)
+       (mapc 'delete-overlay org-columns-overlays)
        (setq org-columns-overlays nil)
        (setq org-columns-overlays nil)
        (let ((inhibit-read-only t))
        (let ((inhibit-read-only t))
 	 (remove-text-properties (point-min) (point-max) '(read-only t))))
 	 (remove-text-properties (point-min) (point-max) '(read-only t))))
@@ -601,9 +601,9 @@ Where possible, use the standard interface for changing this line."
 		  (point))) ; keep despite of compiler warning
 		  (point))) ; keep despite of compiler warning
 	 (line-overlays
 	 (line-overlays
 	  (delq nil (mapcar (lambda (x)
 	  (delq nil (mapcar (lambda (x)
-			      (and (eq (org-overlay-buffer x) (current-buffer))
+			      (and (eq (overlay-buffer x) (current-buffer))
-				   (>= (org-overlay-start x) bol)
+				   (>= (overlay-start x) bol)
-				   (<= (org-overlay-start x) eol)
+				   (<= (overlay-start x) eol)
 				   x))
 				   x))
 			    org-columns-overlays)))
 			    org-columns-overlays)))
 	 (org-columns-time (time-to-number-of-days (current-time)))
 	 (org-columns-time (time-to-number-of-days (current-time)))
@@ -668,7 +668,7 @@ Where possible, use the standard interface for changing this line."
 	      (progn
 	      (progn
 		(setq org-columns-overlays
 		(setq org-columns-overlays
 		      (org-delete-all line-overlays org-columns-overlays))
 		      (org-delete-all line-overlays org-columns-overlays))
-		(mapc 'org-delete-overlay line-overlays)
+		(mapc 'delete-overlay line-overlays)
 		(org-columns-eval eval))
 		(org-columns-eval eval))
 	    (org-columns-display-here)))
 	    (org-columns-display-here)))
 	(org-move-to-column col)
 	(org-move-to-column col)
@@ -745,9 +745,9 @@ an integer, select that value."
 		  (point))) ; keep despite of compiler waring
 		  (point))) ; keep despite of compiler waring
 	 (line-overlays
 	 (line-overlays
 	  (delq nil (mapcar (lambda (x)
 	  (delq nil (mapcar (lambda (x)
-			      (and (eq (org-overlay-buffer x) (current-buffer))
+			      (and (eq (overlay-buffer x) (current-buffer))
-				   (>= (org-overlay-start x) bol)
+				   (>= (overlay-start x) bol)
-				   (<= (org-overlay-start x) eol)
+				   (<= (overlay-start x) eol)
 				   x))
 				   x))
 			    org-columns-overlays)))
 			    org-columns-overlays)))
 	 (allowed (or (org-property-get-allowed-values pom key)
 	 (allowed (or (org-property-get-allowed-values pom key)
@@ -797,7 +797,7 @@ an integer, select that value."
 	    (progn
 	    (progn
 	      (setq org-columns-overlays
 	      (setq org-columns-overlays
 		    (org-delete-all line-overlays org-columns-overlays))
 		    (org-delete-all line-overlays org-columns-overlays))
-	      (mapc 'org-delete-overlay line-overlays)
+	      (mapc 'delete-overlay line-overlays)
 	      (org-columns-eval '(org-entry-put pom key nval)))
 	      (org-columns-eval '(org-entry-put pom key nval)))
 	  (org-columns-display-here)))
 	  (org-columns-display-here)))
       (org-move-to-column col)
       (org-move-to-column col)
@@ -1092,14 +1092,14 @@ Don't set this, this is meant for dynamic scoping.")
   (let (fmt val pos face)
   (let (fmt val pos face)
     (save-excursion
     (save-excursion
       (mapc (lambda (ov)
       (mapc (lambda (ov)
-	      (when (equal (org-overlay-get ov 'org-columns-key) property)
+	      (when (equal (overlay-get ov 'org-columns-key) property)
-		(setq pos (org-overlay-start ov))
+		(setq pos (overlay-start ov))
 		(goto-char pos)
 		(goto-char pos)
 		(when (setq val (cdr (assoc property
 		(when (setq val (cdr (assoc property
 					    (get-text-property
 					    (get-text-property
 					     (point-at-bol) 'org-summaries))))
 					     (point-at-bol) 'org-summaries))))
-		  (setq fmt (org-overlay-get ov 'org-columns-format))
+		  (setq fmt (overlay-get ov 'org-columns-format))
-		  (org-overlay-put ov 'org-columns-value val)
+		  (overlay-put ov 'org-columns-value val)
                   (if (featurep 'xemacs)
                   (if (featurep 'xemacs)
                       (progn
                       (progn
                         (setq face (glyph-face (extent-end-glyph ov)))
                         (setq face (glyph-face (extent-end-glyph ov)))

+ 21 - 21
lisp/org-colview.el

@@ -146,8 +146,8 @@ This is the compiled version of the format.")
 
 
 (defun org-columns-new-overlay (beg end &optional string face)
 (defun org-columns-new-overlay (beg end &optional string face)
   "Create a new column overlay and add it to the list."
   "Create a new column overlay and add it to the list."
-  (let ((ov (org-make-overlay beg end)))
+  (let ((ov (make-overlay beg end)))
-    (org-overlay-put ov 'face (or face 'secondary-selection))
+    (overlay-put ov 'face (or face 'secondary-selection))
     (org-overlay-display ov string face)
     (org-overlay-display ov string face)
     (push ov org-columns-overlays)
     (push ov org-columns-overlays)
     ov))
     ov))
@@ -220,12 +220,12 @@ This is the compiled version of the format.")
       (org-unmodified
       (org-unmodified
        (setq ov (org-columns-new-overlay
        (setq ov (org-columns-new-overlay
 		 beg (setq beg (1+ beg)) string (if dateline face1 face)))
 		 beg (setq beg (1+ beg)) string (if dateline face1 face)))
-       (org-overlay-put ov 'keymap org-columns-map)
+       (overlay-put ov 'keymap org-columns-map)
-       (org-overlay-put ov 'org-columns-key property)
+       (overlay-put ov 'org-columns-key property)
-       (org-overlay-put ov 'org-columns-value (cdr ass))
+       (overlay-put ov 'org-columns-value (cdr ass))
-       (org-overlay-put ov 'org-columns-value-modified modval)
+       (overlay-put ov 'org-columns-value-modified modval)
-       (org-overlay-put ov 'org-columns-pom pom)
+       (overlay-put ov 'org-columns-pom pom)
-       (org-overlay-put ov 'org-columns-format f))
+       (overlay-put ov 'org-columns-format f))
       (if (or (not (char-after beg))
       (if (or (not (char-after beg))
 	      (equal (char-after beg) ?\n))
 	      (equal (char-after beg) ?\n))
 	  (let ((inhibit-read-only t))
 	  (let ((inhibit-read-only t))
@@ -235,12 +235,12 @@ This is the compiled version of the format.")
       ;; Make the rest of the line disappear.
       ;; Make the rest of the line disappear.
       (org-unmodified
       (org-unmodified
        (setq ov (org-columns-new-overlay beg (point-at-eol)))
        (setq ov (org-columns-new-overlay beg (point-at-eol)))
-       (org-overlay-put ov 'invisible t)
+       (overlay-put ov 'invisible t)
-       (org-overlay-put ov 'keymap org-columns-map)
+       (overlay-put ov 'keymap org-columns-map)
-       (org-overlay-put ov 'intangible t)
+       (overlay-put ov 'intangible t)
        (push ov org-columns-overlays)
        (push ov org-columns-overlays)
-       (setq ov (org-make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
+       (setq ov (make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
-       (org-overlay-put ov 'keymap org-columns-map)
+       (overlay-put ov 'keymap org-columns-map)
        (push ov org-columns-overlays)
        (push ov org-columns-overlays)
        (let ((inhibit-read-only t))
        (let ((inhibit-read-only t))
 	 (put-text-property (max (point-min) (1- (point-at-bol)))
 	 (put-text-property (max (point-min) (1- (point-at-bol)))
@@ -323,7 +323,7 @@ for the duration of the command.")
       (move-marker org-columns-begin-marker nil)
       (move-marker org-columns-begin-marker nil)
       (move-marker org-columns-top-level-marker nil)
       (move-marker org-columns-top-level-marker nil)
       (org-unmodified
       (org-unmodified
-       (mapc 'org-delete-overlay org-columns-overlays)
+       (mapc 'delete-overlay org-columns-overlays)
        (setq org-columns-overlays nil)
        (setq org-columns-overlays nil)
        (let ((inhibit-read-only t))
        (let ((inhibit-read-only t))
 	 (remove-text-properties (point-min) (point-max) '(read-only t))))
 	 (remove-text-properties (point-min) (point-max) '(read-only t))))
@@ -495,7 +495,7 @@ Where possible, use the standard interface for changing this line."
 	      (progn
 	      (progn
 		(setq org-columns-overlays
 		(setq org-columns-overlays
 		      (org-delete-all line-overlays org-columns-overlays))
 		      (org-delete-all line-overlays org-columns-overlays))
-		(mapc 'org-delete-overlay line-overlays)
+		(mapc 'delete-overlay line-overlays)
 		(org-columns-eval eval))
 		(org-columns-eval eval))
 	    (org-columns-display-here)))
 	    (org-columns-display-here)))
 	(org-move-to-column col)
 	(org-move-to-column col)
@@ -624,7 +624,7 @@ an integer, select that value."
 	    (progn
 	    (progn
 	      (setq org-columns-overlays
 	      (setq org-columns-overlays
 		    (org-delete-all line-overlays org-columns-overlays))
 		    (org-delete-all line-overlays org-columns-overlays))
-	      (mapc 'org-delete-overlay line-overlays)
+	      (mapc 'delete-overlay line-overlays)
 	      (org-columns-eval '(org-entry-put pom key nval)))
 	      (org-columns-eval '(org-entry-put pom key nval)))
 	  (org-columns-display-here)))
 	  (org-columns-display-here)))
       (org-move-to-column col)
       (org-move-to-column col)
@@ -918,15 +918,15 @@ Don't set this, this is meant for dynamic scoping.")
   (let (fmt val pos)
   (let (fmt val pos)
     (save-excursion
     (save-excursion
       (mapc (lambda (ov)
       (mapc (lambda (ov)
-	      (when (equal (org-overlay-get ov 'org-columns-key) property)
+	      (when (equal (overlay-get ov 'org-columns-key) property)
-		(setq pos (org-overlay-start ov))
+		(setq pos (overlay-start ov))
 		(goto-char pos)
 		(goto-char pos)
 		(when (setq val (cdr (assoc property
 		(when (setq val (cdr (assoc property
 					    (get-text-property
 					    (get-text-property
 					     (point-at-bol) 'org-summaries))))
 					     (point-at-bol) 'org-summaries))))
-		  (setq fmt (org-overlay-get ov 'org-columns-format))
+		  (setq fmt (overlay-get ov 'org-columns-format))
-		  (org-overlay-put ov 'org-columns-value val)
+		  (overlay-put ov 'org-columns-value val)
-		  (org-overlay-put ov 'display (format fmt val)))))
+		  (overlay-put ov 'display (format fmt val)))))
 	    org-columns-overlays))))
 	    org-columns-overlays))))
 
 
 (defun org-columns-compute (property)
 (defun org-columns-compute (property)

+ 2 - 26
lisp/org-compat.el

@@ -89,22 +89,8 @@ any other entries, and any resulting duplicates will be removed entirely."
 ;;;; Emacs/XEmacs compatibility
 ;;;; Emacs/XEmacs compatibility
 
 
 ;; Overlay compatibility functions
 ;; Overlay compatibility functions
-(defun org-make-overlay (beg end &optional buffer)
-  (if (featurep 'xemacs)
-      (make-extent beg end buffer)
-    (make-overlay beg end buffer)))
-(defun org-delete-overlay (ovl)
-  (if (featurep 'xemacs) (progn (delete-extent ovl) nil) (delete-overlay ovl)))
 (defun org-detach-overlay (ovl)
 (defun org-detach-overlay (ovl)
   (if (featurep 'xemacs) (detach-extent ovl) (delete-overlay ovl)))
   (if (featurep 'xemacs) (detach-extent ovl) (delete-overlay ovl)))
-(defun org-move-overlay (ovl beg end &optional buffer)
-  (if (featurep 'xemacs)
-      (set-extent-endpoints ovl beg end (or buffer (current-buffer)))
-    (move-overlay ovl beg end buffer)))
-(defun org-overlay-put (ovl prop value)
-  (if (featurep 'xemacs)
-      (set-extent-property ovl prop value)
-    (overlay-put ovl prop value)))
 (defun org-overlay-display (ovl text &optional face evap)
 (defun org-overlay-display (ovl text &optional face evap)
   "Make overlay OVL display TEXT with face FACE."
   "Make overlay OVL display TEXT with face FACE."
   (if (featurep 'xemacs)
   (if (featurep 'xemacs)
@@ -124,30 +110,20 @@ any other entries, and any resulting duplicates will be removed entirely."
     (if face (org-add-props text nil 'face face))
     (if face (org-add-props text nil 'face face))
     (overlay-put ovl 'before-string text)
     (overlay-put ovl 'before-string text)
     (if evap (overlay-put ovl 'evaporate t))))
     (if evap (overlay-put ovl 'evaporate t))))
-(defun org-overlay-get (ovl prop)
-  (if (featurep 'xemacs)
-      (extent-property ovl prop)
-    (overlay-get ovl prop)))
 (defun org-overlays-at (pos)
 (defun org-overlays-at (pos)
   (if (featurep 'xemacs) (extents-at pos) (overlays-at pos)))
   (if (featurep 'xemacs) (extents-at pos) (overlays-at pos)))
 (defun org-overlays-in (&optional start end)
 (defun org-overlays-in (&optional start end)
   (if (featurep 'xemacs)
   (if (featurep 'xemacs)
       (extent-list nil start end)
       (extent-list nil start end)
     (overlays-in start end)))
     (overlays-in start end)))
-(defun org-overlay-start (o)
-  (if (featurep 'xemacs) (extent-start-position o) (overlay-start o)))
-(defun org-overlay-end (o)
-  (if (featurep 'xemacs) (extent-end-position o) (overlay-end o)))
-(defun org-overlay-buffer (o)
-  (if (featurep 'xemacs) (extent-buffer o) (overlay-buffer o)))
 (defun org-find-overlays (prop &optional pos delete)
 (defun org-find-overlays (prop &optional pos delete)
   "Find all overlays specifying PROP at POS or point.
   "Find all overlays specifying PROP at POS or point.
 If DELETE is non-nil, delete all those overlays."
 If DELETE is non-nil, delete all those overlays."
   (let ((overlays (org-overlays-at (or pos (point))))
   (let ((overlays (org-overlays-at (or pos (point))))
 	ov found)
 	ov found)
     (while (setq ov (pop overlays))
     (while (setq ov (pop overlays))
-      (if (org-overlay-get ov prop)
+      (if (overlay-get ov prop)
-          (if delete (org-delete-overlay ov) (push ov found))))
+          (if delete (delete-overlay ov) (push ov found))))
     found))
     found))
 
 
 (defun org-add-hook (hook function &optional append local)
 (defun org-add-hook (hook function &optional append local)

+ 7 - 7
lisp/org-freemind.el

@@ -808,13 +808,13 @@ Otherwise give an error say the file exists."
                                      ".mm"))
                                      ".mm"))
             (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
             (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
        (list line mm-file))))
        (list line mm-file))))
-  (when (org-freemind-check-overwrite mm-file (called-interactively-p))
+  (when (org-freemind-check-overwrite mm-file (interactive-p))
     (let ((org-buffer (current-buffer))
     (let ((org-buffer (current-buffer))
           (mm-buffer (find-file-noselect mm-file)))
           (mm-buffer (find-file-noselect mm-file)))
       (org-freemind-write-mm-buffer org-buffer mm-buffer node-line)
       (org-freemind-write-mm-buffer org-buffer mm-buffer node-line)
       (with-current-buffer mm-buffer
       (with-current-buffer mm-buffer
         (basic-save-buffer)
         (basic-save-buffer)
-        (when (called-interactively-p)
+        (when (interactive-p)
           (switch-to-buffer-other-window mm-buffer)
           (switch-to-buffer-other-window mm-buffer)
           (when (y-or-n-p "Show in FreeMind? ")
           (when (y-or-n-p "Show in FreeMind? ")
             (org-freemind-show buffer-file-name)))))))
             (org-freemind-show buffer-file-name)))))))
@@ -832,13 +832,13 @@ Otherwise give an error say the file exists."
                             ".mm"))
                             ".mm"))
           (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
           (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
      (list org-file mm-file)))
      (list org-file mm-file)))
-  (when (org-freemind-check-overwrite mm-file (called-interactively-p))
+  (when (org-freemind-check-overwrite mm-file (interactive-p))
     (let ((org-buffer (if org-file (find-file-noselect org-file) (current-buffer)))
     (let ((org-buffer (if org-file (find-file-noselect org-file) (current-buffer)))
           (mm-buffer (find-file-noselect mm-file)))
           (mm-buffer (find-file-noselect mm-file)))
       (org-freemind-write-mm-buffer org-buffer mm-buffer nil)
       (org-freemind-write-mm-buffer org-buffer mm-buffer nil)
       (with-current-buffer mm-buffer
       (with-current-buffer mm-buffer
         (basic-save-buffer)
         (basic-save-buffer)
-        (when (called-interactively-p)
+        (when (interactive-p)
           (switch-to-buffer-other-window mm-buffer)
           (switch-to-buffer-other-window mm-buffer)
           (when (y-or-n-p "Show in FreeMind? ")
           (when (y-or-n-p "Show in FreeMind? ")
             (org-freemind-show buffer-file-name)))))))
             (org-freemind-show buffer-file-name)))))))
@@ -855,7 +855,7 @@ Otherwise give an error say the file exists."
                             "-sparse.mm"))
                             "-sparse.mm"))
           (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
           (mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
      (list (current-buffer) mm-file)))
      (list (current-buffer) mm-file)))
-  (when (org-freemind-check-overwrite mm-file (called-interactively-p))
+  (when (org-freemind-check-overwrite mm-file (interactive-p))
     (let (org-buffer
     (let (org-buffer
           (mm-buffer (find-file-noselect mm-file)))
           (mm-buffer (find-file-noselect mm-file)))
       (save-window-excursion
       (save-window-excursion
@@ -864,7 +864,7 @@ Otherwise give an error say the file exists."
       (org-freemind-write-mm-buffer org-buffer mm-buffer nil)
       (org-freemind-write-mm-buffer org-buffer mm-buffer nil)
       (with-current-buffer mm-buffer
       (with-current-buffer mm-buffer
         (basic-save-buffer)
         (basic-save-buffer)
-        (when (called-interactively-p)
+        (when (interactive-p)
           (switch-to-buffer-other-window mm-buffer)
           (switch-to-buffer-other-window mm-buffer)
           (when (y-or-n-p "Show in FreeMind? ")
           (when (y-or-n-p "Show in FreeMind? ")
             (org-freemind-show buffer-file-name)))))))
             (org-freemind-show buffer-file-name)))))))
@@ -1091,7 +1091,7 @@ PATH should be a list of steps, where each step has the form
             (default-org-file (concat (file-name-nondirectory mm-file) ".org"))
             (default-org-file (concat (file-name-nondirectory mm-file) ".org"))
             (org-file (read-file-name "Output org-mode file: " nil nil nil default-org-file)))
             (org-file (read-file-name "Output org-mode file: " nil nil nil default-org-file)))
        (list mm-file org-file))))
        (list mm-file org-file))))
-  (when (org-freemind-check-overwrite org-file (called-interactively-p))
+  (when (org-freemind-check-overwrite org-file (interactive-p))
     (let ((mm-buffer (find-file-noselect mm-file))
     (let ((mm-buffer (find-file-noselect mm-file))
           (org-buffer (find-file-noselect org-file)))
           (org-buffer (find-file-noselect org-file)))
       (with-current-buffer mm-buffer
       (with-current-buffer mm-buffer

+ 1 - 2
lisp/org-habit.el

@@ -30,8 +30,7 @@
 (require 'org)
 (require 'org)
 (require 'org-agenda)
 (require 'org-agenda)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
+  (require 'cl))
-  (require 'calendar))
 
 
 (defgroup org-habit nil
 (defgroup org-habit nil
   "Options concerning habit tracking in Org-mode."
   "Options concerning habit tracking in Org-mode."

+ 17 - 17
lisp/org-src.el

@@ -238,20 +238,20 @@ the edited version. Optional argument CONTEXT is used by
 	(when buffer
 	(when buffer
 	  (with-current-buffer buffer
 	  (with-current-buffer buffer
 	    (if (boundp 'org-edit-src-overlay)
 	    (if (boundp 'org-edit-src-overlay)
-		(org-delete-overlay org-edit-src-overlay)))
+		(delete-overlay org-edit-src-overlay)))
 	  (kill-buffer buffer))
 	  (kill-buffer buffer))
 	(setq buffer (generate-new-buffer
 	(setq buffer (generate-new-buffer
 		      (org-src-construct-edit-buffer-name (buffer-name) lang)))
 		      (org-src-construct-edit-buffer-name (buffer-name) lang)))
-	(setq ovl (org-make-overlay beg end))
+	(setq ovl (make-overlay beg end))
-	(org-overlay-put ovl 'edit-buffer buffer)
+	(overlay-put ovl 'edit-buffer buffer)
-	(org-overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
+	(overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
-	(org-overlay-put ovl 'face 'secondary-selection)
+	(overlay-put ovl 'face 'secondary-selection)
-	(org-overlay-put ovl
+	(overlay-put ovl
 			 'keymap
 			 'keymap
 			 (let ((map (make-sparse-keymap)))
 			 (let ((map (make-sparse-keymap)))
 			   (define-key map [mouse-1] 'org-edit-src-continue)
 			   (define-key map [mouse-1] 'org-edit-src-continue)
 			   map))
 			   map))
-	(org-overlay-put ovl :read-only "Leave me alone")
+	(overlay-put ovl :read-only "Leave me alone")
 	(org-src-switch-to-buffer buffer 'edit)
 	(org-src-switch-to-buffer buffer 'edit)
 	(if (eq single 'macro-definition)
 	(if (eq single 'macro-definition)
 	    (setq code (replace-regexp-in-string "\\\\n" "\n" code t t)))
 	    (setq code (replace-regexp-in-string "\\\\n" "\n" code t t)))
@@ -381,22 +381,22 @@ the fragment in the Org-mode buffer."
 	(when buffer
 	(when buffer
 	  (with-current-buffer buffer
 	  (with-current-buffer buffer
 	    (if (boundp 'org-edit-src-overlay)
 	    (if (boundp 'org-edit-src-overlay)
-		(org-delete-overlay org-edit-src-overlay)))
+		(delete-overlay org-edit-src-overlay)))
 	  (kill-buffer buffer))
 	  (kill-buffer buffer))
 	(setq buffer (generate-new-buffer
 	(setq buffer (generate-new-buffer
 		      (org-src-construct-edit-buffer-name
 		      (org-src-construct-edit-buffer-name
 		       (buffer-name) "Fixed Width")))
 		       (buffer-name) "Fixed Width")))
-	(setq ovl (org-make-overlay beg end))
+	(setq ovl (make-overlay beg end))
-	(org-overlay-put ovl 'face 'secondary-selection)
+	(overlay-put ovl 'face 'secondary-selection)
-	(org-overlay-put ovl 'edit-buffer buffer)
+	(overlay-put ovl 'edit-buffer buffer)
-	(org-overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
+	(overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
-	(org-overlay-put ovl 'face 'secondary-selection)
+	(overlay-put ovl 'face 'secondary-selection)
-	(org-overlay-put ovl
+	(overlay-put ovl
 			 'keymap
 			 'keymap
 			 (let ((map (make-sparse-keymap)))
 			 (let ((map (make-sparse-keymap)))
 			   (define-key map [mouse-1] 'org-edit-src-continue)
 			   (define-key map [mouse-1] 'org-edit-src-continue)
 			   map))
 			   map))
-	(org-overlay-put ovl :read-only "Leave me alone")
+	(overlay-put ovl :read-only "Leave me alone")
 	(switch-to-buffer buffer)
 	(switch-to-buffer buffer)
 	(insert code)
 	(insert code)
 	(remove-text-properties (point-min) (point-max)
 	(remove-text-properties (point-min) (point-max)
@@ -593,7 +593,7 @@ the language, a switch telling if the content should be in a single line."
     (goto-char beg)
     (goto-char beg)
     (if single (just-one-space))
     (if single (just-one-space))
     (if (memq t (mapcar (lambda (overlay)
     (if (memq t (mapcar (lambda (overlay)
-			  (eq (org-overlay-get overlay 'invisible)
+			  (eq (overlay-get overlay 'invisible)
 			      'org-hide-block))
 			      'org-hide-block))
 			(org-overlays-at (point))))
 			(org-overlays-at (point))))
 	;; Block is hidden; put point at start of block
 	;; Block is hidden; put point at start of block
@@ -633,7 +633,7 @@ the language, a switch telling if the content should be in a single line."
     (set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions)
     (set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions)
 	 '(org-edit-src-save))
 	 '(org-edit-src-save))
     (org-add-hook 'kill-buffer-hook
     (org-add-hook 'kill-buffer-hook
-		  '(lambda () (org-delete-overlay org-edit-src-overlay)) nil 'local)))
+		  '(lambda () (delete-overlay org-edit-src-overlay)) nil 'local)))
 
 
 (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)
 (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)
 
 

+ 7 - 7
lisp/org-table.el

@@ -3282,8 +3282,8 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
 
 
 (defun org-table-add-rectangle-overlay (beg end &optional face)
 (defun org-table-add-rectangle-overlay (beg end &optional face)
   "Add a new overlay."
   "Add a new overlay."
-  (let ((ov (org-make-overlay beg end)))
+  (let ((ov (make-overlay beg end)))
-    (org-overlay-put ov 'face (or face 'secondary-selection))
+    (overlay-put ov 'face (or face 'secondary-selection))
     (push ov org-table-rectangle-overlays)))
     (push ov org-table-rectangle-overlays)))
 
 
 (defun org-table-highlight-rectangle (&optional beg end face)
 (defun org-table-highlight-rectangle (&optional beg end face)
@@ -3318,7 +3318,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
   "Remove the rectangle overlays."
   "Remove the rectangle overlays."
   (unless org-inhibit-highlight-removal
   (unless org-inhibit-highlight-removal
     (remove-hook 'before-change-functions 'org-table-remove-rectangle-highlight)
     (remove-hook 'before-change-functions 'org-table-remove-rectangle-highlight)
-    (mapc 'org-delete-overlay org-table-rectangle-overlays)
+    (mapc 'delete-overlay org-table-rectangle-overlays)
     (setq org-table-rectangle-overlays nil)))
     (setq org-table-rectangle-overlays nil)))
 
 
 (defvar org-table-coordinate-overlays nil
 (defvar org-table-coordinate-overlays nil
@@ -3328,14 +3328,14 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
 (defun org-table-overlay-coordinates ()
 (defun org-table-overlay-coordinates ()
   "Add overlays to the table at point, to show row/column coordinates."
   "Add overlays to the table at point, to show row/column coordinates."
   (interactive)
   (interactive)
-  (mapc 'org-delete-overlay org-table-coordinate-overlays)
+  (mapc 'delete-overlay org-table-coordinate-overlays)
   (setq org-table-coordinate-overlays nil)
   (setq org-table-coordinate-overlays nil)
   (save-excursion
   (save-excursion
     (let ((id 0) (ih 0) hline eol s1 s2 str ic ov beg)
     (let ((id 0) (ih 0) hline eol s1 s2 str ic ov beg)
       (goto-char (org-table-begin))
       (goto-char (org-table-begin))
       (while (org-at-table-p)
       (while (org-at-table-p)
 	(setq eol (point-at-eol))
 	(setq eol (point-at-eol))
-	(setq ov (org-make-overlay (point-at-bol) (1+ (point-at-bol))))
+	(setq ov (make-overlay (point-at-bol) (1+ (point-at-bol))))
 	(push ov org-table-coordinate-overlays)
 	(push ov org-table-coordinate-overlays)
 	(setq hline (looking-at org-table-hline-regexp))
 	(setq hline (looking-at org-table-hline-regexp))
 	(setq str (if hline (format "I*%-2d" (setq ih (1+ ih)))
 	(setq str (if hline (format "I*%-2d" (setq ih (1+ ih)))
@@ -3349,7 +3349,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
 		  s1 (concat "$" (int-to-string ic))
 		  s1 (concat "$" (int-to-string ic))
 		  s2 (org-number-to-letters ic)
 		  s2 (org-number-to-letters ic)
 		  str (if (eq org-table-use-standard-references t) s2 s1))
 		  str (if (eq org-table-use-standard-references t) s2 s1))
-	    (setq ov (org-make-overlay beg (+ beg (length str))))
+	    (setq ov (make-overlay beg (+ beg (length str))))
 	    (push ov org-table-coordinate-overlays)
 	    (push ov org-table-coordinate-overlays)
 	    (org-overlay-display ov str 'org-special-keyword 'evaporate)))
 	    (org-overlay-display ov str 'org-special-keyword 'evaporate)))
 	(beginning-of-line 2)))))
 	(beginning-of-line 2)))))
@@ -3363,7 +3363,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
   (if (and (org-at-table-p) org-table-overlay-coordinates)
   (if (and (org-at-table-p) org-table-overlay-coordinates)
       (org-table-align))
       (org-table-align))
   (unless org-table-overlay-coordinates
   (unless org-table-overlay-coordinates
-    (mapc 'org-delete-overlay org-table-coordinate-overlays)
+    (mapc 'delete-overlay org-table-coordinate-overlays)
     (setq org-table-coordinate-overlays nil)))
     (setq org-table-coordinate-overlays nil)))
 
 
 (defun org-table-toggle-formula-debugger ()
 (defun org-table-toggle-formula-debugger ()

+ 1 - 2
lisp/org-wl.el

@@ -223,11 +223,10 @@ for namazu index."
    (let ((old-buf (current-buffer))
    (let ((old-buf (current-buffer))
 	 (old-point (point-marker)))
 	 (old-point (point-marker)))
      (wl-folder-goto-folder-subr folder)
      (wl-folder-goto-folder-subr folder)
-     (save-excursion
+     (with-current-buffer old-buf
 	;; XXX: `wl-folder-goto-folder-subr' moves point to the
 	;; XXX: `wl-folder-goto-folder-subr' moves point to the
 	;; beginning of the current line.  So, restore the point
 	;; beginning of the current line.  So, restore the point
 	;; in the old buffer.
 	;; in the old buffer.
-	(set-buffer old-buf)
 	(goto-char old-point))
 	(goto-char old-point))
      (and (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
      (and (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
 						  article))
 						  article))

+ 61 - 52
lisp/org.el

@@ -72,8 +72,19 @@
 
 
 (eval-when-compile
 (eval-when-compile
   (require 'cl)
   (require 'cl)
-  (require 'gnus-sum)
+  (require 'gnus-sum))
-  (require 'calendar))
+
+(require 'calendar)
+;; Emacs 22 calendar compatibility:  Make sure the new variables are available
+(unless (boundp 'calendar-view-holidays-initially-flag)
+  (defvaralias 'calendar-view-holidays-initially-flag
+    'view-calendar-holidays-initially))
+(unless (boundp 'calendar-view-diary-initially-flag)
+  (defvaralias 'calendar-view-diary-initially-flag
+    'view-diary-entries-initially))
+(unless (boundp 'diary-fancy-buffer)
+  (defvaralias 'diary-fancy-buffer 'fancy-diary-buffer))
+
 ;; For XEmacs, noutline is not yet provided by outline.el, so arrange for
 ;; For XEmacs, noutline is not yet provided by outline.el, so arrange for
 ;; the file noutline.el being loaded.
 ;; the file noutline.el being loaded.
 (if (featurep 'xemacs) (condition-case nil (require 'noutline)))
 (if (featurep 'xemacs) (condition-case nil (require 'noutline)))
@@ -83,6 +94,7 @@
 (require 'time-date)
 (require 'time-date)
 (unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
 (unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
 (require 'easymenu)
 (require 'easymenu)
+(require 'overlay)
 
 
 (require 'org-macs)
 (require 'org-macs)
 (require 'org-entities)
 (require 'org-entities)
@@ -3277,6 +3289,7 @@ Normal means no org-mode-specific context."
 (declare-function org-indent-mode "org-indent" (&optional arg))
 (declare-function org-indent-mode "org-indent" (&optional arg))
 (declare-function parse-time-string "parse-time" (string))
 (declare-function parse-time-string "parse-time" (string))
 (declare-function org-attach-reveal "org-attach" (&optional if-exists))
 (declare-function org-attach-reveal "org-attach" (&optional if-exists))
+(declare-function org-export-latex-fix-inputenc "org-latex" ())
 (defvar remember-data-file)
 (defvar remember-data-file)
 (defvar texmathp-why)
 (defvar texmathp-why)
 (declare-function speedbar-line-directory "speedbar" (&optional depth))
 (declare-function speedbar-line-directory "speedbar" (&optional depth))
@@ -5643,10 +5656,10 @@ This function is the default value of the hook `org-cycle-hook'."
   "Remove outline overlays that do not contain non-white stuff."
   "Remove outline overlays that do not contain non-white stuff."
   (mapc
   (mapc
    (lambda (o)
    (lambda (o)
-     (and (eq 'outline (org-overlay-get o 'invisible))
+     (and (eq 'outline (overlay-get o 'invisible))
-	  (not (string-match "\\S-" (buffer-substring (org-overlay-start o)
+	  (not (string-match "\\S-" (buffer-substring (overlay-start o)
-							(org-overlay-end o))))
+						      (overlay-end o))))
-	  (org-delete-overlay o)))
+	  (delete-overlay o)))
    (org-overlays-at pos)))
    (org-overlays-at pos)))
 
 
 (defun org-clean-visibility-after-subtree-move ()
 (defun org-clean-visibility-after-subtree-move ()
@@ -5809,9 +5822,9 @@ If USE-MARKERS is set, return the positions as markers."
 	(widen)
 	(widen)
 	(delq nil
 	(delq nil
 	      (mapcar (lambda (o)
 	      (mapcar (lambda (o)
-			(when (eq (org-overlay-get o 'invisible) 'outline)
+			(when (eq (overlay-get o 'invisible) 'outline)
-			  (setq beg (org-overlay-start o)
+			  (setq beg (overlay-start o)
-				end (org-overlay-end o))
+				end (overlay-end o))
 			  (and beg end (> end beg)
 			  (and beg end (> end beg)
 			       (if use-markers
 			       (if use-markers
 				   (cons (move-marker (make-marker) beg)
 				   (cons (move-marker (make-marker) beg)
@@ -5828,8 +5841,8 @@ DATA should have been made by `org-outline-overlay-data'."
 	(widen)
 	(widen)
 	(show-all)
 	(show-all)
 	(mapc (lambda (c)
 	(mapc (lambda (c)
-		(setq o (org-make-overlay (car c) (cdr c)))
+		(setq o (make-overlay (car c) (cdr c)))
-		(org-overlay-put o 'invisible 'outline))
+		(overlay-put o 'invisible 'outline))
 	      data)))))
 	      data)))))
 
 
 (defmacro org-save-outline-visibility (use-markers &rest body)
 (defmacro org-save-outline-visibility (use-markers &rest body)
@@ -5888,7 +5901,7 @@ the range."
 
 
 (defun org-show-block-all ()
 (defun org-show-block-all ()
   "Unfold all blocks in the current buffer."
   "Unfold all blocks in the current buffer."
-  (mapc 'org-delete-overlay org-hide-block-overlays)
+  (mapc 'delete-overlay org-hide-block-overlays)
   (setq org-hide-block-overlays nil))
   (setq org-hide-block-overlays nil))
 
 
 (defun org-hide-block-toggle-maybe ()
 (defun org-hide-block-toggle-maybe ()
@@ -5912,7 +5925,7 @@ the range."
               (end (match-end 0)) ;; end of entire body
               (end (match-end 0)) ;; end of entire body
               ov)
               ov)
           (if (memq t (mapcar (lambda (overlay)
           (if (memq t (mapcar (lambda (overlay)
-                                (eq (org-overlay-get overlay 'invisible)
+                                (eq (overlay-get overlay 'invisible)
 				    'org-hide-block))
 				    'org-hide-block))
                               (org-overlays-at start)))
                               (org-overlays-at start)))
               (if (or (not force) (eq force 'off))
               (if (or (not force) (eq force 'off))
@@ -5920,22 +5933,22 @@ the range."
                           (when (member ov org-hide-block-overlays)
                           (when (member ov org-hide-block-overlays)
                             (setq org-hide-block-overlays
                             (setq org-hide-block-overlays
                                   (delq ov org-hide-block-overlays)))
                                   (delq ov org-hide-block-overlays)))
-                          (when (eq (org-overlay-get ov 'invisible)
+                          (when (eq (overlay-get ov 'invisible)
                                     'org-hide-block)
                                     'org-hide-block)
-                            (org-delete-overlay ov)))
+                            (delete-overlay ov)))
                         (org-overlays-at start)))
                         (org-overlays-at start)))
-            (setq ov (org-make-overlay start end))
+            (setq ov (make-overlay start end))
-            (org-overlay-put ov 'invisible 'org-hide-block)
+            (overlay-put ov 'invisible 'org-hide-block)
             ;; make the block accessible to isearch
             ;; make the block accessible to isearch
-            (org-overlay-put
+            (overlay-put
              ov 'isearch-open-invisible
              ov 'isearch-open-invisible
              (lambda (ov)
              (lambda (ov)
                (when (member ov org-hide-block-overlays)
                (when (member ov org-hide-block-overlays)
                  (setq org-hide-block-overlays
                  (setq org-hide-block-overlays
                        (delq ov org-hide-block-overlays)))
                        (delq ov org-hide-block-overlays)))
-               (when (eq (org-overlay-get ov 'invisible)
+               (when (eq (overlay-get ov 'invisible)
                          'org-hide-block)
                          'org-hide-block)
-                 (org-delete-overlay ov))))
+                 (delete-overlay ov))))
             (push ov org-hide-block-overlays)))
             (push ov org-hide-block-overlays)))
       (error "Not looking at a source block"))))
       (error "Not looking at a source block"))))
 
 
@@ -11506,8 +11519,8 @@ entire tree."
 
 
 (defun org-highlight-new-match (beg end)
 (defun org-highlight-new-match (beg end)
   "Highlight from BEG to END and mark the highlight is an occur headline."
   "Highlight from BEG to END and mark the highlight is an occur headline."
-  (let ((ov (org-make-overlay beg end)))
+  (let ((ov (make-overlay beg end)))
-    (org-overlay-put ov 'face 'secondary-selection)
+    (overlay-put ov 'face 'secondary-selection)
     (push ov org-occur-highlights)))
     (push ov org-occur-highlights)))
 
 
 (defun org-remove-occur-highlights (&optional beg end noremove)
 (defun org-remove-occur-highlights (&optional beg end noremove)
@@ -11516,7 +11529,7 @@ BEG and END are ignored.  If NOREMOVE is nil, remove this function
 from the `before-change-functions' in the current buffer."
 from the `before-change-functions' in the current buffer."
   (interactive)
   (interactive)
   (unless org-inhibit-highlight-removal
   (unless org-inhibit-highlight-removal
-    (mapc 'org-delete-overlay org-occur-highlights)
+    (mapc 'delete-overlay org-occur-highlights)
     (setq org-occur-highlights nil)
     (setq org-occur-highlights nil)
     (setq org-occur-parameters nil)
     (setq org-occur-parameters nil)
     (unless noremove
     (unless noremove
@@ -12019,7 +12032,7 @@ epoch to the beginning of today (00:00)."
   (delq nil list))
   (delq nil list))
 
 
 (defvar org-add-colon-after-tag-completion nil)  ;; dynamically scoped param
 (defvar org-add-colon-after-tag-completion nil)  ;; dynamically scoped param
-(defvar org-tags-overlay (org-make-overlay 1 1))
+(defvar org-tags-overlay (make-overlay 1 1))
 (org-detach-overlay org-tags-overlay)
 (org-detach-overlay org-tags-overlay)
 
 
 (defun org-get-local-tags-at (&optional pos)
 (defun org-get-local-tags-at (&optional pos)
@@ -12395,7 +12408,7 @@ Returns the new tags string, or nil to not change the current settings."
 	       (if (> (current-column) org-tags-column)
 	       (if (> (current-column) org-tags-column)
 		   " "
 		   " "
 		 (make-string (- org-tags-column (current-column)) ?\ ))))))
 		 (make-string (- org-tags-column (current-column)) ?\ ))))))
-    (org-move-overlay org-tags-overlay ov-start ov-end)
+    (move-overlay org-tags-overlay ov-start ov-end)
     (save-window-excursion
     (save-window-excursion
       (if expert
       (if expert
 	  (set-buffer (get-buffer-create " *Org tags*"))
 	  (set-buffer (get-buffer-create " *Org tags*"))
@@ -13476,8 +13489,8 @@ So these are more for recording a certain time/date."
   (interactive "P")
   (interactive "P")
   (org-time-stamp arg 'inactive))
   (org-time-stamp arg 'inactive))
 
 
-(defvar org-date-ovl (org-make-overlay 1 1))
+(defvar org-date-ovl (make-overlay 1 1))
-(org-overlay-put org-date-ovl 'face 'org-warning)
+(overlay-put org-date-ovl 'face 'org-warning)
 (org-detach-overlay org-date-ovl)
 (org-detach-overlay org-date-ovl)
 
 
 (defvar org-ans1) ; dynamically scoped parameter
 (defvar org-ans1) ; dynamically scoped parameter
@@ -13556,9 +13569,7 @@ user."
 	 (calendar-frame-setup nil)
 	 (calendar-frame-setup nil)
 	 (calendar-move-hook nil)
 	 (calendar-move-hook nil)
 	 (calendar-view-diary-initially-flag nil)
 	 (calendar-view-diary-initially-flag nil)
-	 (view-diary-entries-initially nil)
 	 (calendar-view-holidays-initially-flag nil)
 	 (calendar-view-holidays-initially-flag nil)
-	 (view-calendar-holidays-initially nil)
 	 (timestr (format-time-string
 	 (timestr (format-time-string
 		   (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
 		   (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
 	 (prompt (concat (if prompt (concat prompt " ") "")
 	 (prompt (concat (if prompt (concat prompt " ") "")
@@ -13639,7 +13650,7 @@ user."
 	      (remove-hook 'post-command-hook 'org-read-date-display)
 	      (remove-hook 'post-command-hook 'org-read-date-display)
 	      (use-local-map old-map)
 	      (use-local-map old-map)
 	      (when org-read-date-overlay
 	      (when org-read-date-overlay
-		(org-delete-overlay org-read-date-overlay)
+		(delete-overlay org-read-date-overlay)
 		(setq org-read-date-overlay nil)))))))
 		(setq org-read-date-overlay nil)))))))
 
 
      (t ; Naked prompt only
      (t ; Naked prompt only
@@ -13647,7 +13658,7 @@ user."
 	  (setq ans (read-string prompt default-input
 	  (setq ans (read-string prompt default-input
 				 'org-read-date-history timestr))
 				 'org-read-date-history timestr))
 	(when org-read-date-overlay
 	(when org-read-date-overlay
-	  (org-delete-overlay org-read-date-overlay)
+	  (delete-overlay org-read-date-overlay)
 	  (setq org-read-date-overlay nil)))))
 	  (setq org-read-date-overlay nil)))))
 
 
     (setq final (org-read-date-analyze ans def defdecode))
     (setq final (org-read-date-analyze ans def defdecode))
@@ -13669,7 +13680,7 @@ user."
   "Display the current date prompt interpretation in the minibuffer."
   "Display the current date prompt interpretation in the minibuffer."
   (when org-read-date-display-live
   (when org-read-date-display-live
     (when org-read-date-overlay
     (when org-read-date-overlay
-      (org-delete-overlay org-read-date-overlay))
+      (delete-overlay org-read-date-overlay))
     (let ((p (point)))
     (let ((p (point)))
       (end-of-line 1)
       (end-of-line 1)
       (while (not (equal (buffer-substring
       (while (not (equal (buffer-substring
@@ -13697,7 +13708,7 @@ user."
       (when org-read-date-analyze-futurep
       (when org-read-date-analyze-futurep
 	(setq txt (concat txt " (=>F)")))
 	(setq txt (concat txt " (=>F)")))
       (setq org-read-date-overlay
       (setq org-read-date-overlay
-	    (org-make-overlay (1- (point-at-eol)) (point-at-eol)))
+	    (make-overlay (1- (point-at-eol)) (point-at-eol)))
       (org-overlay-display org-read-date-overlay txt 'secondary-selection))))
       (org-overlay-display org-read-date-overlay txt 'secondary-selection))))
 
 
 (defun org-read-date-analyze (ans def defdecode)
 (defun org-read-date-analyze (ans def defdecode)
@@ -13933,7 +13944,7 @@ Also, store the cursor date in variable org-ans2."
       (let* ((date (calendar-cursor-to-date))
       (let* ((date (calendar-cursor-to-date))
 	     (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
 	     (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
 	(setq org-ans2 (format-time-string "%Y-%m-%d" time))))
 	(setq org-ans2 (format-time-string "%Y-%m-%d" time))))
-    (org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
+    (move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
     (select-window sw)
     (select-window sw)
     (org-select-frame-set-input-focus sf)))
     (org-select-frame-set-input-focus sf)))
 
 
@@ -14618,9 +14629,7 @@ A prefix ARG can be used to force the current date."
   (let ((tsr org-ts-regexp) diff
   (let ((tsr org-ts-regexp) diff
 	(calendar-move-hook nil)
 	(calendar-move-hook nil)
 	(calendar-view-holidays-initially-flag nil)
 	(calendar-view-holidays-initially-flag nil)
-	(view-calendar-holidays-initially nil)
+	(calendar-view-diary-initially-flag nil))
-	(calendar-view-diary-initially-flag nil)
-	(view-diary-entries-initially nil))
     (if (or (org-at-timestamp-p)
     (if (or (org-at-timestamp-p)
 	    (save-excursion
 	    (save-excursion
 	      (beginning-of-line 1)
 	      (beginning-of-line 1)
@@ -15153,7 +15162,7 @@ Revert to the normal definition outside of these fragments."
 
 
 (defun org-remove-latex-fragment-image-overlays ()
 (defun org-remove-latex-fragment-image-overlays ()
   "Remove all overlays with LaTeX fragment images in current buffer."
   "Remove all overlays with LaTeX fragment images in current buffer."
-  (mapc 'org-delete-overlay org-latex-fragment-image-overlays)
+  (mapc 'delete-overlay org-latex-fragment-image-overlays)
   (setq org-latex-fragment-image-overlays nil))
   (setq org-latex-fragment-image-overlays nil))
 
 
 (defun org-preview-latex-fragment (&optional subtree)
 (defun org-preview-latex-fragment (&optional subtree)
@@ -15271,19 +15280,19 @@ Some of the options can be changed using the variable
 	    (if overlays
 	    (if overlays
 		(progn
 		(progn
 		  (mapc (lambda (o)
 		  (mapc (lambda (o)
-			  (if (eq (org-overlay-get o 'org-overlay-type)
+			  (if (eq (overlay-get o 'org-overlay-type)
 				  'org-latex-overlay)
 				  'org-latex-overlay)
-			      (org-delete-overlay o)))
+			      (delete-overlay o)))
 			(org-overlays-in beg end))
 			(org-overlays-in beg end))
-		  (setq ov (org-make-overlay beg end))
+		  (setq ov (make-overlay beg end))
-		  (org-overlay-put ov 'org-overlay-type 'org-latex-overlay)
+		  (overlay-put ov 'org-overlay-type 'org-latex-overlay)
 		  (if (featurep 'xemacs)
 		  (if (featurep 'xemacs)
 		      (progn
 		      (progn
-			(org-overlay-put ov 'invisible t)
+			(overlay-put ov 'invisible t)
-			(org-overlay-put
+			(overlay-put
 			 ov 'end-glyph
 			 ov 'end-glyph
 			 (make-glyph (vector 'png :file movefile))))
 			 (make-glyph (vector 'png :file movefile))))
-		    (org-overlay-put
+		    (overlay-put
 		     ov 'display
 		     ov 'display
 		     (list 'image :type 'png :file movefile :ascent 'center)))
 		     (list 'image :type 'png :file movefile :ascent 'center)))
 		  (push ov org-latex-fragment-image-overlays)
 		  (push ov org-latex-fragment-image-overlays)
@@ -17318,9 +17327,9 @@ and :keyword."
 			    (if (memq x org-latex-fragment-image-overlays) x))
 			    (if (memq x org-latex-fragment-image-overlays) x))
 			  (org-overlays-at (point))))))
 			  (org-overlays-at (point))))))
       (push (list :latex-fragment
       (push (list :latex-fragment
-		  (org-overlay-start o) (org-overlay-end o)) clist)
+		  (overlay-start o) (overlay-end o)) clist)
       (push (list :latex-preview
       (push (list :latex-preview
-		  (org-overlay-start o) (org-overlay-end o)) clist))
+		  (overlay-start o) (overlay-end o)) clist))
      ((org-inside-LaTeX-fragment-p)
      ((org-inside-LaTeX-fragment-p)
       ;; FIXME: positions wrong.
       ;; FIXME: positions wrong.
       (push (list :latex-fragment (point) (point)) clist)))
       (push (list :latex-fragment (point) (point)) clist)))
@@ -18459,11 +18468,11 @@ if no description is present"
 
 
 ;; Speedbar support
 ;; Speedbar support
 
 
-(defvar org-speedbar-restriction-lock-overlay (org-make-overlay 1 1)
+(defvar org-speedbar-restriction-lock-overlay (make-overlay 1 1)
   "Overlay marking the agenda restriction line in speedbar.")
   "Overlay marking the agenda restriction line in speedbar.")
-(org-overlay-put org-speedbar-restriction-lock-overlay
+(overlay-put org-speedbar-restriction-lock-overlay
 		 'face 'org-agenda-restriction-lock)
 		 'face 'org-agenda-restriction-lock)
-(org-overlay-put org-speedbar-restriction-lock-overlay
+(overlay-put org-speedbar-restriction-lock-overlay
 		 'help-echo "Agendas are currently limited to this item.")
 		 'help-echo "Agendas are currently limited to this item.")
 (org-detach-overlay org-speedbar-restriction-lock-overlay)
 (org-detach-overlay org-speedbar-restriction-lock-overlay)
 
 
@@ -18496,8 +18505,8 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
 	  (error "Cannot restrict to non-Org-mode file"))
 	  (error "Cannot restrict to non-Org-mode file"))
 	(org-agenda-set-restriction-lock 'file)))
 	(org-agenda-set-restriction-lock 'file)))
      (t (error "Don't know how to restrict Org-mode's agenda")))
      (t (error "Don't know how to restrict Org-mode's agenda")))
-    (org-move-overlay org-speedbar-restriction-lock-overlay
+    (move-overlay org-speedbar-restriction-lock-overlay
-		      (point-at-bol) (point-at-eol))
+		  (point-at-bol) (point-at-eol))
     (setq current-prefix-arg nil)
     (setq current-prefix-arg nil)
     (org-agenda-maybe-redo)))
     (org-agenda-maybe-redo)))