|
@@ -82,7 +82,7 @@
|
|
|
(require 'time-date)
|
|
|
(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
|
|
|
(require 'easymenu)
|
|
|
-(require 'calendar)
|
|
|
+(require 'overlay)
|
|
|
|
|
|
(require 'org-macs)
|
|
|
(require 'org-entities)
|
|
@@ -5643,10 +5643,10 @@ This function is the default value of the hook `org-cycle-hook'."
|
|
|
"Remove outline overlays that do not contain non-white stuff."
|
|
|
(mapc
|
|
|
(lambda (o)
|
|
|
- (and (eq 'outline (org-overlay-get o 'invisible))
|
|
|
- (not (string-match "\\S-" (buffer-substring (org-overlay-start o)
|
|
|
- (org-overlay-end o))))
|
|
|
- (org-delete-overlay o)))
|
|
|
+ (and (eq 'outline (overlay-get o 'invisible))
|
|
|
+ (not (string-match "\\S-" (buffer-substring (overlay-start o)
|
|
|
+ (overlay-end o))))
|
|
|
+ (delete-overlay o)))
|
|
|
(org-overlays-at pos)))
|
|
|
|
|
|
(defun org-clean-visibility-after-subtree-move ()
|
|
@@ -5809,9 +5809,9 @@ If USE-MARKERS is set, return the positions as markers."
|
|
|
(widen)
|
|
|
(delq nil
|
|
|
(mapcar (lambda (o)
|
|
|
- (when (eq (org-overlay-get o 'invisible) 'outline)
|
|
|
- (setq beg (org-overlay-start o)
|
|
|
- end (org-overlay-end o))
|
|
|
+ (when (eq (overlay-get o 'invisible) 'outline)
|
|
|
+ (setq beg (overlay-start o)
|
|
|
+ end (overlay-end o))
|
|
|
(and beg end (> end beg)
|
|
|
(if use-markers
|
|
|
(cons (move-marker (make-marker) beg)
|
|
@@ -5828,8 +5828,8 @@ DATA should have been made by `org-outline-overlay-data'."
|
|
|
(widen)
|
|
|
(show-all)
|
|
|
(mapc (lambda (c)
|
|
|
- (setq o (org-make-overlay (car c) (cdr c)))
|
|
|
- (org-overlay-put o 'invisible 'outline))
|
|
|
+ (setq o (make-overlay (car c) (cdr c)))
|
|
|
+ (overlay-put o 'invisible 'outline))
|
|
|
data)))))
|
|
|
|
|
|
(defmacro org-save-outline-visibility (use-markers &rest body)
|
|
@@ -5888,7 +5888,7 @@ the range."
|
|
|
|
|
|
(defun org-show-block-all ()
|
|
|
"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))
|
|
|
|
|
|
(defun org-hide-block-toggle-maybe ()
|
|
@@ -5912,7 +5912,7 @@ the range."
|
|
|
(end (match-end 0)) ;; end of entire body
|
|
|
ov)
|
|
|
(if (memq t (mapcar (lambda (overlay)
|
|
|
- (eq (org-overlay-get overlay 'invisible)
|
|
|
+ (eq (overlay-get overlay 'invisible)
|
|
|
'org-hide-block))
|
|
|
(org-overlays-at start)))
|
|
|
(if (or (not force) (eq force 'off))
|
|
@@ -5920,22 +5920,22 @@ the range."
|
|
|
(when (member ov org-hide-block-overlays)
|
|
|
(setq 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-delete-overlay ov)))
|
|
|
+ (delete-overlay ov)))
|
|
|
(org-overlays-at start)))
|
|
|
- (setq ov (org-make-overlay start end))
|
|
|
- (org-overlay-put ov 'invisible 'org-hide-block)
|
|
|
+ (setq ov (make-overlay start end))
|
|
|
+ (overlay-put ov 'invisible 'org-hide-block)
|
|
|
;; make the block accessible to isearch
|
|
|
- (org-overlay-put
|
|
|
+ (overlay-put
|
|
|
ov 'isearch-open-invisible
|
|
|
(lambda (ov)
|
|
|
(when (member ov org-hide-block-overlays)
|
|
|
(setq 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-delete-overlay ov))))
|
|
|
+ (delete-overlay ov))))
|
|
|
(push ov org-hide-block-overlays)))
|
|
|
(error "Not looking at a source block"))))
|
|
|
|
|
@@ -11506,8 +11506,8 @@ entire tree."
|
|
|
|
|
|
(defun org-highlight-new-match (beg end)
|
|
|
"Highlight from BEG to END and mark the highlight is an occur headline."
|
|
|
- (let ((ov (org-make-overlay beg end)))
|
|
|
- (org-overlay-put ov 'face 'secondary-selection)
|
|
|
+ (let ((ov (make-overlay beg end)))
|
|
|
+ (overlay-put ov 'face 'secondary-selection)
|
|
|
(push ov org-occur-highlights)))
|
|
|
|
|
|
(defun org-remove-occur-highlights (&optional beg end noremove)
|
|
@@ -11516,7 +11516,7 @@ BEG and END are ignored. If NOREMOVE is nil, remove this function
|
|
|
from the `before-change-functions' in the current buffer."
|
|
|
(interactive)
|
|
|
(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-parameters nil)
|
|
|
(unless noremove
|
|
@@ -12019,7 +12019,7 @@ epoch to the beginning of today (00:00)."
|
|
|
(delq nil list))
|
|
|
|
|
|
(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)
|
|
|
|
|
|
(defun org-get-local-tags-at (&optional pos)
|
|
@@ -12395,7 +12395,7 @@ Returns the new tags string, or nil to not change the current settings."
|
|
|
(if (> (current-column) org-tags-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
|
|
|
(if expert
|
|
|
(set-buffer (get-buffer-create " *Org tags*"))
|
|
@@ -13476,8 +13476,8 @@ So these are more for recording a certain time/date."
|
|
|
(interactive "P")
|
|
|
(org-time-stamp arg 'inactive))
|
|
|
|
|
|
-(defvar org-date-ovl (org-make-overlay 1 1))
|
|
|
-(org-overlay-put org-date-ovl 'face 'org-warning)
|
|
|
+(defvar org-date-ovl (make-overlay 1 1))
|
|
|
+(overlay-put org-date-ovl 'face 'org-warning)
|
|
|
(org-detach-overlay org-date-ovl)
|
|
|
|
|
|
(defvar org-ans1) ; dynamically scoped parameter
|
|
@@ -13639,7 +13639,7 @@ user."
|
|
|
(remove-hook 'post-command-hook 'org-read-date-display)
|
|
|
(use-local-map old-map)
|
|
|
(when org-read-date-overlay
|
|
|
- (org-delete-overlay org-read-date-overlay)
|
|
|
+ (delete-overlay org-read-date-overlay)
|
|
|
(setq org-read-date-overlay nil)))))))
|
|
|
|
|
|
(t ; Naked prompt only
|
|
@@ -13647,7 +13647,7 @@ user."
|
|
|
(setq ans (read-string prompt default-input
|
|
|
'org-read-date-history timestr))
|
|
|
(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 final (org-read-date-analyze ans def defdecode))
|
|
@@ -13669,7 +13669,7 @@ user."
|
|
|
"Display the current date prompt interpretation in the minibuffer."
|
|
|
(when org-read-date-display-live
|
|
|
(when org-read-date-overlay
|
|
|
- (org-delete-overlay org-read-date-overlay))
|
|
|
+ (delete-overlay org-read-date-overlay))
|
|
|
(let ((p (point)))
|
|
|
(end-of-line 1)
|
|
|
(while (not (equal (buffer-substring
|
|
@@ -13697,7 +13697,7 @@ user."
|
|
|
(when org-read-date-analyze-futurep
|
|
|
(setq txt (concat txt " (=>F)")))
|
|
|
(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))))
|
|
|
|
|
|
(defun org-read-date-analyze (ans def defdecode)
|
|
@@ -13933,7 +13933,7 @@ Also, store the cursor date in variable org-ans2."
|
|
|
(let* ((date (calendar-cursor-to-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))))
|
|
|
- (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)
|
|
|
(org-select-frame-set-input-focus sf)))
|
|
|
|
|
@@ -15153,7 +15153,7 @@ Revert to the normal definition outside of these fragments."
|
|
|
|
|
|
(defun org-remove-latex-fragment-image-overlays ()
|
|
|
"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))
|
|
|
|
|
|
(defun org-preview-latex-fragment (&optional subtree)
|
|
@@ -15271,19 +15271,19 @@ Some of the options can be changed using the variable
|
|
|
(if overlays
|
|
|
(progn
|
|
|
(mapc (lambda (o)
|
|
|
- (if (eq (org-overlay-get o 'org-overlay-type)
|
|
|
+ (if (eq (overlay-get o 'org-overlay-type)
|
|
|
'org-latex-overlay)
|
|
|
- (org-delete-overlay o)))
|
|
|
+ (delete-overlay o)))
|
|
|
(org-overlays-in beg end))
|
|
|
- (setq ov (org-make-overlay beg end))
|
|
|
- (org-overlay-put ov 'org-overlay-type 'org-latex-overlay)
|
|
|
+ (setq ov (make-overlay beg end))
|
|
|
+ (overlay-put ov 'org-overlay-type 'org-latex-overlay)
|
|
|
(if (featurep 'xemacs)
|
|
|
(progn
|
|
|
- (org-overlay-put ov 'invisible t)
|
|
|
- (org-overlay-put
|
|
|
+ (overlay-put ov 'invisible t)
|
|
|
+ (overlay-put
|
|
|
ov 'end-glyph
|
|
|
(make-glyph (vector 'png :file movefile))))
|
|
|
- (org-overlay-put
|
|
|
+ (overlay-put
|
|
|
ov 'display
|
|
|
(list 'image :type 'png :file movefile :ascent 'center)))
|
|
|
(push ov org-latex-fragment-image-overlays)
|
|
@@ -17318,9 +17318,9 @@ and :keyword."
|
|
|
(if (memq x org-latex-fragment-image-overlays) x))
|
|
|
(org-overlays-at (point))))))
|
|
|
(push (list :latex-fragment
|
|
|
- (org-overlay-start o) (org-overlay-end o)) clist)
|
|
|
+ (overlay-start o) (overlay-end o)) clist)
|
|
|
(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)
|
|
|
;; FIXME: positions wrong.
|
|
|
(push (list :latex-fragment (point) (point)) clist)))
|
|
@@ -18459,11 +18459,11 @@ if no description is present"
|
|
|
|
|
|
;; 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.")
|
|
|
-(org-overlay-put org-speedbar-restriction-lock-overlay
|
|
|
+(overlay-put org-speedbar-restriction-lock-overlay
|
|
|
'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.")
|
|
|
(org-detach-overlay org-speedbar-restriction-lock-overlay)
|
|
|
|
|
@@ -18496,8 +18496,8 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
|
|
|
(error "Cannot restrict to non-Org-mode file"))
|
|
|
(org-agenda-set-restriction-lock 'file)))
|
|
|
(t (error "Don't know how to restrict Org-mode's agenda")))
|
|
|
- (org-move-overlay org-speedbar-restriction-lock-overlay
|
|
|
- (point-at-bol) (point-at-eol))
|
|
|
+ (move-overlay org-speedbar-restriction-lock-overlay
|
|
|
+ (point-at-bol) (point-at-eol))
|
|
|
(setq current-prefix-arg nil)
|
|
|
(org-agenda-maybe-redo)))
|
|
|
|