Commit 770d9a1f authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

Merge from mainline.

parent fd579fdc
2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-util.el (gnus-invisible-p, gnus-next-char-property-change)
(gnus-previous-char-property-change): New functions.
* gnus-sum.el (gnus-forward-line-ignore-invisible): Use them.
2010-01-05 Andreas Schwab <schwab@linux-m68k.org>
* gnus-sum.el (gnus-forward-line-ignore-invisible): New function.
......
......@@ -6734,8 +6734,8 @@ Like forward-line, but skip over (and don't count) invisible lines."
(while (and (> n 0) (not done))
;; If the following character is currently invisible,
;; skip all characters with that same `invisible' property value.
(while (invisible-p (point))
(goto-char (next-char-property-change (point))))
(while (gnus-invisible-p (point))
(goto-char (gnus-next-char-property-change (point))))
(forward-line 1)
(if (eobp)
(setq done t)
......@@ -6744,9 +6744,9 @@ Like forward-line, but skip over (and don't count) invisible lines."
(forward-line -1)
(if (bobp) (setq done t)
(setq n (1+ n))
(while (and (not (bobp)) (invisible-p (1- (point))))
(goto-char (previous-char-property-change (point))))))))
(while (and (not (bobp)) (gnus-invisible-p (1- (point))))
(goto-char (gnus-previous-char-property-change (point))))))))
(defun gnus-summary-recenter ()
"Center point in the summary window.
If `gnus-auto-center-summary' is nil, or the article buffer isn't
......
......@@ -969,6 +969,29 @@ If there's no subdirectory, delete DIRECTORY as well."
(overlay-get overlay 'face))
(overlays-at pos)))))))
(if (fboundp 'invisible-p)
(defalias 'gnus-invisible-p 'invisible-p)
;; for Emacs < 22.2, and XEmacs.
(defun gnus-invisible-p (pos)
"Return non-nil if the character after POS is currently invisible."
(let ((prop (get-char-property pos 'invisible)))
(if (eq buffer-invisibility-spec t)
prop
(or (memq prop buffer-invisibility-spec)
(assq prop buffer-invisibility-spec))))))
;; Note: the optional 2nd argument has a different meaning between
;; Emacs and XEmacs.
;; (next-char-property-change POSITION &optional LIMIT)
;; (next-extent-change POS &optional OBJECT)
(defalias 'gnus-next-char-property-change
(if (fboundp 'next-extent-change)
'next-extent-change 'next-char-property-change))
(defalias 'gnus-previous-char-property-change
(if (fboundp 'previous-extent-change)
'previous-extent-change 'previous-char-property-change))
;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996
;; The primary idea here is to try to protect internal datastructures
;; from becoming corrupted when the user hits C-g, or if a hook or
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment