(gnus-overlays-in): New alias to overlays-in.
* gnus-sum.el (gnus-remove-overlays): Use gnus-overlays-in, gnus-overlay-get,
and gnus-delete-overlay.
(gnus-summary-show-thread): Make it work as well for systems in which
next-single-char-property-change is not available.
(gnus-summary-hide-thread): Use gnus-make-overlay and gnus-overlay-put.
* gnus-xmas.el (gnus-xmas-overlays-in): New function.
(gnus-overlay-get): New alias to extent-property.
(gnus-overlays-in): New alias to gnus-xmas-overlays-in.
* dgnushack.el: Autoload add-to-invisibility-spec for XEmacs 21.4 and SXEmacs.
* lpath.el: Fbind next-single-char-property-change for XEmacs 21.4 and SXEmacs.
+2009-10-16 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus.el (gnus-overlay-get): New alias to overlay-get.
+ (gnus-overlays-in): New alias to overlays-in.
+
+ * gnus-sum.el (gnus-remove-overlays): Use gnus-overlays-in,
+ gnus-overlay-get, and gnus-delete-overlay.
+ (gnus-summary-show-thread): Make it work as well for systems in which
+ next-single-char-property-change is not available.
+ (gnus-summary-hide-thread): Use gnus-make-overlay and gnus-overlay-put.
+
+ * gnus-xmas.el (gnus-xmas-overlays-in): New function.
+ (gnus-overlay-get): New alias to extent-property.
+ (gnus-overlays-in): New alias to gnus-xmas-overlays-in.
+
+ * dgnushack.el: Autoload add-to-invisibility-spec for XEmacs 21.4 and
+ SXEmacs.
+
+ * lpath.el: Fbind next-single-char-property-change for XEmacs 21.4 and
+ SXEmacs.
+
2009-10-14 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-sum.el (gnus-remove-overlays): Add doc string and alias.
(autoload 'Info-index-next "info" nil t)
(autoload 'Info-menu "info" nil t)
(autoload 'ad-add-advice "advice")
+ (unless (and (emacs-version>= 21 5)
+ (not (featurep 'sxemacs)))
+ ;; calendar/auto-autoloads.el provides it.
+ (autoload 'add-to-invisibility-spec "dummy"))
(autoload 'annotations-at "annotations")
(autoload 'apropos "apropos" nil t)
(autoload 'apropos-command "apropos" nil t)
(defun gnus-remove-overlays (beg end name val)
"Clear BEG and END of overlays whose property NAME has value VAL.
For compatibility with Emacs 21 and XEmacs."
- (dolist (ov (overlays-in beg end))
- (when (overlay-get ov val)
- (delete-overlay ov)))))
+ (dolist (ov (gnus-overlays-in beg end))
+ (when (eq (gnus-overlay-get ov name) val)
+ (gnus-delete-overlay ov)))))
(defun gnus-summary-show-all-threads ()
"Show all threads."
;; Leave point at bol
(beg (progn (beginning-of-line) (if (bobp) (point) (1- (point)))))
(eoi (when (eq (get-char-property end 'invisible) 'gnus-sum)
- (or (next-single-char-property-change end 'invisible)
- (point-max)))))
+ (if (fboundp 'next-single-char-property-change)
+ (or (next-single-char-property-change end 'invisible)
+ (point-max))
+ (goto-char end)
+ (while (progn
+ (end-of-line 2)
+ (and (not (eobp))
+ (eq (get-char-property (point) 'invisible)
+ 'gnus-sum))))
+ (point)))))
(when eoi
(gnus-remove-overlays beg eoi 'invisible 'gnus-sum)
(goto-char orig)
(progn
(when (> (point) starteol)
(gnus-remove-overlays starteol (point) 'invisible 'gnus-sum)
- (let ((ol (make-overlay starteol (point) nil t nil)))
- (overlay-put ol 'invisible 'gnus-sum)
- (overlay-put ol 'evaporate t)))
+ (let ((ol (gnus-make-overlay starteol (point) nil t nil)))
+ (gnus-overlay-put ol 'invisible 'gnus-sum)
+ (gnus-overlay-put ol 'evaporate t)))
(gnus-summary-goto-subject article))
(goto-char start)
nil))))
(delete-extent extent)
nil)))
+(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))
+
(defun gnus-xmas-window-top-edge (&optional window)
(nth 1 (window-pixel-edges window)))
(make-extent beg end buffer)))
(defalias 'gnus-delete-overlay 'delete-extent)
+ (defalias 'gnus-overlay-get 'extent-property)
(defalias 'gnus-overlay-put 'set-extent-property)
(defalias 'gnus-move-overlay 'gnus-xmas-move-overlay)
(defalias 'gnus-overlay-buffer 'extent-object)
(defalias 'gnus-overlay-start 'extent-start-position)
(defalias 'gnus-overlay-end 'extent-end-position)
+ (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)
(defalias 'gnus-add-text-properties 'gnus-xmas-add-text-properties)
(unless (featurep 'gnus-xmas)
(defalias 'gnus-make-overlay 'make-overlay)
(defalias 'gnus-delete-overlay 'delete-overlay)
+ (defalias 'gnus-overlay-get 'overlay-get)
(defalias 'gnus-overlay-put 'overlay-put)
(defalias 'gnus-move-overlay 'move-overlay)
(defalias 'gnus-overlay-buffer 'overlay-buffer)
(defalias 'gnus-overlay-start 'overlay-start)
(defalias 'gnus-overlay-end 'overlay-end)
+ (defalias 'gnus-overlays-in 'overlays-in)
(defalias 'gnus-extent-detached-p 'ignore)
(defalias 'gnus-extent-start-open 'ignore)
(defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
(maybe-fbind
'(custom-autoload
decode-char display-graphic-p display-images-p display-visual-class
- get-display-table put-display-table select-frame-set-input-focus
- unicode-precedence-list unicode-to-char w32-focus-frame x-focus-frame))
+ get-display-table next-single-char-property-change put-display-table
+ select-frame-set-input-focus unicode-precedence-list unicode-to-char
+ w32-focus-frame x-focus-frame))
(maybe-bind
'(default-file-name-coding-system scroll-margin)))