(defvar gnus-group-default-list-level gnus-level-subscribed
"*Default listing level.
-Ignored if `gnus-group-use-permanent-levels' is nil.")
+Ignored if `gnus-group-use-permanent-levels' is non-nil.")
(defvar gnus-group-use-permanent-levels nil
"*If non-nil, once you set a level, Gnus will use this level.")
(defvar gnus-show-mime nil
- "*If non-ni, do mime processing of articles.
+ "*If non-nil, do mime processing of articles.
The articles will simply be fed to the function given by
`gnus-show-mime-method'.")
[mail 1.0 point]))
(info ([nil 1.0 point]))
(summary-faq ([summary 0.25]
- [article 1.0 point]))
+ [faq 1.0 point]))
(edit-group ([group 0.5]
[edit-group 1.0 point]))
(edit-server ([server 0.5]
(browse-carpal . gnus-carpal-browse-buffer)
(edit-score . gnus-score-edit-buffer)
(mail . gnus-mail-buffer)
- (post . gnus-post-news-buffer))
+ (post . gnus-post-news-buffer)
+ (faq . gnus-faq-buffer))
"Mapping from short symbols to buffer names or buffer variables.")
(defvar gnus-carpal nil
of the modeline intact.")
;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
+(defvar gnus-display-type
+ (condition-case nil
+ (let ((display-resource (x-get-resource ".displayType" "DisplayType")))
+ (cond (display-resource (intern (downcase display-resource)))
+ ((x-display-color-p) 'color)
+ ((x-display-grayscale-p) 'grayscale)
+ (t 'mono)))
+ (error 'mono))
+ "A symbol indicating the display Emacs is running under.
+The symbol should be one of `color', `grayscale' or `mono'. If Emacs
+guesses this display attribute wrongly, either set this variable in
+your `~/.emacs' or set the resource `Emacs.displayType' in your
+`~/.Xdefaults'. See also `gnus-background-mode'.")
+
+(defvar gnus-background-mode
+ (condition-case nil
+ (let ((bg-resource (x-get-resource ".backgroundMode"
+ "BackgroundMode"))
+ (params (frame-parameters)))
+ (cond (bg-resource (intern (downcase bg-resource)))
+ ((< (apply '+ (x-color-values
+ (cdr (assq 'background-color params))))
+ (/ (apply '+ (x-color-values "white")) 3))
+ 'dark)
+ (t 'light)))
+ (error 'light))
+ "A symbol indicating the Emacs background brightness.
+The symbol should be one of `light' or `dark'.
+If Emacs guesses this frame attribute wrongly, either set this variable in
+your `~/.emacs' or set the resource `Emacs.backgroundMode' in your
+`~/.Xdefaults'.
+See also `gnus-display-type'.")
+
(defvar gnus-mouse-face 'highlight
"*Face used for mouse highlighting in Gnus.
No mouse highlights will be done if `gnus-visual' is nil.")
(defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "(ding) Gnus v0.91.1"
+(defconst gnus-version "(ding) Gnus v0.92"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(erase-buffer)
(insert
(format "
- %s
+ %s
A newsreader
for GNU Emacs
written by
Masanobu UMEDA
- Lars Magne
- Ingebrigtsen
+ A Praxis Release
larsi@ifi.uio.no
"
gnus-version))
(/ (max (- (window-width) (or x 28)) 0) 2))
(goto-char (point-min))
;; +4 is fuzzy factor.
- (insert-char ?\n (/ (max (- (window-height) (or y 12)) 0) 2)))
+ (insert-char ?\n (/ (max (- (window-height) (or y 12)) 0) 2))
+
+ ;; Fontify some.
+ (goto-char (point-min))
+ (search-forward "Praxis")
+ (put-text-property (match-beginning 0) (match-end 0) 'face 'bold)
+ (goto-char (point-min)))
(defun gnus-group-setup-buffer ()
(or (get-buffer gnus-group-buffer)
nil group (nth 1 info) (nth 3 info) (car entry) (nth 4 info)))
(setq active (gnus-gethash group gnus-active-hashtb))
(gnus-group-insert-group-line
- nil group (if (member group gnus-zombie-list) gnus-level-zombie
- gnus-level-killed)
+ nil group
+ (if (member group gnus-zombie-list) gnus-level-zombie gnus-level-killed)
nil (if active (- (1+ (cdr active)) (car active)) 0) nil))))
(defun gnus-group-insert-group-line (gformat group level marked number method)
"Get the level of the newsgroup on the current line."
(get-text-property (gnus-point-at-bol) 'gnus-level))
+(defun gnus-group-group-unread ()
+ "Get the number of unread articles of the newsgroup on the current line."
+ (get-text-property (gnus-point-at-bol) 'gnus-unread))
+
(defun gnus-group-search-forward (&optional backward all level first-too)
"Find the next newsgroup with unread articles.
If BACKWARD is non-nil, find the previous newsgroup instead.
;; Group marking.
-(defun gnus-group-mark-group (n &optional unmark)
+(defun gnus-group-mark-group (n &optional unmark no-advance)
"Mark the current group."
(interactive "p")
(let ((buffer-read-only nil)
(setq gnus-group-marked
(cons group (delete group gnus-group-marked))))
t)
- (zerop (gnus-group-next-group 1)))
+ (or no-advance (zerop (gnus-group-next-group 1))))
(setq n (1- n)))
(gnus-summary-position-cursor)
n))
(defun gnus-group-remove-mark (group)
(and (gnus-group-goto-group group)
(save-excursion
- (gnus-group-mark-group 1 'unmark))))
+ (gnus-group-mark-group 1 'unmark t))))
;; Return a list of groups to work on. Take into consideration N (the
;; prefix) and the list of marked groups.
(gnus-gethash (gnus-group-group-name)
gnus-newsrc-hashtb))
t)
- (gnus-sethash nname '(0 . 0) gnus-active-hashtb)
+ (gnus-sethash nname (cons 1 0) gnus-active-hashtb)
(gnus-dribble-enter
(concat "(gnus-group-set-info '" (prin1-to-string (cdr info)) ")"))
(gnus-group-insert-group-line-info nname)
+ (require (intern method))
(and (gnus-check-backend-function 'request-create-group nname)
(gnus-request-create-group nname))))
(defun gnus-group-expire-all-groups ()
"Expire all expirable articles in all newsgroups."
(interactive)
- (gnus-message 5 "Expiring...")
- (let ((gnus-group-marked (mapcar (lambda (info) (car info))
- (cdr gnus-newsrc-alist))))
- (gnus-group-expire-articles nil))
+ (save-excursion
+ (gnus-message 5 "Expiring...")
+ (let ((gnus-group-marked (mapcar (lambda (info) (car info))
+ (cdr gnus-newsrc-alist))))
+ (gnus-group-expire-articles nil)))
+ (gnus-group-position-cursor)
(gnus-message 5 "Expiring...done"))
(defun gnus-group-set-current-level (n level)
\f
-(defun gnus-summary-mode ()
+(defun gnus-summary-mode (&optional group)
"Major mode for reading articles.
All normal editing commands are switched off.
(setq selective-display t)
(setq selective-display-ellipses t) ;Display `...'
(setq buffer-display-table gnus-summary-display-table)
+ (setq gnus-newsgroup-name group)
(run-hooks 'gnus-summary-mode-hook))
(defun gnus-summary-make-display-table ()
;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
(setq gnus-summary-buffer (set-buffer (get-buffer-create buffer)))
(gnus-add-current-to-buffer-list)
- (gnus-summary-mode)
+ (gnus-summary-mode group)
(and gnus-carpal (gnus-carpal-setup-buffer 'summary))
(setq gnus-newsgroup-name group)
t)))
If NO-ARTICLE is non-nil, no article is selected initially."
(gnus-message 5 "Retrieving newsgroup: %s..." group)
(let* ((new-group (gnus-summary-setup-buffer group))
+ (quit-config (nth 1 (assoc 'quit-config (gnus-find-method-for-group
+ group))))
(did-select (and new-group (gnus-select-newsgroup group show-all))))
(cond
((not new-group)
(not (equal (current-buffer) kill-buffer))
(progn
(kill-buffer (current-buffer))
- (set-buffer gnus-group-buffer)
- (gnus-group-next-unread-group 1)))
+ (if (not quit-config)
+ (progn
+ (set-buffer gnus-group-buffer)
+ (gnus-group-jump-to-group group)
+ (gnus-group-next-unread-group 1))
+ (if (not (buffer-name (car quit-config)))
+ (gnus-configure-windows 'group)
+ (set-buffer (car quit-config))
+ (and (eq major-mode 'gnus-summary-mode)
+ (gnus-set-global-variables))
+ (gnus-configure-windows (cdr quit-config))))))
(message "Can't select group")
nil)
((eq did-select 'quit)
(not (equal (current-buffer) kill-buffer))
(kill-buffer (current-buffer)))
(gnus-kill-buffer kill-buffer)
- (gnus-configure-windows 'group)
- (gnus-group-next-unread-group 1)
+ (if (not quit-config)
+ (progn
+ (set-buffer gnus-group-buffer)
+ (gnus-group-jump-to-group group)
+ (gnus-group-next-unread-group 1))
+ (if (not (buffer-name (car quit-config)))
+ (gnus-configure-windows 'group)
+ (set-buffer (car quit-config))
+ (and (eq major-mode 'gnus-summary-mode)
+ (gnus-set-global-variables))
+ (gnus-configure-windows (cdr quit-config))))
(signal 'quit nil))
(t
(gnus-set-global-variables)
(progn
(gnus-group-jump-to-group group)
(gnus-group-next-unread-group 1)))
+ (and gnus-use-cache (gnus-cache-possibly-remove-articles))
(if temporary
nil ;Nothing to do.
- (and gnus-use-cache (gnus-cache-possibly-remove-articles))
;; We set all buffer-local variables to nil. It is unclear why
;; this is needed, but if we don't, buffer-local variables are
;; not garbage-collected, it seems. This would the lead to en
(defun gnus-summary-exit-no-update (&optional no-questions)
"Quit reading current newsgroup without updating read article info."
(interactive)
+ (gnus-set-global-variables)
(let* ((group gnus-newsgroup-name)
(quit-config (nth 1 (assoc 'quit-config
(gnus-find-method-for-group group)))))
(defun gnus-summary-fetch-faq (group)
"Fetch the FAQ for the current group."
(interactive (list gnus-newsgroup-name))
- (gnus-configure-windows 'summary-faq)
- (find-file (concat gnus-group-faq-directory group)))
+ (let ((gnus-faq-buffer
+ (find-file (concat gnus-group-faq-directory
+ (gnus-group-real-name group)))))
+ (and gnus-faq-buffer (gnus-configure-windows 'summary-faq))))
;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
(defun gnus-summary-describe-group (force)
;; Walking around group mode buffer from summary mode.
-(defun gnus-summary-next-group (&optional no-article group backward)
+(defun gnus-summary-next-group (&optional no-article target-group backward)
+ "Exit current newsgroup and then select next unread newsgroup.
+If prefix argument NO-ARTICLE is non-nil, no article is selected
+initially. If NEXT-GROUP, go to this group. If BACKWARD, go to
+previous group instead."
+ (interactive "P")
+ (gnus-set-global-variables)
+ (let ((current-group gnus-newsgroup-name)
+ (current-buffer (current-buffer))
+ entered)
+ ;; First we semi-exit this group to update Xrefs and all variables.
+ ;; We can't do a real exit, because the window conf must remain
+ ;; the same in case the user is prompted for info, and we don't
+ ;; want the window conf to change before that...
+ (gnus-summary-exit t)
+ (while (not entered)
+ ;; Then we find what group we are supposed to enter.
+ (set-buffer gnus-group-buffer)
+ (gnus-group-jump-to-group current-group)
+ (setq target-group
+ (or target-group
+ (if (eq gnus-keep-same-level 'best)
+ (gnus-summary-best-group gnus-newsgroup-name)
+ (gnus-summary-search-group backward gnus-keep-same-level))))
+ (if (not target-group)
+ ;; There are no further groups, so we return to the group
+ ;; buffer.
+ (progn
+ (gnus-message 5 "Returning to the group buffer")
+ (setq entered t)
+ (set-buffer current-buffer)
+ (gnus-summary-exit))
+ ;; We try to enter the target group.
+ (gnus-group-jump-to-group target-group)
+ (if (and (not (zerop (gnus-group-group-unread)))
+ (gnus-summary-read-group
+ target-group nil no-article current-buffer))
+ (setq entered t)
+ (setq current-group target-group
+ target-group nil))))))
+
+(defun gnus-summary-next-group-old (&optional no-article group backward)
"Exit current newsgroup and then select next unread newsgroup.
If prefix argument NO-ARTICLE is non-nil, no article is selected initially.
If BACKWARD, go to previous group instead."
(gnus-set-global-variables)
(gnus-summary-select-article gnus-have-all-headers t))
-(defun gnus-summary-verbose-header (arg)
+(defun gnus-summary-verbose-headers (arg)
"Toggle permanent full header display.
If ARG is a positive number, turn header display on.
If ARG is a negative number, turn header display off."
(error "The current newsgroup does not support article moving"))
(let ((articles (gnus-summary-work-articles n))
(prefix (gnus-group-real-prefix gnus-newsgroup-name))
- art-group)
+ art-group to-method)
(if (and (not to-newsgroup) (not select-method))
(setq to-newsgroup
(completing-read
(gnus-activate-newsgroup to-newsgroup)
(error "No such group: %s" to-newsgroup))
(setq gnus-current-move-group to-newsgroup)))
- (or (gnus-check-backend-function 'request-accept-article
- (or select-method to-newsgroup))
- (error "%s does not support article moving" to-newsgroup))
+ (setq to-method (or select-method (gnus-find-method-for-group
+ to-newsgroup)))
+ (or (gnus-check-backend-function 'request-accept-article (car to-method))
+ (error "%s does not support article copying" (car to-method)))
+ (or (gnus-server-opened to-method)
+ (gnus-open-server to-method)
+ (error "Can't open server %s" (car to-method)))
(gnus-message 6 "Moving to %s: %s..."
(or select-method to-newsgroup) articles)
(while articles
(let ((articles (gnus-summary-work-articles n))
(copy-buf (get-buffer-create "*copy work*"))
(prefix (gnus-group-real-prefix gnus-newsgroup-name))
- art-group)
+ art-group to-method)
(buffer-disable-undo copy-buf)
(if (and (not to-newsgroup) (not select-method))
(setq to-newsgroup
(gnus-activate-newsgroup to-newsgroup)
(error "No such group: %s" to-newsgroup))
(setq gnus-current-move-group to-newsgroup)))
- (or (gnus-check-backend-function 'request-accept-article
- (or select-method to-newsgroup))
- (error "%s does not support article copying" to-newsgroup))
+ (setq to-method (or select-method (gnus-find-method-for-group
+ to-newsgroup)))
+ (or (gnus-check-backend-function 'request-accept-article (car to-method))
+ (error "%s does not support article copying" (car to-method)))
+ (or (gnus-server-opened to-method)
+ (gnus-open-server to-method)
+ (error "Can't open server %s" (car to-method)))
(gnus-message 6 "Copying to %s: %s..."
(or select-method to-newsgroup) articles)
(while articles
(and (numberp mark)
(or (= mark gnus-killed-mark) (= mark gnus-del-mark)
(= mark gnus-catchup-mark) (= mark gnus-low-score-mark)
- (= mark gnus-read-mark) (= mark gnus-ancient-mark))))
+ (= mark gnus-read-mark))))
(setq mark gnus-expirable-mark))
(let* ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-del-mark))
(article (or article (gnus-summary-article-number))))
(lambda (char) (char-to-string (symbol-value char)))
'(gnus-del-mark gnus-read-mark gnus-ancient-mark
gnus-killed-mark gnus-kill-file-mark
- gnus-low-score-mark gnus-expirable-mark)
+ gnus-low-score-mark gnus-expirable-mark
+ gnus-canceled-mark)
""))))
(defalias 'gnus-summary-delete-marked-with