aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKatsumi Yamaoka2015-08-19 09:06:40 +0000
committerKatsumi Yamaoka2015-08-19 09:06:40 +0000
commita83be20b2f3b1ad499c7584caa08434cc66bb98f (patch)
tree94c6afeab0f14fade290e3ef6fb6545a413f49a0 /lisp
parent62661fe759dfc826f31b032e49f0f15b40a207d5 (diff)
downloademacs-a83be20b2f3b1ad499c7584caa08434cc66bb98f.tar.gz
emacs-a83be20b2f3b1ad499c7584caa08434cc66bb98f.zip
[Gnus]: Use overlay functions directly
* lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-art.el52
-rw-r--r--lisp/gnus/gnus-cite.el14
-rw-r--r--lisp/gnus/gnus-html.el18
-rw-r--r--lisp/gnus/gnus-salt.el10
-rw-r--r--lisp/gnus/gnus-sum.el28
-rw-r--r--lisp/gnus/gnus-util.el10
-rw-r--r--lisp/gnus/gnus.el11
-rw-r--r--lisp/gnus/message.el17
-rw-r--r--lisp/gnus/mm-decode.el7
-rw-r--r--lisp/gnus/sieve.el24
10 files changed, 71 insertions, 120 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index ffe9a211417..b26fe06735f 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5403,9 +5403,9 @@ Compressed files like .gz and .bz2 are decompressed."
5403 'gnus-undeletable t)))) 5403 'gnus-undeletable t))))
5404 ;; We're in the article header. 5404 ;; We're in the article header.
5405 (delete-char -1) 5405 (delete-char -1)
5406 (dolist (ovl (gnus-overlays-in btn (point))) 5406 (dolist (ovl (overlays-in btn (point)))
5407 (gnus-overlay-put ovl 'gnus-button-attachment-extra t) 5407 (overlay-put ovl 'gnus-button-attachment-extra t)
5408 (gnus-overlay-put ovl 'face nil)) 5408 (overlay-put ovl 'face nil))
5409 (save-restriction 5409 (save-restriction
5410 (message-narrow-to-field) 5410 (message-narrow-to-field)
5411 (let ((gnus-treatment-function-alist 5411 (let ((gnus-treatment-function-alist
@@ -5798,9 +5798,9 @@ all parts."
5798 'gnus-undeletable t)))) 5798 'gnus-undeletable t))))
5799 ;; We're in the article header. 5799 ;; We're in the article header.
5800 (delete-char -1) 5800 (delete-char -1)
5801 (dolist (ovl (gnus-overlays-in point (point))) 5801 (dolist (ovl (overlays-in point (point)))
5802 (gnus-overlay-put ovl 'gnus-button-attachment-extra t) 5802 (overlay-put ovl 'gnus-button-attachment-extra t)
5803 (gnus-overlay-put ovl 'face nil)) 5803 (overlay-put ovl 'face nil))
5804 (save-restriction 5804 (save-restriction
5805 (message-narrow-to-field) 5805 (message-narrow-to-field)
5806 (let ((gnus-treatment-function-alist 5806 (let ((gnus-treatment-function-alist
@@ -5889,8 +5889,8 @@ all parts."
5889 (1- (point)) 5889 (1- (point))
5890 (point))) 5890 (point)))
5891 (when gnus-article-button-face 5891 (when gnus-article-button-face
5892 (gnus-overlay-put (gnus-make-overlay b e nil t) 5892 (overlay-put (make-overlay b e nil t)
5893 'face gnus-article-button-face)) 5893 'face gnus-article-button-face))
5894 (widget-convert-button 5894 (widget-convert-button
5895 'link b e 5895 'link b e
5896 :mime-handle handle 5896 :mime-handle handle
@@ -6452,9 +6452,9 @@ in the body. Use `gnus-header-face-alist' to highlight buttons."
6452 (insert "\n") 6452 (insert "\n")
6453 (end-of-line))) 6453 (end-of-line)))
6454 (insert "\n") 6454 (insert "\n")
6455 (dolist (ovl (gnus-overlays-in (point-min) (point))) 6455 (dolist (ovl (overlays-in (point-min) (point)))
6456 (gnus-overlay-put ovl 'gnus-button-attachment-extra t) 6456 (overlay-put ovl 'gnus-button-attachment-extra t)
6457 (gnus-overlay-put ovl 'face nil)) 6457 (overlay-put ovl 'face nil))
6458 (let ((gnus-treatment-function-alist 6458 (let ((gnus-treatment-function-alist
6459 '((gnus-treat-highlight-headers 6459 '((gnus-treat-highlight-headers
6460 gnus-article-highlight-headers)))) 6460 gnus-article-highlight-headers))))
@@ -8037,8 +8037,8 @@ It does this by highlighting everything after
8037 (save-restriction 8037 (save-restriction
8038 (when (and gnus-signature-face 8038 (when (and gnus-signature-face
8039 (gnus-article-narrow-to-signature)) 8039 (gnus-article-narrow-to-signature))
8040 (gnus-overlay-put (gnus-make-overlay (point-min) (point-max) nil t) 8040 (overlay-put (make-overlay (point-min) (point-max) nil t)
8041 'face gnus-signature-face) 8041 'face gnus-signature-face)
8042 (widen) 8042 (widen)
8043 (gnus-article-search-signature) 8043 (gnus-article-search-signature)
8044 (let ((start (match-beginning 0)) 8044 (let ((start (match-beginning 0))
@@ -8136,12 +8136,12 @@ url is put as the `gnus-button-url' overlay property on the button."
8136 'gnus-button-push 8136 'gnus-button-push
8137 (list beg (assq 'gnus-button-url-regexp 8137 (list beg (assq 'gnus-button-url-regexp
8138 gnus-button-alist))))) 8138 gnus-button-alist)))))
8139 (let ((overlay (gnus-make-overlay start end))) 8139 (let ((overlay (make-overlay start end)))
8140 (gnus-overlay-put overlay 'evaporate t) 8140 (overlay-put overlay 'evaporate t)
8141 (gnus-overlay-put overlay 'gnus-button-url 8141 (overlay-put overlay 'gnus-button-url
8142 (list (mapconcat 'identity (nreverse url) ""))) 8142 (list (mapconcat 'identity (nreverse url) "")))
8143 (when gnus-article-mouse-face 8143 (when gnus-article-mouse-face
8144 (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face))) 8144 (overlay-put overlay 'mouse-face gnus-article-mouse-face)))
8145 t) 8145 t)
8146 (goto-char opoint)))) 8146 (goto-char opoint))))
8147 8147
@@ -8180,8 +8180,8 @@ url is put as the `gnus-button-url' overlay property on the button."
8180(defun gnus-article-add-button (from to fun &optional data text) 8180(defun gnus-article-add-button (from to fun &optional data text)
8181 "Create a button between FROM and TO with callback FUN and data DATA." 8181 "Create a button between FROM and TO with callback FUN and data DATA."
8182 (when gnus-article-button-face 8182 (when gnus-article-button-face
8183 (gnus-overlay-put (gnus-make-overlay from to nil t) 8183 (overlay-put (make-overlay from to nil t)
8184 'face gnus-article-button-face)) 8184 'face gnus-article-button-face))
8185 (gnus-add-text-properties 8185 (gnus-add-text-properties
8186 from to 8186 from to
8187 (nconc (and gnus-article-mouse-face 8187 (nconc (and gnus-article-mouse-face
@@ -8520,8 +8520,8 @@ url is put as the `gnus-button-url' overlay property on the button."
8520 (1- (point)) 8520 (1- (point))
8521 (point))) 8521 (point)))
8522 (when gnus-article-button-face 8522 (when gnus-article-button-face
8523 (gnus-overlay-put (gnus-make-overlay b e nil t) 8523 (overlay-put (make-overlay b e nil t)
8524 'face gnus-article-button-face)) 8524 'face gnus-article-button-face))
8525 (widget-convert-button 8525 (widget-convert-button
8526 'link b e 8526 'link b e
8527 :action 'gnus-button-prev-page 8527 :action 'gnus-button-prev-page
@@ -8556,8 +8556,8 @@ url is put as the `gnus-button-url' overlay property on the button."
8556 (1- (point)) 8556 (1- (point))
8557 (point))) 8557 (point)))
8558 (when gnus-article-button-face 8558 (when gnus-article-button-face
8559 (gnus-overlay-put (gnus-make-overlay b e nil t) 8559 (overlay-put (make-overlay b e nil t)
8560 'face gnus-article-button-face)) 8560 'face gnus-article-button-face))
8561 (widget-convert-button 8561 (widget-convert-button
8562 'link b e 8562 'link b e
8563 :action 'gnus-button-next-page 8563 :action 'gnus-button-next-page
@@ -8952,8 +8952,8 @@ For example:
8952 (1- (point)) 8952 (1- (point))
8953 (point))) 8953 (point)))
8954 (when gnus-article-button-face 8954 (when gnus-article-button-face
8955 (gnus-overlay-put (gnus-make-overlay b e nil t) 8955 (overlay-put (make-overlay b e nil t)
8956 'face gnus-article-button-face)) 8956 'face gnus-article-button-face))
8957 (widget-convert-button 8957 (widget-convert-button
8958 'link b e 8958 'link b e
8959 :mime-handle handle 8959 :mime-handle handle
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index d8ee35d3e97..57fc2816155 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -786,12 +786,12 @@ See also the documentation for `gnus-article-highlight-citation'."
786(defun gnus-cite-delete-overlays () 786(defun gnus-cite-delete-overlays ()
787 (dolist (overlay gnus-cite-overlay-list) 787 (dolist (overlay gnus-cite-overlay-list)
788 (ignore-errors 788 (ignore-errors
789 (when (or (not (gnus-overlay-end overlay)) 789 (when (or (not (overlay-end overlay))
790 (and (>= (gnus-overlay-end overlay) (point-min)) 790 (and (>= (overlay-end overlay) (point-min))
791 (<= (gnus-overlay-end overlay) (point-max)))) 791 (<= (overlay-end overlay) (point-max))))
792 (setq gnus-cite-overlay-list (delete overlay gnus-cite-overlay-list)) 792 (setq gnus-cite-overlay-list (delete overlay gnus-cite-overlay-list))
793 (ignore-errors 793 (ignore-errors
794 (gnus-delete-overlay overlay)))))) 794 (delete-overlay overlay))))))
795 795
796(defun gnus-cite-parse-wrapper () 796(defun gnus-cite-parse-wrapper ()
797 ;; Wrap chopped gnus-cite-parse. 797 ;; Wrap chopped gnus-cite-parse.
@@ -1096,10 +1096,10 @@ See also the documentation for `gnus-article-highlight-citation'."
1096 (skip-chars-backward " \t") 1096 (skip-chars-backward " \t")
1097 (setq to (point)) 1097 (setq to (point))
1098 (when (< from to) 1098 (when (< from to)
1099 (push (setq overlay (gnus-make-overlay from to nil t)) 1099 (push (setq overlay (make-overlay from to nil t))
1100 gnus-cite-overlay-list) 1100 gnus-cite-overlay-list)
1101 (gnus-overlay-put overlay 'evaporate t) 1101 (overlay-put overlay 'evaporate t)
1102 (gnus-overlay-put overlay 'face face)))))) 1102 (overlay-put overlay 'face face))))))
1103 1103
1104(defun gnus-cite-toggle (prefix) 1104(defun gnus-cite-toggle (prefix)
1105 (with-current-buffer gnus-article-buffer 1105 (with-current-buffer gnus-article-buffer
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index b706de7430e..bedf7e40b10 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -307,12 +307,12 @@ Use ALT-TEXT for the image string."
307 (gnus-article-add-button start end 307 (gnus-article-add-button start end
308 'browse-url (mm-url-decode-entities-string url) 308 'browse-url (mm-url-decode-entities-string url)
309 url) 309 url)
310 (let ((overlay (gnus-make-overlay start end))) 310 (let ((overlay (make-overlay start end)))
311 (gnus-overlay-put overlay 'evaporate t) 311 (overlay-put overlay 'evaporate t)
312 (gnus-overlay-put overlay 'gnus-button-url url) 312 (overlay-put overlay 'gnus-button-url url)
313 (gnus-put-text-property start end 'gnus-string url) 313 (gnus-put-text-property start end 'gnus-string url)
314 (when gnus-article-mouse-face 314 (when gnus-article-mouse-face
315 (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face))))) 315 (overlay-put overlay 'mouse-face gnus-article-mouse-face)))))
316 ;; The upper-case IMG_ALT is apparently just an artifact that 316 ;; The upper-case IMG_ALT is apparently just an artifact that
317 ;; should be deleted. 317 ;; should be deleted.
318 ((equal tag "IMG_ALT") 318 ((equal tag "IMG_ALT")
@@ -320,19 +320,19 @@ Use ALT-TEXT for the image string."
320 ;; w3m does not normalize the case 320 ;; w3m does not normalize the case
321 ((or (equal tag "b") 321 ((or (equal tag "b")
322 (equal tag "B")) 322 (equal tag "B"))
323 (gnus-overlay-put (gnus-make-overlay start end) 'face 'gnus-emphasis-bold)) 323 (overlay-put (make-overlay start end) 'face 'gnus-emphasis-bold))
324 ((or (equal tag "u") 324 ((or (equal tag "u")
325 (equal tag "U")) 325 (equal tag "U"))
326 (gnus-overlay-put (gnus-make-overlay start end) 'face 'gnus-emphasis-underline)) 326 (overlay-put (make-overlay start end) 'face 'gnus-emphasis-underline))
327 ((or (equal tag "i") 327 ((or (equal tag "i")
328 (equal tag "I")) 328 (equal tag "I"))
329 (gnus-overlay-put (gnus-make-overlay start end) 'face 'gnus-emphasis-italic)) 329 (overlay-put (make-overlay start end) 'face 'gnus-emphasis-italic))
330 ((or (equal tag "s") 330 ((or (equal tag "s")
331 (equal tag "S")) 331 (equal tag "S"))
332 (gnus-overlay-put (gnus-make-overlay start end) 'face 'gnus-emphasis-strikethru)) 332 (overlay-put (make-overlay start end) 'face 'gnus-emphasis-strikethru))
333 ((or (equal tag "ins") 333 ((or (equal tag "ins")
334 (equal tag "INS")) 334 (equal tag "INS"))
335 (gnus-overlay-put (gnus-make-overlay start end) 'face 'gnus-emphasis-underline)) 335 (overlay-put (make-overlay start end) 'face 'gnus-emphasis-underline))
336 ;; Handle different UL types 336 ;; Handle different UL types
337 ((equal tag "_SYMBOL") 337 ((equal tag "_SYMBOL")
338 (when (string-match "TYPE=\\(.+\\)" parameters) 338 (when (string-match "TYPE=\\(.+\\)" parameters)
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index e071543f9e1..5776b0a569f 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -504,7 +504,7 @@ Two predefined functions are available:
504 (when (setq win (get-buffer-window buf)) 504 (when (setq win (get-buffer-window buf))
505 (select-window win) 505 (select-window win)
506 (when gnus-selected-tree-overlay 506 (when gnus-selected-tree-overlay
507 (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) 507 (goto-char (or (overlay-end gnus-selected-tree-overlay) 1)))
508 (gnus-tree-minimize))))) 508 (gnus-tree-minimize)))))
509 509
510(defun gnus-tree-show-summary () 510(defun gnus-tree-show-summary ()
@@ -547,7 +547,7 @@ Two predefined functions are available:
547 (when tree-window 547 (when tree-window
548 (select-window tree-window) 548 (select-window tree-window)
549 (when gnus-selected-tree-overlay 549 (when gnus-selected-tree-overlay
550 (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) 550 (goto-char (or (overlay-end gnus-selected-tree-overlay) 1)))
551 (let* ((top (cond ((< (window-height) 4) 0) 551 (let* ((top (cond ((< (window-height) 4) 0)
552 ((< (window-height) 7) 1) 552 ((< (window-height) 7) 1)
553 (t 2))) 553 (t 2)))
@@ -858,12 +858,12 @@ it in the environment specified by BINDINGS."
858 (when (or (not gnus-selected-tree-overlay) 858 (when (or (not gnus-selected-tree-overlay)
859 (gnus-extent-detached-p gnus-selected-tree-overlay)) 859 (gnus-extent-detached-p gnus-selected-tree-overlay))
860 ;; Create a new overlay. 860 ;; Create a new overlay.
861 (gnus-overlay-put 861 (overlay-put
862 (setq gnus-selected-tree-overlay 862 (setq gnus-selected-tree-overlay
863 (gnus-make-overlay (point-min) (1+ (point-min)))) 863 (make-overlay (point-min) (1+ (point-min))))
864 'face gnus-selected-tree-face)) 864 'face gnus-selected-tree-face))
865 ;; Move the overlay to the article. 865 ;; Move the overlay to the article.
866 (gnus-move-overlay 866 (move-overlay
867 gnus-selected-tree-overlay (goto-char (car region)) (cdr region)) 867 gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
868 (gnus-tree-minimize) 868 (gnus-tree-minimize)
869 (gnus-tree-recenter) 869 (gnus-tree-recenter)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 37a707ebe64..f98f4851970 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -11695,20 +11695,10 @@ If ARG is positive number, turn showing conversation threads on."
11695 (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off")) 11695 (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off"))
11696 (gnus-summary-position-point))) 11696 (gnus-summary-position-point)))
11697 11697
11698(eval-and-compile
11699 (if (fboundp 'remove-overlays)
11700 (defalias 'gnus-remove-overlays 'remove-overlays)
11701 (defun gnus-remove-overlays (beg end name val)
11702 "Clear BEG and END of overlays whose property NAME has value VAL.
11703For compatibility with XEmacs."
11704 (dolist (ov (gnus-overlays-in beg end))
11705 (when (eq (gnus-overlay-get ov name) val)
11706 (gnus-delete-overlay ov))))))
11707
11708(defun gnus-summary-show-all-threads () 11698(defun gnus-summary-show-all-threads ()
11709 "Show all threads." 11699 "Show all threads."
11710 (interactive) 11700 (interactive)
11711 (gnus-remove-overlays (point-min) (point-max) 'invisible 'gnus-sum) 11701 (remove-overlays (point-min) (point-max) 'invisible 'gnus-sum)
11712 (gnus-summary-position-point)) 11702 (gnus-summary-position-point))
11713 11703
11714(defsubst gnus-summary--inv (p) 11704(defsubst gnus-summary--inv (p)
@@ -11735,7 +11725,7 @@ Returns nil if no thread was there to be shown."
11735 'gnus-sum)))) 11725 'gnus-sum))))
11736 (point))))) 11726 (point)))))
11737 (when eoi 11727 (when eoi
11738 (gnus-remove-overlays beg eoi 'invisible 'gnus-sum) 11728 (remove-overlays beg eoi 'invisible 'gnus-sum)
11739 (goto-char orig) 11729 (goto-char orig)
11740 (gnus-summary-position-point) 11730 (gnus-summary-position-point)
11741 eoi))) 11731 eoi)))
@@ -11804,10 +11794,10 @@ Returns nil if no threads were there to be hidden."
11804 (search-backward "\n" start t)) 11794 (search-backward "\n" start t))
11805 (progn 11795 (progn
11806 (when (> (point) starteol) 11796 (when (> (point) starteol)
11807 (gnus-remove-overlays starteol (point) 'invisible 'gnus-sum) 11797 (remove-overlays starteol (point) 'invisible 'gnus-sum)
11808 (let ((ol (gnus-make-overlay starteol (point) nil t nil))) 11798 (let ((ol (make-overlay starteol (point) nil t nil)))
11809 (gnus-overlay-put ol 'invisible 'gnus-sum) 11799 (overlay-put ol 'invisible 'gnus-sum)
11810 (gnus-overlay-put ol 'evaporate t))) 11800 (overlay-put ol 'evaporate t)))
11811 (gnus-summary-goto-subject article) 11801 (gnus-summary-goto-subject article)
11812 (when (> start (point)) 11802 (when (> start (point))
11813 (message "Hiding the thread moved us backwards, aborting!") 11803 (message "Hiding the thread moved us backwards, aborting!")
@@ -12626,11 +12616,11 @@ If REVERSE, save parts that do not match TYPE."
12626 (setq to end)) 12616 (setq to end))
12627 (if gnus-newsgroup-selected-overlay 12617 (if gnus-newsgroup-selected-overlay
12628 ;; Move old overlay. 12618 ;; Move old overlay.
12629 (gnus-move-overlay 12619 (move-overlay
12630 gnus-newsgroup-selected-overlay from to (current-buffer)) 12620 gnus-newsgroup-selected-overlay from to (current-buffer))
12631 ;; Create new overlay. 12621 ;; Create new overlay.
12632 (gnus-overlay-put 12622 (overlay-put
12633 (setq gnus-newsgroup-selected-overlay (gnus-make-overlay from to)) 12623 (setq gnus-newsgroup-selected-overlay (make-overlay from to))
12634 'face gnus-summary-selected-face)))))) 12624 'face gnus-summary-selected-face))))))
12635 12625
12636(defvar gnus-summary-highlight-line-cached nil) 12626(defvar gnus-summary-highlight-line-cached nil)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index b75d9efe5e5..12b319b0d09 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -853,10 +853,6 @@ If there's no subdirectory, delete DIRECTORY as well."
853 (setq beg (point))) 853 (setq beg (point)))
854 (gnus-put-text-property beg (point) prop val))))) 854 (gnus-put-text-property beg (point) prop val)))))
855 855
856(declare-function gnus-overlay-put "gnus" (overlay prop value))
857(declare-function gnus-make-overlay "gnus"
858 (beg end &optional buffer front-advance rear-advance))
859
860(defsubst gnus-put-overlay-excluding-newlines (beg end prop val) 856(defsubst gnus-put-overlay-excluding-newlines (beg end prop val)
861 "The same as `put-text-property', but don't put this prop on any newlines in the region." 857 "The same as `put-text-property', but don't put this prop on any newlines in the region."
862 (save-match-data 858 (save-match-data
@@ -864,11 +860,9 @@ If there's no subdirectory, delete DIRECTORY as well."
864 (save-restriction 860 (save-restriction
865 (goto-char beg) 861 (goto-char beg)
866 (while (re-search-forward gnus-emphasize-whitespace-regexp end 'move) 862 (while (re-search-forward gnus-emphasize-whitespace-regexp end 'move)
867 (gnus-overlay-put 863 (overlay-put (make-overlay beg (match-beginning 0)) prop val)
868 (gnus-make-overlay beg (match-beginning 0))
869 prop val)
870 (setq beg (point))) 864 (setq beg (point)))
871 (gnus-overlay-put (gnus-make-overlay beg (point)) prop val))))) 865 (overlay-put (make-overlay beg (point)) prop val)))))
872 866
873(defun gnus-put-text-property-excluding-characters-with-faces (beg end prop val) 867(defun gnus-put-text-property-excluding-characters-with-faces (beg end prop val)
874 "The same as `put-text-property', except where `gnus-face' is set. 868 "The same as `put-text-property', except where `gnus-face' is set.
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 30c89f5906f..4545ed0e28a 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -304,17 +304,6 @@ be set in `.emacs' instead."
304 :type 'boolean) 304 :type 'boolean)
305 305
306(unless (featurep 'gnus-xmas) 306(unless (featurep 'gnus-xmas)
307 (defalias 'gnus-make-overlay 'make-overlay)
308 (defalias 'gnus-copy-overlay 'copy-overlay)
309 (defalias 'gnus-delete-overlay 'delete-overlay)
310 (defalias 'gnus-overlay-get 'overlay-get)
311 (defalias 'gnus-overlay-put 'overlay-put)
312 (defalias 'gnus-move-overlay 'move-overlay)
313 (defalias 'gnus-overlay-buffer 'overlay-buffer)
314 (defalias 'gnus-overlay-start 'overlay-start)
315 (defalias 'gnus-overlay-end 'overlay-end)
316 (defalias 'gnus-overlays-at 'overlays-at)
317 (defalias 'gnus-overlays-in 'overlays-in)
318 (defalias 'gnus-extent-detached-p 'ignore) 307 (defalias 'gnus-extent-detached-p 'ignore)
319 (defalias 'gnus-extent-start-open 'ignore) 308 (defalias 'gnus-extent-start-open 'ignore)
320 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names) 309 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index a5196c8d1ea..0a11bf092d4 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2008,13 +2008,8 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
2008(eval-and-compile 2008(eval-and-compile
2009 (if (featurep 'emacs) 2009 (if (featurep 'emacs)
2010 (progn 2010 (progn
2011 (defalias 'message-delete-overlay 'delete-overlay)
2012 (defun message-kill-all-overlays () 2011 (defun message-kill-all-overlays ()
2013 (mapcar #'delete-overlay (overlays-in (point-min) (point-max)))) 2012 (mapcar #'delete-overlay (overlays-in (point-min) (point-max))))
2014 (defalias 'message-make-overlay 'make-overlay)
2015 (defalias 'message-overlay-get 'overlay-get)
2016 (defalias 'message-overlay-put 'overlay-put)
2017 (defalias 'message-overlays-in 'overlays-in)
2018 (defalias 'message-window-inside-pixel-edges 2013 (defalias 'message-window-inside-pixel-edges
2019 'window-inside-pixel-edges)) 2014 'window-inside-pixel-edges))
2020 (defun message-kill-all-overlays () 2015 (defun message-kill-all-overlays ()
@@ -4396,8 +4391,7 @@ conformance."
4396 to (cdar regions) 4391 to (cdar regions)
4397 regions (cdr regions)) 4392 regions (cdr regions))
4398 (put-text-property from to 'invisible nil) 4393 (put-text-property from to 'invisible nil)
4399 (message-overlay-put (message-make-overlay from to) 4394 (overlay-put (make-overlay from to) 'face 'highlight))
4400 'face 'highlight))
4401 (unless (yes-or-no-p 4395 (unless (yes-or-no-p
4402 "Invisible text found and made visible; continue sending? ") 4396 "Invisible text found and made visible; continue sending? ")
4403 (error "Invisible text found and made visible"))))) 4397 (error "Invisible text found and made visible")))))
@@ -4424,8 +4418,7 @@ conformance."
4424 control-1)) 4418 control-1))
4425 (not (get-text-property 4419 (not (get-text-property
4426 (point) 'untranslated-utf-8)))) 4420 (point) 'untranslated-utf-8))))
4427 (message-overlay-put (message-make-overlay (point) (1+ (point))) 4421 (overlay-put (make-overlay (point) (1+ (point))) 'face 'highlight)
4428 'face 'highlight)
4429 (setq found t)) 4422 (setq found t))
4430 (forward-char)) 4423 (forward-char))
4431 (when found 4424 (when found
@@ -8567,12 +8560,12 @@ Used in `message-simplify-recipients'."
8567(defun message-toggle-image-thumbnails () 8560(defun message-toggle-image-thumbnails ()
8568 "For any included image files, insert a thumbnail of that image." 8561 "For any included image files, insert a thumbnail of that image."
8569 (interactive) 8562 (interactive)
8570 (let ((overlays (message-overlays-in (point-min) (point-max))) 8563 (let ((overlays (overlays-in (point-min) (point-max)))
8571 (displayed nil)) 8564 (displayed nil))
8572 (while overlays 8565 (while overlays
8573 (let ((overlay (car overlays))) 8566 (let ((overlay (car overlays)))
8574 (when (message-overlay-get overlay 'put-image) 8567 (when (overlay-get overlay 'put-image)
8575 (message-delete-overlay overlay) 8568 (delete-overlay overlay)
8576 (setq displayed t))) 8569 (setq displayed t)))
8577 (setq overlays (cdr overlays))) 8570 (setq overlays (cdr overlays)))
8578 (unless displayed 8571 (unless displayed
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index bce9abdcc8d..b0ec16ee03c 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -31,9 +31,6 @@
31(autoload 'gnus-replace-in-string "gnus-util") 31(autoload 'gnus-replace-in-string "gnus-util")
32(autoload 'gnus-read-shell-command "gnus-util") 32(autoload 'gnus-read-shell-command "gnus-util")
33 33
34(autoload 'gnus-overlays-at "gnus")
35(autoload 'gnus-overlay-put "gnus")
36
37(autoload 'mm-inline-partial "mm-partial") 34(autoload 'mm-inline-partial "mm-partial")
38(autoload 'mm-inline-external-body "mm-extern") 35(autoload 'mm-inline-external-body "mm-extern")
39(autoload 'mm-extern-cache-contents "mm-extern") 36(autoload 'mm-extern-cache-contents "mm-extern")
@@ -1915,8 +1912,8 @@ If RECURSIVE, search recursively."
1915 :keymap shr-map 1912 :keymap shr-map
1916 (get-text-property start 'shr-url)) 1913 (get-text-property start 'shr-url))
1917 (put-text-property start end 'local-map nil) 1914 (put-text-property start end 'local-map nil)
1918 (dolist (overlay (gnus-overlays-at start)) 1915 (dolist (overlay (overlays-at start))
1919 (gnus-overlay-put overlay 'face nil)) 1916 (overlay-put overlay 'face nil))
1920 (setq start end))))) 1917 (setq start end)))))
1921 1918
1922(defun mm-handle-filename (handle) 1919(defun mm-handle-filename (handle)
diff --git a/lisp/gnus/sieve.el b/lisp/gnus/sieve.el
index 6eef569901d..8d40fa455bd 100644
--- a/lisp/gnus/sieve.el
+++ b/lisp/gnus/sieve.el
@@ -275,21 +275,9 @@ Used to bracket operations which move point in the sieve-buffer."
275 (interactive "d") 275 (interactive "d")
276 (get-char-property (or pos (point)) 'script-name)) 276 (get-char-property (or pos (point)) 'script-name))
277 277
278(eval-and-compile
279 (defalias 'sieve-make-overlay (if (featurep 'xemacs)
280 'make-extent
281 'make-overlay))
282 (defalias 'sieve-overlay-put (if (featurep 'xemacs)
283 'set-extent-property
284 'overlay-put))
285 (defalias 'sieve-overlays-at (if (featurep 'xemacs)
286 'extents-at
287 'overlays-at)))
288
289(defun sieve-highlight (on) 278(defun sieve-highlight (on)
290 "Turn ON or off highlighting on the current language overlay." 279 "Turn ON or off highlighting on the current language overlay."
291 (sieve-overlay-put (car (sieve-overlays-at (point))) 280 (overlay-put (car (overlays-at (point))) 'face (if on 'highlight 'default)))
292 'face (if on 'highlight 'default)))
293 281
294(defun sieve-insert-scripts (scripts) 282(defun sieve-insert-scripts (scripts)
295 "Format and insert LANGUAGE-LIST strings into current buffer at point." 283 "Format and insert LANGUAGE-LIST strings into current buffer at point."
@@ -300,11 +288,11 @@ Used to bracket operations which move point in the sieve-buffer."
300 (if (consp script) 288 (if (consp script)
301 (insert (format " ACTIVE %s" (cdr script))) 289 (insert (format " ACTIVE %s" (cdr script)))
302 (insert (format " %s" script))) 290 (insert (format " %s" script)))
303 (setq ext (sieve-make-overlay p (point))) 291 (setq ext (make-overlay p (point)))
304 (sieve-overlay-put ext 'mouse-face 'highlight) 292 (overlay-put ext 'mouse-face 'highlight)
305 (sieve-overlay-put ext 'script-name (if (consp script) 293 (overlay-put ext 'script-name (if (consp script)
306 (cdr script) 294 (cdr script)
307 script)) 295 script))
308 (insert "\n")))) 296 (insert "\n"))))
309 297
310(defun sieve-open-server (server &optional port) 298(defun sieve-open-server (server &optional port)