aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2009-10-19 23:21:04 +0000
committerKatsumi Yamaoka2009-10-19 23:21:04 +0000
commit9bfd9a76b69f3c037506e8a300a28524705be05d (patch)
treeb6d7713397c10dc5bafc077e246968d7c928857c
parentd760435bc9182632aa6c3503ed878d56bbdda889 (diff)
downloademacs-9bfd9a76b69f3c037506e8a300a28524705be05d.tar.gz
emacs-9bfd9a76b69f3c037506e8a300a28524705be05d.zip
Synch with Gnus trunk:
2009-10-19 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-sum.el (gnus-summary-show-thread): Remove useless goto-char. (gnus-summary-show-thread, gnus-summary-hide-thread): Indent. 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. 2009-10-14 Reiner Steib <Reiner.Steib@gmx.de> * gnus-sum.el (gnus-remove-overlays): Add doc string and alias. 2009-10-14 Dan Nicolaescu <dann@ics.uci.edu> * gnus-sum.el (gnus-remove-overlays): Compatibility code for Emacs 21 and XEmacs that don't have `remove-overlays'. 2009-10-14 Stefan Monnier <monnier@iro.umontreal.ca> * gnus-sum.el (gnus-summary-mode, gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread): Get rid of selective display. Use overlays instead.
-rw-r--r--lisp/gnus/ChangeLog31
-rw-r--r--lisp/gnus/gnus-sum.el68
-rw-r--r--lisp/gnus/gnus.el2
3 files changed, 76 insertions, 25 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5cbf88ba51b..b98b9c99540 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,34 @@
12009-10-19 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-sum.el (gnus-summary-show-thread): Remove useless goto-char.
4 (gnus-summary-show-thread, gnus-summary-hide-thread): Indent.
5
62009-10-16 Katsumi Yamaoka <yamaoka@jpl.org>
7
8 * gnus.el (gnus-overlay-get): New alias to overlay-get.
9 (gnus-overlays-in): New alias to overlays-in.
10
11 * gnus-sum.el (gnus-remove-overlays): Use gnus-overlays-in,
12 gnus-overlay-get, and gnus-delete-overlay.
13 (gnus-summary-show-thread): Make it work as well for systems in which
14 next-single-char-property-change is not available.
15 (gnus-summary-hide-thread): Use gnus-make-overlay and gnus-overlay-put.
16
172009-10-14 Reiner Steib <Reiner.Steib@gmx.de>
18
19 * gnus-sum.el (gnus-remove-overlays): Add doc string and alias.
20
212009-10-14 Dan Nicolaescu <dann@ics.uci.edu>
22
23 * gnus-sum.el (gnus-remove-overlays): Compatibility code for Emacs 21
24 and XEmacs that don't have `remove-overlays'.
25
262009-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
27
28 * gnus-sum.el (gnus-summary-mode, gnus-summary-show-all-threads)
29 (gnus-summary-show-thread, gnus-summary-hide-thread): Get rid of
30 selective display. Use overlays instead.
31
12009-10-04 Juanma Barranquero <lekktu@gmail.com> 322009-10-04 Juanma Barranquero <lekktu@gmail.com>
2 33
3 * spam-stat.el (spam-stat-strip-xref): Fix typo in docstring. 34 * spam-stat.el (spam-stat-strip-xref): Fix typo in docstring.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b1fa5254bdc..fb80d605308 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3069,8 +3069,7 @@ The following commands are available:
3069 (setq buffer-read-only t ;Disable modification 3069 (setq buffer-read-only t ;Disable modification
3070 show-trailing-whitespace nil) 3070 show-trailing-whitespace nil)
3071 (setq truncate-lines t) 3071 (setq truncate-lines t)
3072 (setq selective-display t) 3072 (add-to-invisibility-spec '(gnus-sum . t))
3073 (setq selective-display-ellipses t) ;Display `...'
3074 (gnus-summary-set-display-table) 3073 (gnus-summary-set-display-table)
3075 (gnus-set-default-directory) 3074 (gnus-set-default-directory)
3076 (make-local-variable 'gnus-summary-line-format) 3075 (make-local-variable 'gnus-summary-line-format)
@@ -11278,29 +11277,44 @@ If ARG is positive number, turn showing conversation threads on."
11278 (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off")) 11277 (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off"))
11279 (gnus-summary-position-point))) 11278 (gnus-summary-position-point)))
11280 11279
11280(if (fboundp 'remove-overlays)
11281 (defalias 'gnus-remove-overlays 'remove-overlays)
11282 (defun gnus-remove-overlays (beg end name val)
11283 "Clear BEG and END of overlays whose property NAME has value VAL.
11284For compatibility with Emacs 21 and XEmacs."
11285 (dolist (ov (gnus-overlays-in beg end))
11286 (when (eq (gnus-overlay-get ov name) val)
11287 (gnus-delete-overlay ov)))))
11288
11281(defun gnus-summary-show-all-threads () 11289(defun gnus-summary-show-all-threads ()
11282 "Show all threads." 11290 "Show all threads."
11283 (interactive) 11291 (interactive)
11284 (save-excursion 11292 (gnus-remove-overlays (point-min) (point-max) 'invisible 'gnus-sum)
11285 (let ((buffer-read-only nil))
11286 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)))
11287 (gnus-summary-position-point)) 11293 (gnus-summary-position-point))
11288 11294
11289(defun gnus-summary-show-thread () 11295(defun gnus-summary-show-thread ()
11290 "Show thread subtrees. 11296 "Show thread subtrees.
11291Returns nil if no thread was there to be shown." 11297Returns nil if no thread was there to be shown."
11292 (interactive) 11298 (interactive)
11293 (let ((buffer-read-only nil) 11299 (let* ((orig (point))
11294 (orig (point)) 11300 (end (point-at-eol))
11295 (end (point-at-eol)) 11301 ;; Leave point at bol
11296 ;; Leave point at bol 11302 (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point)))))
11297 (beg (progn (beginning-of-line) (point)))) 11303 (eoi (when (eq (get-char-property end 'invisible) 'gnus-sum)
11298 (prog1 11304 (if (fboundp 'next-single-char-property-change)
11299 ;; Any hidden lines here? 11305 (or (next-single-char-property-change end 'invisible)
11300 (search-forward "\r" end t) 11306 (point-max))
11301 (subst-char-in-region beg end ?\^M ?\n t) 11307 (while (progn
11308 (end-of-line 2)
11309 (and (not (eobp))
11310 (eq (get-char-property (point) 'invisible)
11311 'gnus-sum))))
11312 (point)))))
11313 (when eoi
11314 (gnus-remove-overlays beg eoi 'invisible 'gnus-sum)
11302 (goto-char orig) 11315 (goto-char orig)
11303 (gnus-summary-position-point)))) 11316 (gnus-summary-position-point)
11317 eoi)))
11304 11318
11305(defun gnus-summary-maybe-hide-threads () 11319(defun gnus-summary-maybe-hide-threads ()
11306 "If requested, hide the threads that should be hidden." 11320 "If requested, hide the threads that should be hidden."
@@ -11349,22 +11363,26 @@ If PREDICATE is supplied, threads that satisfy this predicate
11349will not be hidden. 11363will not be hidden.
11350Returns nil if no threads were there to be hidden." 11364Returns nil if no threads were there to be hidden."
11351 (interactive) 11365 (interactive)
11352 (let ((buffer-read-only nil) 11366 (let ((start (point))
11353 (start (point)) 11367 (starteol (line-end-position))
11354 (article (gnus-summary-article-number))) 11368 (article (gnus-summary-article-number)))
11355 (goto-char start) 11369 (goto-char start)
11356 ;; Go forward until either the buffer ends or the subthread ends. 11370 ;; Go forward until either the buffer ends or the subthread ends.
11357 (when (and (not (eobp)) 11371 (when (and (not (eobp))
11358 (or (zerop (gnus-summary-next-thread 1 t)) 11372 (or (zerop (gnus-summary-next-thread 1 t))
11359 (goto-char (point-max)))) 11373 (goto-char (point-max))))
11360 (prog1 11374 (if (and (> (point) start)
11361 (if (and (> (point) start) 11375 ;; FIXME: this should actually search for a non-invisible \n.
11362 (search-backward "\n" start t)) 11376 (search-backward "\n" start t))
11363 (progn 11377 (progn
11364 (subst-char-in-region start (point) ?\n ?\^M) 11378 (when (> (point) starteol)
11365 (gnus-summary-goto-subject article)) 11379 (gnus-remove-overlays starteol (point) 'invisible 'gnus-sum)
11366 (goto-char start) 11380 (let ((ol (gnus-make-overlay starteol (point) nil t nil)))
11367 nil))))) 11381 (gnus-overlay-put ol 'invisible 'gnus-sum)
11382 (gnus-overlay-put ol 'evaporate t)))
11383 (gnus-summary-goto-subject article))
11384 (goto-char start)
11385 nil))))
11368 11386
11369(defun gnus-summary-go-to-next-thread (&optional previous) 11387(defun gnus-summary-go-to-next-thread (&optional previous)
11370 "Go to the same level (or less) next thread. 11388 "Go to the same level (or less) next thread.
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 85baa71f2a3..ef77e595890 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -318,11 +318,13 @@ be set in `.emacs' instead."
318(unless (featurep 'gnus-xmas) 318(unless (featurep 'gnus-xmas)
319 (defalias 'gnus-make-overlay 'make-overlay) 319 (defalias 'gnus-make-overlay 'make-overlay)
320 (defalias 'gnus-delete-overlay 'delete-overlay) 320 (defalias 'gnus-delete-overlay 'delete-overlay)
321 (defalias 'gnus-overlay-get 'overlay-get)
321 (defalias 'gnus-overlay-put 'overlay-put) 322 (defalias 'gnus-overlay-put 'overlay-put)
322 (defalias 'gnus-move-overlay 'move-overlay) 323 (defalias 'gnus-move-overlay 'move-overlay)
323 (defalias 'gnus-overlay-buffer 'overlay-buffer) 324 (defalias 'gnus-overlay-buffer 'overlay-buffer)
324 (defalias 'gnus-overlay-start 'overlay-start) 325 (defalias 'gnus-overlay-start 'overlay-start)
325 (defalias 'gnus-overlay-end 'overlay-end) 326 (defalias 'gnus-overlay-end 'overlay-end)
327 (defalias 'gnus-overlays-in 'overlays-in)
326 (defalias 'gnus-extent-detached-p 'ignore) 328 (defalias 'gnus-extent-detached-p 'ignore)
327 (defalias 'gnus-extent-start-open 'ignore) 329 (defalias 'gnus-extent-start-open 'ignore)
328 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names) 330 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)