diff options
| author | Katsumi Yamaoka | 2010-01-06 00:00:28 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-01-06 00:00:28 +0000 |
| commit | 770d9a1f454d31c79dd2a6e2d99477322f43a618 (patch) | |
| tree | 53a53c6405541546e57902560ddea4f9cae5db71 | |
| parent | fd579fdca5cb3a71cdb24bace02c335d838a6922 (diff) | |
| download | emacs-770d9a1f454d31c79dd2a6e2d99477322f43a618.tar.gz emacs-770d9a1f454d31c79dd2a6e2d99477322f43a618.zip | |
Merge from mainline.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 10 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 23 |
3 files changed, 35 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1b418e3275a..177b0a032f8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-util.el (gnus-invisible-p, gnus-next-char-property-change) | ||
| 4 | (gnus-previous-char-property-change): New functions. | ||
| 5 | |||
| 6 | * gnus-sum.el (gnus-forward-line-ignore-invisible): Use them. | ||
| 7 | |||
| 1 | 2010-01-05 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2010-01-05 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * gnus-sum.el (gnus-forward-line-ignore-invisible): New function. | 10 | * gnus-sum.el (gnus-forward-line-ignore-invisible): New function. |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cd56cd1f4bb..86244a9ca8f 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -6734,8 +6734,8 @@ Like forward-line, but skip over (and don't count) invisible lines." | |||
| 6734 | (while (and (> n 0) (not done)) | 6734 | (while (and (> n 0) (not done)) |
| 6735 | ;; If the following character is currently invisible, | 6735 | ;; If the following character is currently invisible, |
| 6736 | ;; skip all characters with that same `invisible' property value. | 6736 | ;; skip all characters with that same `invisible' property value. |
| 6737 | (while (invisible-p (point)) | 6737 | (while (gnus-invisible-p (point)) |
| 6738 | (goto-char (next-char-property-change (point)))) | 6738 | (goto-char (gnus-next-char-property-change (point)))) |
| 6739 | (forward-line 1) | 6739 | (forward-line 1) |
| 6740 | (if (eobp) | 6740 | (if (eobp) |
| 6741 | (setq done t) | 6741 | (setq done t) |
| @@ -6744,9 +6744,9 @@ Like forward-line, but skip over (and don't count) invisible lines." | |||
| 6744 | (forward-line -1) | 6744 | (forward-line -1) |
| 6745 | (if (bobp) (setq done t) | 6745 | (if (bobp) (setq done t) |
| 6746 | (setq n (1+ n)) | 6746 | (setq n (1+ n)) |
| 6747 | (while (and (not (bobp)) (invisible-p (1- (point)))) | 6747 | (while (and (not (bobp)) (gnus-invisible-p (1- (point)))) |
| 6748 | (goto-char (previous-char-property-change (point)))))))) | 6748 | (goto-char (gnus-previous-char-property-change (point)))))))) |
| 6749 | 6749 | ||
| 6750 | (defun gnus-summary-recenter () | 6750 | (defun gnus-summary-recenter () |
| 6751 | "Center point in the summary window. | 6751 | "Center point in the summary window. |
| 6752 | If `gnus-auto-center-summary' is nil, or the article buffer isn't | 6752 | If `gnus-auto-center-summary' is nil, or the article buffer isn't |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 28a8c5dbed4..f5679ee850f 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -969,6 +969,29 @@ If there's no subdirectory, delete DIRECTORY as well." | |||
| 969 | (overlay-get overlay 'face)) | 969 | (overlay-get overlay 'face)) |
| 970 | (overlays-at pos))))))) | 970 | (overlays-at pos))))))) |
| 971 | 971 | ||
| 972 | (if (fboundp 'invisible-p) | ||
| 973 | (defalias 'gnus-invisible-p 'invisible-p) | ||
| 974 | ;; for Emacs < 22.2, and XEmacs. | ||
| 975 | (defun gnus-invisible-p (pos) | ||
| 976 | "Return non-nil if the character after POS is currently invisible." | ||
| 977 | (let ((prop (get-char-property pos 'invisible))) | ||
| 978 | (if (eq buffer-invisibility-spec t) | ||
| 979 | prop | ||
| 980 | (or (memq prop buffer-invisibility-spec) | ||
| 981 | (assq prop buffer-invisibility-spec)))))) | ||
| 982 | |||
| 983 | ;; Note: the optional 2nd argument has a different meaning between | ||
| 984 | ;; Emacs and XEmacs. | ||
| 985 | ;; (next-char-property-change POSITION &optional LIMIT) | ||
| 986 | ;; (next-extent-change POS &optional OBJECT) | ||
| 987 | (defalias 'gnus-next-char-property-change | ||
| 988 | (if (fboundp 'next-extent-change) | ||
| 989 | 'next-extent-change 'next-char-property-change)) | ||
| 990 | |||
| 991 | (defalias 'gnus-previous-char-property-change | ||
| 992 | (if (fboundp 'previous-extent-change) | ||
| 993 | 'previous-extent-change 'previous-char-property-change)) | ||
| 994 | |||
| 972 | ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 | 995 | ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 |
| 973 | ;; The primary idea here is to try to protect internal datastructures | 996 | ;; The primary idea here is to try to protect internal datastructures |
| 974 | ;; from becoming corrupted when the user hits C-g, or if a hook or | 997 | ;; from becoming corrupted when the user hits C-g, or if a hook or |