Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-sum.el @ 44:8d2a9b52c682 r19-15prefinal
Import from CVS: tag r19-15prefinal
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:10 +0200 |
parents | 8b8b7f3559a2 |
children |
comparison
equal
deleted
inserted
replaced
43:23cafc5d2038 | 44:8d2a9b52c682 |
---|---|
712 | 712 |
713 | 713 |
714 ;;; Internal variables | 714 ;;; Internal variables |
715 | 715 |
716 (defvar gnus-scores-exclude-files nil) | 716 (defvar gnus-scores-exclude-files nil) |
717 | |
718 (defvar gnus-summary-display-table | |
719 ;; Change the display table. Odd characters have a tendency to mess | |
720 ;; up nicely formatted displays - we make all possible glyphs | |
721 ;; display only a single character. | |
722 | |
723 ;; We start from the standard display table, if any. | |
724 (let ((table (or (copy-sequence standard-display-table) | |
725 (make-display-table))) | |
726 ;; Nix out all the control chars... | |
727 (i 32)) | |
728 (while (>= (setq i (1- i)) 0) | |
729 (aset table i [??])) | |
730 ;; ... but not newline and cr, of course. (cr is necessary for the | |
731 ;; selective display). | |
732 (aset table ?\n nil) | |
733 (aset table ?\r nil) | |
734 ;; We nix out any glyphs over 126 that are not set already. | |
735 (let ((i 256)) | |
736 (while (>= (setq i (1- i)) 127) | |
737 ;; Only modify if the entry is nil. | |
738 (or (aref table i) | |
739 (aset table i [??])))) | |
740 table) | |
741 "Display table used in summary mode buffers.") | |
742 | 717 |
743 (defvar gnus-original-article nil) | 718 (defvar gnus-original-article nil) |
744 (defvar gnus-article-internal-prepare-hook nil) | 719 (defvar gnus-article-internal-prepare-hook nil) |
745 (defvar gnus-newsgroup-process-stack nil) | 720 (defvar gnus-newsgroup-process-stack nil) |
746 | 721 |
1870 (buffer-disable-undo (current-buffer)) | 1845 (buffer-disable-undo (current-buffer)) |
1871 (setq buffer-read-only t) ;Disable modification | 1846 (setq buffer-read-only t) ;Disable modification |
1872 (setq truncate-lines t) | 1847 (setq truncate-lines t) |
1873 (setq selective-display t) | 1848 (setq selective-display t) |
1874 (setq selective-display-ellipses t) ;Display `...' | 1849 (setq selective-display-ellipses t) ;Display `...' |
1875 (setq buffer-display-table gnus-summary-display-table) | 1850 (gnus-summary-set-display-table) |
1876 (gnus-set-default-directory) | 1851 (gnus-set-default-directory) |
1877 (setq gnus-newsgroup-name group) | 1852 (setq gnus-newsgroup-name group) |
1878 (make-local-variable 'gnus-summary-line-format) | 1853 (make-local-variable 'gnus-summary-line-format) |
1879 (make-local-variable 'gnus-summary-line-format-spec) | 1854 (make-local-variable 'gnus-summary-line-format-spec) |
1880 (make-local-variable 'gnus-summary-mark-positions) | 1855 (make-local-variable 'gnus-summary-mark-positions) |
2207 | 2182 |
2208 (defun gnus-mouse-pick-article (e) | 2183 (defun gnus-mouse-pick-article (e) |
2209 (interactive "e") | 2184 (interactive "e") |
2210 (mouse-set-point e) | 2185 (mouse-set-point e) |
2211 (gnus-summary-next-page nil t)) | 2186 (gnus-summary-next-page nil t)) |
2187 | |
2188 (defun gnus-summary-set-display-table () | |
2189 ;; Change the display table. Odd characters have a tendency to mess | |
2190 ;; up nicely formatted displays - we make all possible glyphs | |
2191 ;; display only a single character. | |
2192 | |
2193 ;; We start from the standard display table, if any. | |
2194 (let ((table (or (copy-sequence standard-display-table) | |
2195 (make-display-table))) | |
2196 ;; Nix out all the control chars... | |
2197 (i 32)) | |
2198 (while (>= (setq i (1- i)) 0) | |
2199 (aset table i [??])) | |
2200 ;; ... but not newline and cr, of course. (cr is necessary for the | |
2201 ;; selective display). | |
2202 (aset table ?\n nil) | |
2203 (aset table ?\r nil) | |
2204 ;; We nix out any glyphs over 126 that are not set already. | |
2205 (let ((i 256)) | |
2206 (while (>= (setq i (1- i)) 127) | |
2207 ;; Only modify if the entry is nil. | |
2208 (or (aref table i) | |
2209 (aset table i [??])))) | |
2210 (setq buffer-display-table table))) | |
2212 | 2211 |
2213 (defun gnus-summary-setup-buffer (group) | 2212 (defun gnus-summary-setup-buffer (group) |
2214 "Initialize summary buffer." | 2213 "Initialize summary buffer." |
2215 (let ((buffer (concat "*Summary " group "*"))) | 2214 (let ((buffer (concat "*Summary " group "*"))) |
2216 (if (get-buffer buffer) | 2215 (if (get-buffer buffer) |
2260 (setq gnus-article-buffer article-buffer) | 2259 (setq gnus-article-buffer article-buffer) |
2261 (setq gnus-original-article-buffer original) | 2260 (setq gnus-original-article-buffer original) |
2262 (setq gnus-reffed-article-number reffed) | 2261 (setq gnus-reffed-article-number reffed) |
2263 (setq gnus-current-score-file score-file) | 2262 (setq gnus-current-score-file score-file) |
2264 ;; The article buffer also has local variables. | 2263 ;; The article buffer also has local variables. |
2265 (when (buffer-live-p gnus-article-buffer) | 2264 (when (gnus-buffer-live-p gnus-article-buffer) |
2266 (set-buffer gnus-article-buffer) | 2265 (set-buffer gnus-article-buffer) |
2267 (setq gnus-summary-buffer summary)))))) | 2266 (setq gnus-summary-buffer summary)))))) |
2268 | 2267 |
2269 (defun gnus-summary-article-unread-p (article) | 2268 (defun gnus-summary-article-unread-p (article) |
2270 "Say whether ARTICLE is unread or not." | 2269 "Say whether ARTICLE is unread or not." |
4959 ((eq major-mode 'gnus-article-mode) | 4958 ((eq major-mode 'gnus-article-mode) |
4960 (save-excursion | 4959 (save-excursion |
4961 ;; The `gnus-summary-buffer' variable may point | 4960 ;; The `gnus-summary-buffer' variable may point |
4962 ;; to the old summary buffer when using a single | 4961 ;; to the old summary buffer when using a single |
4963 ;; article buffer. | 4962 ;; article buffer. |
4964 (unless (buffer-live-p gnus-summary-buffer) | 4963 (unless (gnus-buffer-live-p gnus-summary-buffer) |
4965 (set-buffer gnus-group-buffer)) | 4964 (set-buffer gnus-group-buffer)) |
4966 (set-buffer gnus-summary-buffer) | 4965 (set-buffer gnus-summary-buffer) |
4967 (gnus-set-global-variables)))) | 4966 (gnus-set-global-variables)))) |
4968 (if (or (eq (cdr quit-config) 'article) | 4967 (if (or (eq (cdr quit-config) 'article) |
4969 (eq (cdr quit-config) 'pick)) | 4968 (eq (cdr quit-config) 'pick)) |