[gnus git] branch master updated: m0-9-39-g8da1336 =1= gnus.el, gnus-xmas.el (gnus-copy-overlay, gnus-overlays-at): New functions
Katsumi Yamaoka <[email protected]> Wed, 05 Feb 2014 11:30:07 +0100
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 8da1336efbd60db3a837c2dd77c91bc6f1116661 (commit)
from b45612408e0c9e5b3fdce2308feebc7c288241a8 (commit)
- Log -----------------------------------------------------------------
commit 8da1336efbd60db3a837c2dd77c91bc6f1116661
Author: Katsumi Yamaoka <[email protected]>
Date: Wed Feb 5 10:29:58 2014 +0000
gnus.el, gnus-xmas.el (gnus-copy-overlay, gnus-overlays-at): New functions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f933f75..15f9f77 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2014-02-05 Katsumi Yamaoka <[email protected]>
+ * gnus.el, gnus-xmas.el (gnus-copy-overlay, gnus-overlays-at):
+ New functions.
+
* gnus-art.el (gnus-mime-display-attachment-buttons-in-header):
New user option.
(gnus-mime-buttonize-attachments-in-header): New function.
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 50cd60c..87e37f7 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -6254,7 +6254,8 @@ in the body. Use `gnus-header-face-alist' to highlight buttons."
(goto-char nd)
(skip-chars-backward "\t\n ")
(when (> (point) st)
- (push (cons (buffer-substring st (point)) (overlays-at st))
+ (push (cons (buffer-substring st (point))
+ (gnus-overlays-at st))
buttons)))
(setq st nd))
(when buttons
@@ -6276,19 +6277,19 @@ in the body. Use `gnus-header-face-alist' to highlight buttons."
st nd 'gnus-part
(number-to-string (get-text-property st 'gnus-part)))
(dolist (ovl (cdr button))
- (setq ovl (copy-overlay ovl))
+ (setq ovl (gnus-copy-overlay ovl))
(when (setq marker
- (plist-get (cdr (overlay-get ovl 'button))
+ (plist-get (cdr (gnus-overlay-get ovl 'button))
:from))
(set-marker marker st))
(when (setq marker
- (plist-get (cdr (overlay-get ovl 'button))
+ (plist-get (cdr (gnus-overlay-get ovl 'button))
:to))
(set-marker marker nd))
- (move-overlay ovl st nd)
+ (gnus-move-overlay ovl st nd)
(setq st nd)
- (overlay-put ovl 'gnus-button-attachment-extra t)
- (overlay-put ovl 'face nil)))
+ (gnus-overlay-put ovl 'gnus-button-attachment-extra t)
+ (gnus-overlay-put ovl 'face nil)))
(insert "\n")
(let ((gnus-treatment-function-alist
'((gnus-treat-highlight-headers
diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el
index 94400cc..839b857 100644
--- a/lisp/gnus-xmas.el
+++ b/lisp/gnus-xmas.el
@@ -211,6 +211,10 @@ call it with the value of the `gnus-data' text property."
(delete-extent extent)
nil)))
+(defun gnus-xmas-overlays-at (pos)
+ "Return a list of the extents that contain the character at POS."
+ (mapcar-extents #'identity nil nil pos (1+ pos)))
+
(defun gnus-xmas-overlays-in (beg end)
"Return a list of the extents that overlap the region BEG ... END."
(mapcar-extents #'identity nil nil beg end))
@@ -399,6 +403,7 @@ then we display only bindings that start with that prefix."
FRONT-ADVANCE and REAR-ADVANCE are ignored."
(make-extent beg end buffer)))
+ (defalias 'gnus-copy-overlay 'copy-extent)
(defalias 'gnus-delete-overlay 'delete-extent)
(defalias 'gnus-overlay-get 'extent-property)
(defalias 'gnus-overlay-put 'set-extent-property)
@@ -406,6 +411,7 @@ FRONT-ADVANCE and REAR-ADVANCE are ignored."
(defalias 'gnus-overlay-buffer 'extent-object)
(defalias 'gnus-overlay-start 'extent-start-position)
(defalias 'gnus-overlay-end 'extent-end-position)
+ (defalias 'gnus-overlays-at 'gnus-xmas-overlays-at)
(defalias 'gnus-overlays-in 'gnus-xmas-overlays-in)
(defalias 'gnus-kill-all-overlays 'gnus-xmas-kill-all-overlays)
(defalias 'gnus-extent-detached-p 'extent-detached-p)
diff --git a/lisp/gnus.el b/lisp/gnus.el
index ab48361..bf39dcf 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -305,6 +305,7 @@ be set in `.emacs' instead."
(unless (featurep 'gnus-xmas)
(defalias 'gnus-make-overlay 'make-overlay)
+ (defalias 'gnus-copy-overlay 'copy-overlay)
(defalias 'gnus-delete-overlay 'delete-overlay)
(defalias 'gnus-overlay-get 'overlay-get)
(defalias 'gnus-overlay-put 'overlay-put)
@@ -312,6 +313,7 @@ be set in `.emacs' instead."
(defalias 'gnus-overlay-buffer 'overlay-buffer)
(defalias 'gnus-overlay-start 'overlay-start)
(defalias 'gnus-overlay-end 'overlay-end)
+ (defalias 'gnus-overlays-at 'overlays-at)
(defalias 'gnus-overlays-in 'overlays-in)
(defalias 'gnus-extent-detached-p 'ignore)
(defalias 'gnus-extent-start-open 'ignore)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 3 +++
lisp/gnus-art.el | 15 ++++++++-------
lisp/gnus-xmas.el | 6 ++++++
lisp/gnus.el | 2 ++
4 files changed, 19 insertions(+), 7 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project