From: Lars Magne Ingebrigtsen Date: Wed, 5 Mar 1997 00:04:14 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=a73649ecfed63fe42db8e1edd3d1aeeca34c1257 *** empty log message *** --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5d6064ca..c2e29a766 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,96 @@ +Thu Nov 7 00:14:45 1996 Lars Magne Ingebrigtsen + + * gnus-win.el (gnus-delete-windows-in-gnusey-frames): New function. + (gnus-configure-windows): Use it. + + * nntp.el (nntp-possibly-change-group): Erased wrong buffer. + + * gnus-score.el (gnus-score-find-bnews): Anchor mathces. + + * gnus-group.el (gnus-group-insert-group-line): Would bug out on + on gnus-moderated-hashtb. + +Wed Nov 6 22:54:41 1996 Sudish Joseph + + * gnus-nocem.el (gnus-sum): Required. + +Wed Nov 6 09:13:34 1996 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-date-to-time): Trap errors. + + * nntp.el (nntp-open-connection): Erase contents of the right + buffer. + + * gnus-sum.el (gnus-summary-first-article-p): New function. + + * gnus-topic.el (gnus-topic-remove-group): Didn't use + process/prefix. + + * gnus-group.el (gnus-group-iterate): New macro. + + * gnus-sum.el (gnus-summary-prev-unread-article): Respect + `gnus-summary-goto-unread' `never'. + +Wed Nov 6 06:55:03 1996 Hrvoje Niksic + + * article.el (gnus-emphasis-alist): New version. + +Wed Nov 6 06:26:34 1996 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-syntax-table): New variable. + (gnus-article-mode): Use it. + + * article.el (article-strip-leading-blank-lines): Didn't do much. + +Wed Nov 6 05:51:56 1996 Kevin Buhr + + * gnus-sum.el (gnus-summary-respool-article): Get the right + servers. + +Wed Nov 6 04:00:48 1996 Lars Magne Ingebrigtsen + + * nnheader.el (nnheader-header-value): Use old definition. + + * message.el: Removed many autoloads. + +Wed Nov 6 03:44:44 1996 ISO-2022-JP + + * gnus-ems.el (gnus-ems-redefine): New Mule definition. + +Wed Nov 6 03:02:25 1996 Lars Magne Ingebrigtsen + + * gnus-xmas.el (gnus-xmas-summary-recenter): Force redisplay. + + * gnus.el (gnus-check-backend-function): Protect against errors. + + * gnus-start.el (gnus-group-change-level): Enter info into dribble + file. + +Wed Nov 6 01:58:46 1996 Hrvoje Niksic + + * article.el (gnus-emphasis-alist): New default. + +Wed Nov 6 01:47:17 1996 Joe Wells + + * gnus-uu.el (gnus-uu-reginize-string): Buggy. + (gnus-uu-uustrip-article): Temp name mixup. + +Wed Nov 6 01:27:54 1996 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-make-group): Use new function. + + * gnus.el (gnus-read-group): New function. + + * dgnushack.el: Less error messages under XEmacs. + +Tue Nov 5 23:59:40 1996 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-search-unix-mail-delim): New implementation. + +Tue Nov 5 23:43:34 1996 Lars Magne Ingebrigtsen + + * gnus.el: Red Gnus v0.54 is released. + Tue Nov 5 22:34:01 1996 Lars Magne Ingebrigtsen * message.el (message-goto-signature): Place point better. diff --git a/lisp/article.el b/lisp/article.el index f2876406b..deee09202 100644 --- a/lisp/article.el +++ b/lisp/article.el @@ -119,10 +119,10 @@ asynchronously. The compressed face will be piped to this command." :group 'article) (defcustom gnus-emphasis-alist - '(("_\\(\\w+\\)_" 0 1 underline) - ("\\W\\(/\\(\\w+\\)/\\)\\W" 1 2 italic) - ("\\(_\\*\\|\\*_\\)\\(\\w+\\)\\(_\\*\\|\\*_\\)" 0 2 bold-underline) - ("\\*\\(\\w+\\)\\*" 0 1 bold)) + '(("\\(\\s-\\|^\\)\\(_\\(\\w+\\(\\s-+\\w+\\)*\\)_\\)\\(\\s-\\|[?!.,;]\\)" 2 3 underline) + ("\\(\\s-\\|^\\)\\(\\*\\(\\w+\\(\\s-+\\w+\\)*\\)\\*\\)\\(\\s-\\|[?!.,;]\\)" 2 3 bold) + ("\\(\\s-\\|^\\)\\(\\(\\*_\\|_\\*\\)\\(\\w+\\(\\s-+\\w+\\)*\\)\\(\\*_\\|_\\*\\)\\)\\(\\s-\\|[?!.,;]\\)" 2 4 bold-underline) + ("\\(\\s-\\|^\\)\\(/\\(\\w+\\)/\\)\\s-" 2 3 italic)) "Alist that says how to fontify certain phrases. Each item looks like this: @@ -478,8 +478,8 @@ always hide." (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (insert string) - (article-mime-decode-quoted-printable (goto-char (point-min)) - (point-max)) + (article-mime-decode-quoted-printable + (goto-char (point-min)) (point-max)) (subst-char-in-region (point-min) (point-max) ?_ ? ) (goto-char (point-max))) (when (looking-at "\\([ \t\n]+\\)=\\?") @@ -607,7 +607,7 @@ always hide." (let (buffer-read-only) (goto-char (point-min)) (when (search-forward "\n\n" nil t) - (while (looking-at "[ \t]$") + (while (looking-at "[ \t]*$") (gnus-delete-line)))))) (defun article-strip-multiple-blank-lines () diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 93b99b97f..0b8b548d9 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -37,6 +37,13 @@ (defalias 'efs-re-read-dir 'ignore) (defalias 'ange-ftp-re-read-dir 'ignore) +(eval-and-compile + (unless (string-match "XEmacs" emacs-version) + (fset 'get-popup-menu-response 'ignore) + (fset 'event-object 'ignore) + (fset 'x-defined-colors 'ignore) + (fset 'read-color 'ignore))) + (defun dgnushack-compile () ;;(setq byte-compile-dynamic t) (let ((files (directory-files "." nil ".el$")) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 5c091f11a..7ea9d4fd0 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -286,6 +286,11 @@ displayed by the first non-nil matching CONTENT face." (item :tag "skip" nil) (face :value default))))) +(defvar gnus-article-mode-syntax-table + (copy-syntax-table text-mode-syntax-table) + "Syntax table used in article mode buffers. +Initialized from `text-mode-syntax-table.") + ;;; Internal variables (defvar gnus-article-mode-line-format-alist @@ -704,6 +709,7 @@ commands: (gnus-set-default-directory) (buffer-disable-undo (current-buffer)) (setq buffer-read-only t) + (set-syntax-table gnus-article-mode-syntax-table) (run-hooks 'gnus-article-mode-hook)) (defun gnus-article-setup-buffer () @@ -2007,4 +2013,6 @@ forbidden in URL encoding." (provide 'gnus-art) +(run-hooks 'gnus-art-load-hook) + ;;; gnus-art.el ends here diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 87adf4f26..c78cc2670 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -145,8 +145,25 @@ asynchronously. The compressed face will be piped to this command.")) ((string-match "XEmacs\\|Lucid" emacs-version) (gnus-xmas-redefine)) - ((boundp 'MULE) - ;; Mule definitions + ((featurep 'mule) + ;; Mule and new Emacs definitions + + ;; [Note] Now there are three kinds of mule implementations, + ;; original MULE, XEmacs/mule and beta version of Emacs including + ;; some mule features. Unfortunately these API are different. In + ;; particular, Emacs (including original MULE) and XEmacs are + ;; quite different. + ;; Predicates to check are following: + ;; (boundp 'MULE) is t only if MULE (original; anything older than + ;; Mule 2.3) is running. + ;; (featurep 'mule) is t when every mule variants are running. + + ;; These implementations may be able to share between original + ;; MULE and beta version of new Emacs. In addition, it is able to + ;; detect XEmacs/mule by (featurep 'mule) and to check variable + ;; `emacs-version'. In this case, implementation for XEmacs/mule + ;; may be able to share between XEmacs and XEmacs/mule. + (defalias 'gnus-truncate-string 'truncate-string) (defvar gnus-summary-display-table nil diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 05cb3acd2..dad6917d1 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1206,7 +1206,9 @@ If REGEXP, only list groups matching REGEXP." (or (gnus-gethash gnus-tmp-group gnus-description-hashtb) "") "")) (gnus-tmp-moderated - (if (gnus-gethash gnus-tmp-group gnus-moderated-hashtb) ?m ? )) + (if (and gnus-moderated-hashtb + (gnus-gethash gnus-tmp-group gnus-moderated-hashtb)) + ?m ? )) (gnus-tmp-moderated-string (if (eq gnus-tmp-moderated ?m) "(m)" "")) (gnus-tmp-method @@ -1538,16 +1540,15 @@ Return nil if the group isn't displayed." (defun gnus-group-universal-argument (arg &optional groups func) "Perform any command on all groups according to the process/prefix convention." (interactive "P") - (let ((groups (or groups (gnus-group-process-prefix arg)))) - (if (eq (setq func (or func - (key-binding - (read-key-sequence - (substitute-command-keys - "\\\\[gnus-group-universal-argument]"))))) - 'undefined) - (gnus-error 1 "Undefined key") - (while groups - (gnus-group-remove-mark (pop groups)) + (if (eq (setq func (or func + (key-binding + (read-key-sequence + (substitute-command-keys + "\\\\[gnus-group-universal-argument]"))))) + 'undefined) + (gnus-error 1 "Undefined key") + (gnus-group-iterate arg + (lambda (group) (command-execute func)))) (gnus-group-position-point)) @@ -1593,6 +1594,18 @@ Take into consideration N (the prefix) and the list of marked groups." (let ((group (gnus-group-group-name))) (and group (list group)))))) +(defun gnus-group-iterate (arg function) + "Iterate FUNCTION over all process/prefixed groups. +FUNCTION will be called with the group name as the paremeter +and with point over the group in question." + (let ((groups (gnus-group-process-prefix arg)) + group) + (while (setq group (pop groups)) + (gnus-group-remove-mark group) + (funcall function group)))) + +(put 'gnus-group-iterate 'lisp-indent-function 1) + ;; Selecting groups. (defun gnus-group-read-group (&optional all no-article group) @@ -1869,7 +1882,7 @@ The user will be prompted for a NAME, for a select METHOD, and an ADDRESS." (interactive (list - (read-string "Group name: ") + (gnus-read-group "Group name: ") (gnus-read-method "From method: "))) (let* ((meth (when (and method @@ -2127,7 +2140,8 @@ If SOLID (the prefix), create a solid group." (interactive "P") (require 'nnweb) (let* ((group - (if solid (read-string "Group name: ") (message-unique-id))) + (if solid (gnus-read-group "Group name: ") + (message-unique-id))) (type (completing-read "Search engine type: " @@ -2442,17 +2456,16 @@ If REVERSE, sort in reverse order." ;;; Clearing data -(defun gnus-group-clear-data (n) +(defun gnus-group-clear-data (&optional arg) "Clear all marks and read ranges from the current group." (interactive "P") - (let ((groups (gnus-group-process-prefix n)) - group info) - (while (setq group (pop groups)) - (gnus-info-clear-data (setq info (gnus-get-info group))) - (gnus-get-unread-articles-in-group info (gnus-active group) t) - (when (gnus-group-goto-group group) - (gnus-group-remove-mark group) - (gnus-group-update-group-line))))) + (gnus-group-iterate arg + (lambda (group) + (let (info) + (gnus-info-clear-data (setq info (gnus-get-info group))) + (gnus-get-unread-articles-in-group info (gnus-active group) t) + (when (gnus-group-goto-group group) + (gnus-group-update-group-line)))))) (defun gnus-group-clear-data-on-native-groups () "Clear all marks and read ranges from all native groups." diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index 570bffd7d..e38eff5b1 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -28,6 +28,7 @@ (require 'gnus) (require 'nnmail) (require 'gnus-art) +(require 'gnus-sum) (require 'gnus-range) (defgroup gnus-nocem nil diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index c9d89a0ec..c56b7e812 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -132,6 +132,8 @@ It can be: * A function The result of this function will be used as the home score file. + The function will be passed the name of the group as its + parameter. * A list The elements in this list can be: @@ -144,10 +146,10 @@ It can be: * A function. If the function returns non-nil, the result will be used - as the home score file. + as the home score file. The function will be passed the + name of the group as its parameter. - * A string. - Use the string as the home score file. + * A string. Use the string as the home score file. The list will be traversed from the beginning towards the end looking for matches.") @@ -2352,8 +2354,8 @@ GROUP using BNews sys file syntax." (if (looking-at "not.") (progn (setq not-match t) - (setq regexp (buffer-substring 5 (point-max)))) - (setq regexp (buffer-substring 1 (point-max))) + (setq regexp (concat "^" (buffer-substring 5 (point-max))))) + (setq regexp (concat "^" (buffer-substring 1 (point-max)))) (setq not-match nil)) ;; Finally - if this resulting regexp matches the group name, ;; we add this score file to the list of score files diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index c59ec5fb9..ddcf97d58 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1092,7 +1092,10 @@ the server for new groups." (gnus-sethash group (cons num previous) gnus-newsrc-hashtb)) (when (cdr entry) - (setcdr (gnus-gethash (caadr entry) gnus-newsrc-hashtb) entry))))) + (setcdr (gnus-gethash (caadr entry) gnus-newsrc-hashtb) entry)) + (gnus-dribble-enter + (format + "(gnus-group-set-info '%s)" info))))) (when gnus-group-change-level-function (funcall gnus-group-change-level-function group level oldlevel))))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7a4570897..6e0cd2550 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2387,10 +2387,16 @@ This is all marks except unread, ticked, dormant, and expirable." (set-buffer gnus-article-buffer) (setq gnus-summary-buffer summary)))))) +(defun gnus-summary-first-article-p (&optional article) + "Return whether ARTICLE is the first article in the buffer." + (if (not (setq article (or article (gnus-summary-article-number)))) + nil + (eq article (caar gnus-newsgroup-data)))) + (defun gnus-summary-last-article-p (&optional article) "Return whether ARTICLE is the last article in the buffer." (if (not (setq article (or article (gnus-summary-article-number)))) - t ; All non-existent numbers are the last article. :-) + t ; All non-existent numbers are the last article. :-) (not (cdr (gnus-data-find-list article))))) (defun gnus-make-thread-indent-array () @@ -5370,8 +5376,11 @@ If BACKWARD, the previous article is selected instead of the next." (defun gnus-summary-next-unread-article () "Select unread article after current one." (interactive) - (gnus-summary-next-article t (and gnus-auto-select-same - (gnus-summary-article-subject)))) + (gnus-summary-next-article + (or (not (eq gnus-summary-goto-unread 'never)) + (gnus-summary-last-article-p (gnus-summary-article-number))) + (and gnus-auto-select-same + (gnus-summary-article-subject)))) (defun gnus-summary-prev-article (&optional unread subject) "Select the article after the current one. @@ -5382,8 +5391,11 @@ If UNREAD is non-nil, only unread articles are selected." (defun gnus-summary-prev-unread-article () "Select unread article before current one." (interactive) - (gnus-summary-prev-article t (and gnus-auto-select-same - (gnus-summary-article-subject)))) + (gnus-summary-prev-article + (or (not (eq gnus-summary-goto-unread 'never)) + (gnus-summary-first-article-p (gnus-summary-article-number))) + (and gnus-auto-select-same + (gnus-summary-article-subject)))) (defun gnus-summary-next-page (&optional lines circular) "Show next page of the selected article. @@ -6633,14 +6645,15 @@ latter case, they will be copied into the relevant groups." methods nil t nil 'gnus-mail-method-history)) ms) (cond - ((zerop (length (setq ms (gnus-servers-using-backend method)))) + ((zerop (length (setq ms (gnus-servers-using-backend + (intern method))))) (list (intern method) "")) ((= 1 (length ms)) (car ms)) (t - (cdr (completing-read - "Server name: " - (mapcar (lambda (m) (cons (cadr m) m)) ms) nil t))))))) + (let ((ms-alist (mapcar (lambda (m) (cons (cadr m) m)) ms))) + (cdr (assoc (completing-read "Server name: " ms-alist nil t) + ms-alist)))))))) (gnus-set-global-variables) (unless method (error "No method given for respooling")) @@ -8392,4 +8405,6 @@ save those articles instead." (provide 'gnus-sum) +(run-hooks 'gnus-sum-load-hook) + ;;; gnus-sum.el ends here diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index fa1136a05..f0e7e3306 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1012,17 +1012,18 @@ If COPYP, copy the groups instead." (gnus-topic-goto-topic start-topic)) (gnus-group-list-groups))) -(defun gnus-topic-remove-group () +(defun gnus-topic-remove-group (&optional arg) "Remove the current group from the topic." - (interactive) - (let ((topicl (assoc (gnus-current-topic) gnus-topic-alist)) - (group (gnus-group-group-name)) - (buffer-read-only nil)) - (when (and topicl group) - (gnus-delete-line) - (gnus-delete-first group topicl)) - (gnus-topic-update-topic) - (gnus-group-position-point))) + (interactive "P") + (gnus-group-iterate arg + (lambda (group) + (let ((topicl (assoc (gnus-current-topic) gnus-topic-alist)) + (buffer-read-only nil)) + (when (and topicl group) + (gnus-delete-line) + (gnus-delete-first group topicl)) + (gnus-topic-update-topic) + (gnus-group-position-point))))) (defun gnus-topic-copy-group (n topic) "Copy the current group to a topic." diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index b88f7a1df..f3656b080 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -983,15 +983,10 @@ didn't work, and overwrite existing files. Otherwise, ask each time.") (replace-match "[0-9]+ of [0-9]+") (end-of-line) - (while (and (re-search-backward "[0-9]" nil t) (> count 0)) - (while (and - (looking-at "[0-9]") - (< 1 (goto-char (1- (point)))))) - (re-search-forward "[0-9]+" nil t) - (replace-match "[0-9]+") - (backward-char 5) - (setq count (1- count))))) - + (if (re-search-backward "\\([^0-9]\\)[0-9]+\\([^0-9]+\\)[0-9]+" + nil t) + (replace-match "\\1[0-9]+\\2[0-9]+" t nil nil nil)))) + (goto-char beg) (while (re-search-forward "[ \t]+" nil t) (replace-match "[ \t]*" t t)) @@ -1334,6 +1329,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time.") (let ((nnheader-file-name-translation-alist '((?/ . ?,) (? . ?_) (?* . ?_) (?$ . ?_)))) (nnheader-translate-file-chars (match-string 1)))) + (replace-match (concat "begin 644 " gnus-uu-file-name) t t) ;; Remove any non gnus-uu-body-line right after start. (forward-line 1) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index e148e53a1..0cb2bb8a9 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -421,14 +421,7 @@ buffer configuration.") (delete-other-windows) ;; This is a `frame' split, so we delete all windows ;; on all frames. - (mapcar - (lambda (frame) - (unless (eq (cdr (assq 'minibuffer - (frame-parameters frame))) - 'only) - (select-frame frame) - (delete-other-windows))) - (frame-list))) + (gnus-delete-windows-in-gnusey-frames)) ;; Just remove some windows. (gnus-remove-some-windows) (switch-to-buffer nntp-server-buffer)) @@ -437,6 +430,30 @@ buffer configuration.") (switch-to-buffer nntp-server-buffer) (gnus-configure-frame split (get-buffer-window (current-buffer)))))) +(defun gnus-delete-windows-in-gnusey-frames () + "Do a `delete-other-windows' in all frames that have Gnus windows." + (let ((buffers + (mapcar + (lambda (elem) + (if (symbolp (cdr elem)) + (get-buffer (symbol-value (cdr elem))) + (get-buffer (cdr elem)))) + gnus-window-to-buffer))) + (mapcar + (lambda (frame) + (unless (eq (cdr (assq 'minibuffer + (frame-parameters frame))) + 'only) + (select-frame frame) + (let (do-delete) + (walk-windows + (lambda (window) + (when (memq (window-buffer window) buffers) + (setq do-delete t)))) + (when do-delete + (delete-other-windows))))) + (frame-list)))) + (defun gnus-all-windows-visible-p (split) "Say whether all buffers in SPLIT are currently visible. In particular, the value returned will be the window that diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index 0efa3285a..8ed657c89 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -143,6 +143,8 @@ If `gnus-auto-center-summary' is nil, or the article buffer isn't displayed, no centering will be performed." ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. + ;; Force redisplay to get properly computed window height. + (sit-for 0) (when gnus-auto-center-summary (let* ((height (if (fboundp 'window-displayed-height) (window-displayed-height) diff --git a/lisp/gnus.el b/lisp/gnus.el index 9dd64c2ea..0e2f8ae5e 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -42,7 +42,7 @@ "Score and kill file handling." :group 'gnus ) -(defconst gnus-version-number "0.54" +(defconst gnus-version-number "0.55" "Version number for this version of Gnus.") (defconst gnus-version (format "Red Gnus v%s" gnus-version-number) @@ -697,6 +697,7 @@ want.") ;; Variable holding the user answers to all method prompts. (defvar gnus-method-history nil) +(defvar gnus-group-history nil) ;; Variable holding the user answers to all mail method prompts. (defvar gnus-mail-method-history nil) @@ -1718,11 +1719,14 @@ If NEWSGROUP is nil, return the global kill file name instead." (defun gnus-check-backend-function (func group) "Check whether GROUP supports function FUNC." - (let ((method (if (stringp group) (car (gnus-find-method-for-group group)) - group))) - (unless (featurep method) - (require method)) - (fboundp (intern (format "%s-%s" method func))))) + (condition-case () + (let ((method (if (stringp group) + (car (gnus-find-method-for-group group)) + group))) + (unless (featurep method) + (require method)) + (fboundp (intern (format "%s-%s" method func)))) + (error nil))) (defun gnus-methods-using (feature) "Find all methods that have FEATURE." @@ -1734,6 +1738,20 @@ If NEWSGROUP is nil, return the global kill file name instead." (setq valids (cdr valids))) outs)) +(defun gnus-read-group (prompt) + "Prompt the user for a group name. +Disallow illegal group names." + (let ((prefix "") + group) + (while (not group) + (when (string-match + "[ `'\"/]" + (setq group (read-string (concat prefix prompt) + "" 'gnus-group-history))) + (setq prefix (format "Illegal group name: \"%s\". " group) + group nil))) + group)) + (defun gnus-read-method (prompt) "Prompt the user for a method. Allow completion over sensible values." diff --git a/lisp/message.el b/lisp/message.el index 5abab328b..6320e0abc 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -56,7 +56,6 @@ This function will be called with the name of the file to store the article in. The default function is `rmail-output' which saves in Unix mailbox format.") -;;;###autoload (defvar message-courtesy-message "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" "*This is inserted at the start of a mailed copy of a posted message. @@ -64,7 +63,6 @@ If the string contains the format spec \"%s\", the Newsgroups the article has been posted to will be inserted there. If this variable is nil, no such courtesy message will be added.") -;;;###autoload (defvar message-ignored-bounced-headers "^\\(Received\\|Return-Path\\):" "*Regexp that matches headers to be removed in resent bounced mail.") @@ -82,7 +80,6 @@ If `angles', they look like: Otherwise, most addresses look like `angles', but they look like `parens' if `angles' would need quoting and `parens' would not.") -;;;###autoload (defvar message-syntax-checks nil "Controls what syntax checks should not be performed on outgoing posts. To disable checking of long signatures, for instance, add @@ -95,7 +92,6 @@ long-lines control-chars size new-text redirected-followup signature approved sender empty empty-headers message-id from subject shorten-followup-to existing-newsgroups.") -;;;###autoload (defvar message-required-news-headers '(From Newsgroups Subject Date Message-ID (optional . Organization) Lines @@ -106,7 +102,6 @@ Message-ID. Organization, Lines, In-Reply-To, Expires, and X-Newsreader are optional. If don't you want message to insert some header, remove it from this list.") -;;;###autoload (defvar message-required-mail-headers '(From Subject Date (optional . In-Reply-To) Message-ID Lines (optional . X-Mailer)) @@ -114,20 +109,16 @@ header, remove it from this list.") RFC822 required that From, Date, To, Subject and Message-ID be included. Organization, Lines and X-Mailer are optional.") -;;;###autoload (defvar message-deletable-headers '(Message-ID Date Lines) "*Headers to be deleted if they already exist and were generated by message previously.") -;;;###autoload (defvar message-ignored-news-headers "^NNTP-Posting-Host:\\|^Xref:\\|^Bcc:\\|^Gcc:\\|^Fcc:\\|^Resent-Fcc:" "*Regexp of headers to be removed unconditionally before posting.") -;;;###autoload (defvar message-ignored-mail-headers "^Gcc:\\|^Fcc:\\|^Resent-Fcc:" "*Regexp of headers to be removed unconditionally before mailing.") -;;;###autoload (defvar message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|Return-Path:\\|^Supersedes:" "*Header lines matching this regexp will be deleted before posting. It's best to delete old Path and Date headers before posting to avoid @@ -137,19 +128,16 @@ any confusion.") (defvar message-signature-separator "^-- *$" "Regexp matching the signature separator.") -;;;###autoload (defvar message-interactive nil "Non-nil means when sending a message wait for and display errors. nil means let mailer mail back a message to report errors.") -;;;###autoload (defvar message-generate-new-buffers t "*Non-nil means that a new message buffer will be created whenever `mail-setup' is called. If this is a function, call that function with three parameters: The type, the to address and the group name. (Any of these may be nil.) The function should return the new buffer name.") -;;;###autoload (defvar message-kill-buffer-on-exit nil "*Non-nil means that the message buffer will be killed after sending a message.") @@ -179,20 +167,16 @@ If nil, message won't autosave.") "------- End of forwarded message -------\n" "*Delimiter inserted after forwarded messages.") -;;;###autoload (defvar message-signature-before-forwarded-message t "*If non-nil, put the signature before any included forwarded message.") -;;;###autoload (defvar message-included-forward-headers "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-\\|^Message-ID:\\|^References:" "*Regexp matching headers to be included in forwarded messages.") -;;;###autoload (defvar message-ignored-resent-headers "^Return-receipt" "*All headers that match this regexp will be deleted when resending a message.") -;;;###autoload (defvar message-ignored-cited-headers "." "*Delete these headers from the messages you yank.") @@ -209,31 +193,26 @@ variable `mail-header-separator'. Legal values include `message-send-mail-with-sendmail' (the default), `message-send-mail-with-mh' and `message-send-mail-with-qmail'.") -;;;###autoload (defvar message-send-news-function 'message-send-news "Function to call to send the current buffer as news. The headers should be delimited by a line whose contents match the variable `mail-header-separator'.") -;;;###autoload (defvar message-reply-to-function nil "Function that should return a list of headers. This function should pick out addresses from the To, Cc, and From headers and respond with new To and Cc headers.") -;;;###autoload (defvar message-wide-reply-to-function nil "Function that should return a list of headers. This function should pick out addresses from the To, Cc, and From headers and respond with new To and Cc headers.") -;;;###autoload (defvar message-followup-to-function nil "Function that should return a list of headers. This function should pick out addresses from the To, Cc, and From headers and respond with new To and Cc headers.") -;;;###autoload (defvar message-use-followup-to 'ask "*Specifies what to do with Followup-To header. If nil, ignore the header. If it is t, use its value, but query before @@ -255,7 +234,6 @@ might set this variable to '(\"-f\" \"you@some.where\").") (defvar gnus-post-method) (defvar gnus-select-method) -;;;###autoload (defvar message-post-method (cond ((and (boundp 'gnus-post-method) gnus-post-method) @@ -265,7 +243,6 @@ might set this variable to '(\"-f\" \"you@some.where\").") (t '(nnspool ""))) "Method used to post news.") -;;;###autoload (defvar message-generate-headers-first nil "*If non-nil, generate all possible headers before composing.") @@ -353,17 +330,14 @@ If stringp, use this; if non-nil, use no host name (user name only).") (defvar message-postpone-actions nil "A list of actions to be performed after postponing a message.") -;;;###autoload (defvar message-default-headers nil "*A string containing header lines to be inserted in outgoing messages. It is inserted before you edit the message, so you can edit or delete these lines.") -;;;###autoload (defvar message-default-mail-headers nil "*A string of header lines to be inserted in outgoing mails.") -;;;###autoload (defvar message-default-news-headers nil "*A string of header lines to be inserted in outgoing news articles.") diff --git a/lisp/nnheader.el b/lisp/nnheader.el index e9bd42727..f6e6fb65b 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -146,11 +146,7 @@ on your system, you could say something like: ;; Parsing headers and NOV lines. (defsubst nnheader-header-value () - (buffer-substring - (match-end 0) - (if (re-search-forward "^[^ \t]" nil 'move) - (- (point) 2) - (1- (point))))) + (buffer-substring (match-end 0) (gnus-point-at-eol))) (defvar nnheader-newsgroup-none-id 1) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 627d47950..b65dad200 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -349,15 +349,18 @@ parameter. It should return nil, `warn' or `delete'.") (defun nnmail-date-to-time (date) "Convert DATE into time." - (let* ((d1 (timezone-parse-date date)) - (t1 (timezone-parse-time (aref d1 3)))) - (apply 'encode-time - (mapcar (lambda (el) - (and el (string-to-number el))) - (list - (aref t1 2) (aref t1 1) (aref t1 0) - (aref d1 2) (aref d1 1) (aref d1 0) - (aref d1 4)))))) + (condition-case () + (let* ((d1 (timezone-parse-date date)) + (t1 (timezone-parse-time (aref d1 3)))) + (apply 'encode-time + (mapcar (lambda (el) + (and el (string-to-number el))) + (list + (aref t1 2) (aref t1 1) (aref t1 0) + (aref d1 2) (aref d1 1) (aref d1 0) + (aref d1 4))))) + ;; If we get an error, then we just return a 0 time. + (error (list 0 0)))) (defun nnmail-time-less (t1 t2) "Say whether time T1 is less than time T2." @@ -625,33 +628,35 @@ is a spool. If not using procmail, return GROUP." (goto-char end)))) (defun nnmail-search-unix-mail-delim () - "Put point at the beginning of the next message." - (let ((case-fold-search t) - (delim (concat "^" message-unix-mail-delimiter)) - found search ) + "Put point at the beginning of the next Unix mbox message." + ;; Algorithm used to find the the next article in the + ;; brain-dead Unix mbox format: + ;; + ;; 1) Search for "^From ". + ;; 2) If we find it, then see whether the previous + ;; line is blank and the next line looks like a header. + ;; Then it's possible that this is a mail delim, and we use it. + (let ((case-fold-search nil) + found) (while (not found) - (setq search (condition-case () - (re-search-forward delim nil t) - (error 'error))) - (cond - ((eq search 'error) - (setq found 'yes)) - (search - (when (or (looking-at "[^\n :]+ *:") - (looking-at delim) - (looking-at (concat ">" message-unix-mail-delimiter))) - (forward-line -1) - (setq found 'yes))) - (t - (setq found 'no)))) + (if (not (re-search-forward "^From " nil t)) + (setq found 'no) + (beginning-of-line) + (when (and (or (bobp) + (save-excursion + (forward-line -1) + (= (following-char) ?\n))) + (save-excursion + (forward-line 1) + (looking-at "[^ \t:]+[ \t]*:"))) + (setq found 'yes)))) (eq found 'yes))) (defun nnmail-process-unix-mail-format (func artnum-func) - (let ((case-fold-search t) - (delim (concat "^" message-unix-mail-delimiter)) + (let ((case-fold-search nil) start message-id content-length end skip head-end) (goto-char (point-min)) - (if (not (and (re-search-forward delim nil t) + (if (not (and (re-search-forward "^From " nil t) (goto-char (match-beginning 0)))) ;; Possibly wrong format? (error "Error, unknown mail format! (Possibly corrupted.)") @@ -710,10 +715,9 @@ is a spool. If not using procmail, return GROUP." (cond ((or (= skip (point-max)) (= (1+ skip) (point-max))) (setq end (point-max))) - ((looking-at delim) + ((looking-at "From ") (setq end skip)) - ((looking-at - (concat "[ \t]*\n\\(" delim "\\)")) + ((looking-at "[ \t]*\n\\(From \\)") (setq end (match-beginning 1))) (t (setq end nil)))) (if end diff --git a/lisp/nntp.el b/lisp/nntp.el index 0a381fc09..a21f06612 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -587,7 +587,7 @@ It will prompt for a password." (set-buffer nntp-server-buffer) (nntp-read-server-type) (run-hooks 'nntp-server-opened-hook) - (set-buffer pbuffer) + (set-buffer buffer) (erase-buffer))) (when (buffer-name (process-buffer process)) (kill-buffer (process-buffer process))) @@ -744,7 +744,9 @@ It will prompt for a password." (let ((entry (nntp-find-connection-entry nntp-server-buffer))) (when (not (equal group (caddr entry))) (nntp-request-group group) - (erase-buffer))))) + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer)))))) (defun nntp-decode-text (&optional cr-only) "Decode the text in the current buffer." diff --git a/texi/ChangeLog b/texi/ChangeLog index 276ee48a5..bff7d9f84 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,12 @@ +Wed Nov 6 06:39:44 1996 Lars Magne Ingebrigtsen + + * gnus.texi (Misc Article): Addition. + (Emacsen): Updated. + +Wed Nov 6 03:52:05 1996 C. R. Oldham + + * Makefile (.texi.dvi): Fix rule. + Tue Nov 5 10:45:39 1996 Lars Magne Ingebrigtsen * gnus.texi (Other Decode Variables): Addition. diff --git a/texi/Makefile b/texi/Makefile index 80e90a67c..d8fa7290b 100644 --- a/texi/Makefile +++ b/texi/Makefile @@ -28,6 +28,8 @@ dvi: gnus.dvi message.dvi .texi.dvi : $(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' $< > gnustmp.texi $(TEXI2DVI) gnustmp.texi + cp gnustmp.dvi $*.dvi + rm gnustmp.* refcard.dvi: refcard.tex gnuslogo.refcard gnusref.tex $(LATEX) refcard.tex diff --git a/texi/gnus.texi b/texi/gnus.texi index 24515652b..1c2b9a898 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Red Gnus 0.54 Manual +@settitle Red Gnus 0.55 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -287,7 +287,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Red Gnus 0.54 Manual +@title Red Gnus 0.55 Manual @author by Lars Magne Ingebrigtsen @page @@ -1189,17 +1189,16 @@ background is dark: @lisp (setq gnus-group-highlight - `(((> unread 200) . - ,(custom-face-lookup "Red" nil nil t nil nil)) - ((and (< level 3) (zerop unread)) . - ,(custom-face-lookup "SeaGreen" nil nil t nil nil)) - ((< level 3) . - ,(custom-face-lookup "SpringGreen" nil nil t nil nil)) - ((zerop unread) . - ,(custom-face-lookup "SteelBlue" nil nil t nil nil)) - (t . - ,(custom-face-lookup "SkyBlue" nil nil t nil nil)) - )) + `(((> unread 200) . + ,(custom-face-lookup "Red" nil nil t nil nil)) + ((and (< level 3) (zerop unread)) . + ,(custom-face-lookup "SeaGreen" nil nil t nil nil)) + ((< level 3) . + ,(custom-face-lookup "SpringGreen" nil nil t nil nil)) + ((zerop unread) . + ,(custom-face-lookup "SteelBlue" nil nil t nil nil)) + (t . + ,(custom-face-lookup "SkyBlue" nil nil t nil nil)))) @end lisp Variables that are dynamically bound when the forms are evaluated @@ -1945,7 +1944,10 @@ ticked articles. @end table @item comment -This parameter allows you to enter an arbitrary comment on the group. +Elements that look like @code{(comment . "This is a comment")} +are arbitrary comments on the group. They are currently ignored by +Gnus, but provide a place for you to store information on particular +groups. @item @var{(variable form)} You can use the group parameters to set variables local to the group you @@ -4735,7 +4737,7 @@ shorter than 100 lines, you could say something like: "Return non-nil for short, unread articles." (and (gnus-data-unread-p data) (< (mail-header-lines (gnus-data-header data)) - 100))) + 100))) (setq gnus-async-prefetch-article-p 'my-async-short-unread-p) @end lisp @@ -7212,6 +7214,11 @@ hiding headers, and the like. @vindex gnus-article-mode-hook Hook called in article mode buffers. +@item gnus-article-mode-syntax-table +@vindex gnus-article-mode-syntax-table +Syntax table used in article buffers. It is initialized from +@code{text-mode-syntax-table}. + @vindex gnus-article-mode-line-format @item gnus-article-mode-line-format This variable is a format string along the same lines as @@ -13397,43 +13404,23 @@ Gnus should work on : @itemize @bullet @item -Emacs 19.30 and up. +Emacs 19.32 and up. @item -XEmacs 19.13 and up. +XEmacs 19.14 and up. @item -Mule versions based on Emacs 19.30 and up. +Mule versions based on Emacs 19.32 and up. @end itemize Gnus will absolutely not work on any Emacsen older than that. Not reliably, at least. -There are some vague differences between Gnus on the various platforms: - -@itemize @bullet - -@item -The mouse-face on Gnus lines under Emacs and Mule is delimited to -certain parts of the lines while they cover the entire line under -XEmacs. - -@item -The same with current-article marking---XEmacs puts an underline under -the entire summary line while Emacs and Mule are nicer and kinder. - -@item -XEmacs features more graphics---a logo and a toolbar. - -@item -Citation highlighting us better under Emacs and Mule than under XEmacs. - -@item -Emacs 19.26-19.28 have tangible hidden headers, which can be a bit -confusing. - -@end itemize +There are some vague differences between Gnus on the various +platforms---XEmacs features more graphics (a logo and a toolbar)---but +other than that, things should look pretty much the same under all +Emacsen. @node Contributors @@ -13581,6 +13568,7 @@ Lantz Moore, Morioka Tomohiko, @c Morioka Hrvoje Niksic, Andy Norman, +C. R. Oldham, Alexandre Oliva, Ken Olstad, Masaharu Onishi, @c Onishi @@ -13591,6 +13579,7 @@ Ulrich Pfeifer, Colin Rafferty, Bart Robinson, Ralph Schleicher, +Randal L. Schwartz, Danny Siu, Paul D. Smith, Jeff Sparkes, @@ -13609,6 +13598,7 @@ Joe Wells, and Katsumi Yamaoka. @c Yamaoka + Apologies to everybody that I've forgotten, of which there are many, I'm sure.