From: ichikawa Date: Tue, 28 Apr 1998 11:59:50 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ichikawa-199811302358~73 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9045802faf746876a3baf59686fff0d542accb99;p=elisp%2Fgnus.git- *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index ed0199e..f3dda94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-04-28 Shuhei KOBAYASHI + + * lisp/gnus.el (gnus-version-number): Update to 6.2.3. + + * Sync up with Gnus 5.6.6. + 1998-04-27 MORIOKA Tomohiko * lisp/nnheader.el: Sync up with Gnus 5.6.5. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index feb5648..bd682c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,108 @@ +Mon Apr 27 00:26:01 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.6 is released. + +Mon Apr 27 00:07:11 1998 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-request-article-this-buffer): Viewing pseudos + in nneething groups bugged. + + * gnus-sum.el (gnus-summary-prepare-threads): Dummy roots and + dormants and stuff. + +Sun Apr 26 23:34:40 1998 Lars Magne Ingebrigtsen + + * gnus-cache.el (gnus-cache-file-name): Use FULL. + + * nnheader.el (nnheader-translate-file-chars): Allow FULL + parameter. + + * gnus-cache.el (gnus-cache-file-name): Translate all colons. + +Sun Apr 26 19:27:56 1998 Justin Sheehy + + * nntp.el (nntp-rlogin-parameters): Doc fix. + +Sun Apr 26 19:21:12 1998 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-summary-save-in-mail): Not a command. + +Sun Apr 26 19:16:03 1998 James Troup + + * gnus-sum.el (gnus-summary-expire-articles-now): Work. + +Sun Apr 26 14:34:06 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-build-sparse-threads): Break loops. + (gnus-summary-print-article): Save excursion to try to preserve + local/bound variable messup. + + * gnus-salt.el (gnus-tree-read-summary-keys): Put point in article + buffer. + + * gnus-undo.el (gnus-undo): New group. + (gnus-undo-limit): New variable. + (gnus-undo-register-1): Use it. + + * gnus-sum.el (gnus-summary-update-info): Don't nix out scores. + + * gnus-start.el (gnus-active-to-gnus-format): Removed "." from + quoting. + + * gnus.el (gnus-cache-directory): Moved here. + (gnus-predefined-server-alist): Use. + + * message.el (message-autosave-directory): Put back in. + (message-set-auto-save-file-name): Use if Gnus isn't running. + + * gnus-util.el (gnus-alive-p): Moved here. + + * message.el (message-autosave-directory): Removed. + (message-set-auto-save-file-name): Don't use it. + + * gnus.el: Use gnus-buffer-exists-p throughout. + + * gnus-uu.el (gnus-uu-save-article): Use gnus-kill-buffer. + + * message.el (message-make-in-reply-to): Check more for strange + From lines. + + * gnus-art.el (gnus-article-mode): Don't nix out vars. + +Sun Apr 26 14:05:40 1998 Frank Bennett + + * nnmail.el (nnmail-move-inbox): Push error'ed mailboxes onto the + list. + +Sun Apr 26 13:01:53 1998 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-score-save): Use it. + + * score-mode.el (score-mode-syntax-table): New table. + + * nnmbox.el: Commentary fix. + +Sun Apr 26 12:59:00 1998 Richard Stallman + + * message.el (message-mode): New adaptive fill defaults. + +Sun Apr 26 12:50:38 1998 Jim Radford + + * gnus-start.el (gnus-active-to-gnus-format): Groups that start + with dots. + +1998-04-11 Richard Stallman + + * gnus/gnus-art.el (gnus-emphasis-alist): Use nth, not caddr. + +Sat Apr 25 15:33:57 1998 Kim-Minh Kaplan + + * gnus-sum.el (gnus-build-sparse-threads): Handle loops. + +Sat Apr 25 15:09:54 1998 Lars Magne Ingebrigtsen + + * gnus.el (gnus-valid-select-methods): nngateway is post-mail. + Fri Apr 24 21:32:14 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.5 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 360bcb9..b4541ae 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -199,7 +199,7 @@ asynchronously. The compressed face will be piped to this command." (lambda (spec) (list (format format (car spec) (cadr spec)) - 2 3 (intern (format "gnus-emphasis-%s" (caddr spec))))) + 2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) types))) "*Alist that says how to fontify certain phrases. Each item looks like this: @@ -1584,7 +1584,6 @@ This format is defined by the `gnus-article-time-format' variable." "Append this article to Rmail file. Optional argument FILENAME specifies file name. Directory to save to is default to `gnus-article-save-directory'." - (interactive) (setq filename (gnus-read-save-file-name "Save %s in rmail file:" filename gnus-rmail-save-name gnus-newsgroup-name @@ -1600,7 +1599,6 @@ Directory to save to is default to `gnus-article-save-directory'." "Append this article to Unix mail file. Optional argument FILENAME specifies file name. Directory to save to is default to `gnus-article-save-directory'." - (interactive) (setq filename (gnus-read-save-file-name "Save %s in Unix mail file:" filename gnus-mail-save-name gnus-newsgroup-name @@ -1619,7 +1617,6 @@ Directory to save to is default to `gnus-article-save-directory'." "Append this article to file. Optional argument FILENAME specifies file name. Directory to save to is default to `gnus-article-save-directory'." - (interactive) (setq filename (gnus-read-save-file-name "Save %s in file:" filename gnus-file-save-name gnus-newsgroup-name @@ -1638,14 +1635,12 @@ Directory to save to is default to `gnus-article-save-directory'." "Write this article to a file. Optional argument FILENAME specifies file name. The directory to save in defaults to `gnus-article-save-directory'." - (interactive) (gnus-summary-save-in-file nil t)) (defun gnus-summary-save-body-in-file (&optional filename) "Append this article body to a file. Optional argument FILENAME specifies file name. The directory to save in defaults to `gnus-article-save-directory'." - (interactive) (setq filename (gnus-read-save-file-name "Save %s body in file:" filename gnus-file-save-name gnus-newsgroup-name @@ -1662,7 +1657,6 @@ The directory to save in defaults to `gnus-article-save-directory'." (defun gnus-summary-save-in-pipe (&optional command) "Pipe this article to subprocess." - (interactive) (setq command (cond ((eq command 'default) gnus-last-shell-command) @@ -1892,9 +1886,9 @@ commands: (use-local-map gnus-article-mode-map) (gnus-update-format-specifications nil 'article-mode) (set (make-local-variable 'page-delimiter) gnus-page-delimiter) - (set (make-local-variable 'gnus-page-broken) nil) - (set (make-local-variable 'gnus-button-marker-list) nil) - (set (make-local-variable 'gnus-article-current-summary) nil) + (make-local-variable 'gnus-page-broken) + (make-local-variable 'gnus-button-marker-list) + (make-local-variable 'gnus-article-current-summary) (gnus-set-default-directory) (buffer-disable-undo (current-buffer)) (setq buffer-read-only t) @@ -2408,7 +2402,7 @@ If given a prefix, show the hidden text instead." (when (and (numberp article) gnus-summary-buffer (get-buffer gnus-summary-buffer) - (buffer-name (get-buffer gnus-summary-buffer))) + (gnus-buffer-exists-p gnus-summary-buffer)) (save-excursion (set-buffer gnus-summary-buffer) (let ((header (gnus-summary-article-header article))) @@ -2432,8 +2426,8 @@ If given a prefix, show the hidden text instead." (let ((method (gnus-find-method-for-group gnus-newsgroup-name))) - (if (not (eq (car method) 'nneething)) - () + (when (and (eq (car method) 'nneething) + (vectorp header)) (let ((dir (concat (file-name-as-directory (nth 1 method)) (mail-header-subject header)))) (when (file-directory-p dir) @@ -2445,7 +2439,7 @@ If given a prefix, show the hidden text instead." ((and (numberp article) gnus-summary-buffer (get-buffer gnus-summary-buffer) - (buffer-name (get-buffer gnus-summary-buffer)) + (gnus-buffer-exists-p gnus-summary-buffer) (eq (cdr (save-excursion (set-buffer gnus-summary-buffer) (assq article gnus-newsgroup-reads))) @@ -2502,7 +2496,7 @@ If given a prefix, show the hidden text instead." (buffer-name (get-buffer gnus-article-buffer)))) (save-excursion (if (get-buffer gnus-original-article-buffer) - (set-buffer (get-buffer gnus-original-article-buffer)) + (set-buffer gnus-original-article-buffer) (set-buffer (get-buffer-create gnus-original-article-buffer)) (buffer-disable-undo (current-buffer)) (setq major-mode 'gnus-original-article-mode) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 00d1f4a..844c074 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -34,16 +34,6 @@ (eval-when-compile (require 'gnus-sum)) -(defgroup gnus-cache nil - "Cache interface." - :group 'gnus) - -(defcustom gnus-cache-directory - (nnheader-concat gnus-directory "cache/") - "*The directory where cached articles will be stored." - :group 'gnus-cache - :type 'directory) - (defcustom gnus-cache-active-file (concat (file-name-as-directory gnus-cache-directory) "active") "*The cache active file." @@ -409,7 +399,8 @@ Returns the list of articles removed." ;; Translate the first colon into a slash. (when (string-match ":" group) (aset group (match-beginning 0) ?/)) - (nnheader-replace-chars-in-string group ?. ?/))))) + (nnheader-replace-chars-in-string group ?. ?/))) + t)) (if (stringp article) article (int-to-string article)))) (defun gnus-cache-update-article (group article) diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index 9f86512..f5e5d6c 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -97,9 +97,9 @@ (gnus-draft-setup article gnus-newsgroup-name) (push `((lambda () - (when (buffer-name (get-buffer ,gnus-summary-buffer)) + (when (gnus-buffer-exists-p ,gnus-summary-buffer) (save-excursion - (set-buffer (get-buffer ,gnus-summary-buffer)) + (set-buffer ,gnus-summary-buffer) (gnus-cache-possibly-remove-article ,article nil nil nil t))))) message-send-actions))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index a1bb4c5..23759b3 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -196,9 +196,9 @@ Thank you for your help in stamping out bugs. (message-add-action `(set-window-configuration ,winconf) 'exit 'postpone 'kill) (message-add-action - `(when (buffer-name (get-buffer ,buffer)) + `(when (gnus-buffer-exists-p ,buffer) (save-excursion - (set-buffer (get-buffer ,buffer)) + (set-buffer ,buffer) ,(when article `(gnus-summary-mark-article-as-replied ,article)))) 'send)) @@ -320,9 +320,9 @@ header line with the old Message-ID." (message-supersede) (push `((lambda () - (when (buffer-name (get-buffer ,gnus-summary-buffer)) + (when (gnus-buffer-exists-p ,gnus-summary-buffer) (save-excursion - (set-buffer (get-buffer ,gnus-summary-buffer)) + (set-buffer ,gnus-summary-buffer) (gnus-cache-possibly-remove-article ,article nil nil nil t) (gnus-summary-mark-as-read ,article gnus-canceled-mark))))) message-send-actions)))) @@ -341,7 +341,7 @@ header line with the old Message-ID." (let ((article-buffer (or article-buffer gnus-article-buffer)) end beg contents) (if (not (and (get-buffer article-buffer) - (buffer-name (get-buffer article-buffer)))) + (gnus-buffer-exists-p article-buffer))) (error "Can't find any article buffer") (save-excursion (set-buffer article-buffer) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 1efc228..c115064 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -184,8 +184,10 @@ arguments necessary for the job.") (defun gnus-get-buffer-name (variable) "Returns the buffer name associated with the contents of a variable." - (buffer-name (get-buffer (gnus-window-to-buffer-helper + (let ((buf (get-buffer (gnus-window-to-buffer-helper (cdr (assq variable gnus-window-to-buffer)))))) + (and buf + (buffer-name buf)))) (defun gnus-picons-buffer-name () (cond ((or (stringp gnus-picons-display-where) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index bbd3cf5..849b2c7 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -468,6 +468,7 @@ Two predefined functions are available: (interactive "P") (let ((buf (current-buffer)) win) + (set-buffer gnus-article-buffer) (gnus-article-read-summary-keys arg nil t) (when (setq win (get-buffer-window buf)) (select-window win) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 435b288..faea1c9 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -32,6 +32,7 @@ (require 'gnus-sum) (require 'gnus-range) (require 'message) +(require 'score-mode) (defcustom gnus-global-score-files nil "List of global score files and directories. @@ -1327,7 +1328,8 @@ SCORE is the score to add." (gnus-prin1 score) ;; This is a normal score file, so we print it very ;; prettily. - (pp score (current-buffer)))) + (let ((emacs-lisp-mode-syntax-table score-mode-syntax-table)) + (pp score (current-buffer))))) (gnus-make-directory (file-name-directory file)) ;; If the score file is empty, we delete it. (if (zerop (buffer-size)) diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 3b593ca..5471940 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -517,7 +517,6 @@ Return whether the unpacking was successful." t) (t (buffer-disable-undo msg-buf) - (buffer-disable-undo tmp-buf) (set-buffer msg-buf) (goto-char (point-min)) (while (not (eobp)) diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 60be10f..00bfcca 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -182,9 +182,8 @@ val) (when (and (boundp buffer) (setq val (symbol-value buffer)) - (get-buffer val) - (buffer-name (get-buffer val))) - (set-buffer (get-buffer val))) + (gnus-buffer-exists-p val)) + (set-buffer val)) (setq new-format (symbol-value (intern (format "gnus-%s-line-format" type))))) (setq entry (cdr (assq type gnus-format-specs))) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index e3505eb..5d818ac 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1975,7 +1975,8 @@ If FORCE is non-nil, the .newsrc file is read." (if (or (file-exists-p real-file) (file-exists-p (concat real-file ".el")) (file-exists-p (concat real-file ".eld"))) - real-file file))) + real-file + file))) (defun gnus-newsrc-to-gnus-format () (setq gnus-newsrc-options "") diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9262d65..52b5d1e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2440,9 +2440,7 @@ marks of articles." (defun gnus-update-summary-mark-positions () "Compute where the summary marks are to go." (save-excursion - (when (and gnus-summary-buffer - (get-buffer gnus-summary-buffer) - (buffer-name (get-buffer gnus-summary-buffer))) + (when (gnus-buffer-exists-p gnus-summary-buffer) (set-buffer gnus-summary-buffer)) (let ((gnus-replied-mark 129) (gnus-score-below-mark 130) @@ -2971,7 +2969,7 @@ If NO-DISPLAY, don't generate a summary buffer." (let ((headers gnus-newsgroup-headers) (deps gnus-newsgroup-dependencies) header references generation relations - cthread subject child end pthread relation new-child) + cthread subject child end pthread relation new-child children) ;; First we create an alist of generations/relations, where ;; generations is how much we trust the relation, and the relation ;; is parent/child. @@ -2988,12 +2986,20 @@ If NO-DISPLAY, don't generate a summary buffer." (while (search-backward ">" nil t) (setq end (1+ (point))) (when (search-backward "<" nil t) - (unless (string= (setq new-child (buffer-substring (point) end)) - child) + ;; This is a rather weak for of loop-checking, but if + ;; an article contains the same Message-ID twice in + ;; the References header, this will catch it. I haven't + ;; considered other forms of thread loop preventions, + ;; though -- I think one should probably go through + ;; the entire thread after building it and break + ;; any loops that are found. + (unless (member (setq new-child (buffer-substring (point) end)) + children) (push (list (incf generation) child (setq child new-child) subject) - relations)))) + relations) + (push child children)))) (push (list (1+ generation) child nil subject) relations) (erase-buffer))) (kill-buffer (current-buffer))) @@ -3531,7 +3537,6 @@ or a straight list of headers." (while (or threads stack gnus-tmp-new-adopts new-roots) (if (and (= gnus-tmp-level 0) - (not (setq gnus-tmp-dummy-line nil)) (or (not stack) (= (caar stack) 0)) (not gnus-tmp-false-parent) @@ -4792,7 +4797,7 @@ If EXCLUDE-GROUP, do not go to this group." (save-excursion (gnus-group-best-unread-group exclude-group)))) -(defun gnus-summary-find-next (&optional unread article backward) +(defun gnus-summary-find-next (&optional unread article backward undownloaded) (if backward (gnus-summary-find-prev) (let* ((dummy (gnus-summary-article-intangible-p)) (article (or article (gnus-summary-article-number))) @@ -4807,7 +4812,10 @@ If EXCLUDE-GROUP, do not go to this group." (if unread (progn (while arts - (when (gnus-data-unread-p (car arts)) + (when (or (and undownloaded + (eq gnus-undownloaded-mark + (gnus-data-mark (car arts)))) + (gnus-data-unread-p (car arts))) (setq result (car arts) arts nil)) (setq arts (cdr arts))) @@ -5061,10 +5069,12 @@ The prefix argument ALL means to select all articles." t))) (unless (listp (cdr gnus-newsgroup-killed)) (setq gnus-newsgroup-killed (list gnus-newsgroup-killed))) - (let ((headers gnus-newsgroup-headers)) - (when (and (not gnus-save-score) - (not non-destructive)) - (setq gnus-newsgroup-scored nil)) + (let ((headers gnus-newsgroup-headers) + (gnus-newsgroup-scored + (if (and (not gnus-save-score) + (not non-destructive)) + nil + gnus-newsgroup-scored))) ;; Set the new ranges of read articles. (save-excursion (set-buffer gnus-group-buffer) @@ -5327,14 +5337,12 @@ which existed when entering the ephemeral is reset." (gnus-kill-buffer gnus-original-article-buffer))) (cond (gnus-kill-summary-on-exit (when (and gnus-use-trees - (and (get-buffer buffer) - (buffer-name (get-buffer buffer)))) + (gnus-buffer-exists-p buffer)) (save-excursion - (set-buffer (get-buffer buffer)) + (set-buffer buffer) (gnus-tree-close gnus-newsgroup-name))) (gnus-kill-buffer buffer)) - ((and (get-buffer buffer) - (buffer-name (get-buffer buffer))) + ((gnus-buffer-exists-p buffer) (save-excursion (set-buffer buffer) (gnus-deaden-summary)))))) @@ -5438,7 +5446,7 @@ If prefix argument NO-ARTICLE is non-nil, no article is selected initially." ;; Walking around summary lines. -(defun gnus-summary-first-subject (&optional unread) +(defun gnus-summary-first-subject (&optional unread undownloaded) "Go to the first unread subject. If UNREAD is non-nil, go to the first unread article. Returns the article selected or nil if there are no unread articles." @@ -5461,7 +5469,10 @@ Returns the article selected or nil if there are no unread articles." (t (let ((data gnus-newsgroup-data)) (while (and data - (not (gnus-data-unread-p (car data)))) + (and (not (and undownloaded + (eq gnus-undownloaded-mark + (gnus-data-mark (car data))))) + (not (gnus-data-unread-p (car data))))) (setq data (cdr data))) (when data (goto-char (gnus-data-pos (car data))) @@ -5748,6 +5759,9 @@ article." (let ((article (gnus-summary-article-number)) (article-window (get-buffer-window gnus-article-buffer t)) endp) + ;; If the buffer is empty, we have no article. + (unless article + (error "No article to select")) (gnus-configure-windows 'article) (if (eq (cdr (assq article gnus-newsgroup-reads)) gnus-canceled-mark) (if (and (eq gnus-summary-goto-unread 'never) @@ -6813,7 +6827,8 @@ to save in." (concat "(" (mail-header-date gnus-current-headers) ")")))) (gnus-run-hooks 'gnus-ps-print-hook) - (ps-print-buffer-with-faces filename))) + (save-excursion + (ps-print-buffer-with-faces filename)))) (kill-buffer buffer)))))) (defun gnus-summary-show-article (&optional arg) @@ -7301,10 +7316,10 @@ This will be the case if the article has both been mailed and posted." This means that *all* articles that are marked as expirable will be deleted forever, right now." (interactive) - (unless gnus-expert-user - (gnus-yes-or-no-p - "Are you really, really, really sure you want to delete all these messages? ") - (error "Phew!")) + (or gnus-expert-user + (gnus-yes-or-no-p + "Are you really, really, really sure you want to delete all these messages? ") + (error "Phew!")) (gnus-summary-expire-articles t)) ;; Suggested by Jack Vinson . @@ -8068,11 +8083,11 @@ The number of articles marked as read is returned." ;; We actually mark all articles as canceled, which we ;; have to do when using auto-expiry or adaptive scoring. (gnus-summary-show-all-threads) - (when (gnus-summary-first-subject (not all)) + (when (gnus-summary-first-subject (not all) t) (while (and (if to-here (< (point) to-here) t) (gnus-summary-mark-article-as-read gnus-catchup-mark) - (gnus-summary-find-next (not all))))) + (gnus-summary-find-next (not all) nil nil t)))) (gnus-set-mode-line 'summary)) t)) (gnus-summary-position-point))) diff --git a/lisp/gnus-undo.el b/lisp/gnus-undo.el index 11a18ef..ee75857 100644 --- a/lisp/gnus-undo.el +++ b/lisp/gnus-undo.el @@ -48,12 +48,26 @@ (require 'gnus-util) (require 'gnus) +(require 'custom) -(defvar gnus-undo-mode nil - "Minor mode for undoing in Gnus buffers.") +(defgroup gnus-undo nil + "Undoing in Gnus buffers." + :group 'gnus) -(defvar gnus-undo-mode-hook nil - "Hook called in all `gnus-undo-mode' buffers.") +(defcustom gnus-undo-limit 2000 + "The number of undoable actions recorded." + :type 'integer + :group 'gnus-undo) + +(defcustom gnus-undo-mode nil + "Minor mode for undoing in Gnus buffers." + :type 'boolean + :group 'gnus-undo) + +(defcustom gnus-undo-mode-hook nil + "Hook called in all `gnus-undo-mode' buffers." + :type 'hook + :group 'gnus-undo) ;;; Internal variables. @@ -148,6 +162,11 @@ FORMS may use backtick quote syntax." ;; Initialize list. (t (setq gnus-undo-actions (list (list function))))) + ;; Limit the length of the undo list. + (let ((next (nthcdr gnus-undo-limit gnus-undo-actions))) + (when next + (setcdr next nil))) + ;; We are not at a boundary... (setq gnus-undo-boundary-inhibit t))) (defun gnus-undo (n) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index a98f9e5..0652061 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -921,6 +921,17 @@ ARG is passed to the first function." "Return the value of token TYPE from ALIST." (cdr (assoc type alist))) +;;; Various + +(defun gnus-alive-p () + "Say whether Gnus is running or not." + (and gnus-group-buffer + (get-buffer gnus-group-buffer) + (save-excursion + (set-buffer gnus-group-buffer) + (eq major-mode 'gnus-group-mode)))) + + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index a688e7a..46c38fb 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -843,7 +843,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (when (not (eq in-state 'end)) (setq state (list 'middle)))) (save-excursion - (set-buffer (get-buffer "*gnus-uu-body*")) + (set-buffer "*gnus-uu-body*") (goto-char (setq beg (point-max))) (save-excursion (save-restriction @@ -885,16 +885,16 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (when (re-search-forward "^Subject: \\(.*\\)$" nil t) (setq subj (buffer-substring (match-beginning 1) (match-end 1))) (save-excursion - (set-buffer (get-buffer "*gnus-uu-pre*")) + (set-buffer "*gnus-uu-pre*") (insert (format " %s\n" subj))))) (when (or (eq in-state 'last) (eq in-state 'first-and-last)) (save-excursion - (set-buffer (get-buffer "*gnus-uu-pre*")) + (set-buffer "*gnus-uu-pre*") (insert (format "\n\n%s\n\n" (make-string 70 ?-))) (gnus-write-buffer gnus-uu-saved-article-name)) (save-excursion - (set-buffer (get-buffer "*gnus-uu-body*")) + (set-buffer "*gnus-uu-body*") (goto-char (point-max)) (insert (concat (setq end-string (format "End of %s Digest" name)) @@ -902,8 +902,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (insert (concat (make-string (length end-string) ?*) "\n")) (write-region (point-min) (point-max) gnus-uu-saved-article-name t)) - (kill-buffer (get-buffer "*gnus-uu-pre*")) - (kill-buffer (get-buffer "*gnus-uu-body*")) + (gnus-kill-buffer "*gnus-uu-pre*") + (gnus-kill-buffer "*gnus-uu-body*") (push 'end state)) (if (memq 'begin state) (cons gnus-uu-saved-article-name state) diff --git a/lisp/gnus.el b/lisp/gnus.el index e104689..482420a 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -41,6 +41,10 @@ :group 'news :group 'mail) +(defgroup gnus-cache nil + "Cache interface." + :group 'gnus) + (defgroup gnus-start nil "Starting your favorite newsreader." :group 'gnus) @@ -246,11 +250,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.2.2" +(defconst gnus-version-number "6.2.3" "Version number for this version of gnus.") (defconst gnus-version - (format "Semi-gnus %s (based on Gnus 5.6.5; for SEMI 1.3)" + (format "Semi-gnus %s (based on Gnus 5.6.6; for SEMI 1.3)" gnus-version-number) "Version string for this version of gnus.") @@ -1127,7 +1131,7 @@ slower." ("nnsoup" post-mail address) ("nndraft" post-mail) ("nnfolder" mail respool address) - ("nngateway" none address prompt-address physical-address) + ("nngateway" post-mail address prompt-address physical-address) ("nnweb" none) ("nnlistserv" none) ("nnagent" post-mail)) @@ -1403,12 +1407,19 @@ want." (defvar gnus-server-alist nil "List of available servers.") +(defcustom gnus-cache-directory + (nnheader-concat gnus-directory "cache/") + "*The directory where cached articles will be stored." + :group 'gnus-cache + :type 'directory) + (defvar gnus-predefined-server-alist `(("cache" (nnspool "cache" - (nnspool-spool-directory "~/News/cache/") - (nnspool-nov-directory "~/News/cache/") - (nnspool-active-file "~/News/cache/active")))) + (nnspool-spool-directory gnus-cache-directory) + (nnspool-nov-directory gnus-cache-directory) + (nnspool-active-file + (nnheader-concat gnus-cache-directory "active"))))) "List of predefined (convenience) servers.") (defvar gnus-topic-indentation "") ;; Obsolete variable. @@ -1810,14 +1821,6 @@ This restriction may disappear in later versions of Gnus." "Set GROUP's active info." `(gnus-sethash ,group ,active gnus-active-hashtb)) -(defun gnus-alive-p () - "Say whether Gnus is running or not." - (and gnus-group-buffer - (get-buffer gnus-group-buffer) - (save-excursion - (set-buffer gnus-group-buffer) - (eq major-mode 'gnus-group-mode)))) - ;; Info access macros. (defmacro gnus-info-group (info) @@ -2196,11 +2199,11 @@ that that variable is buffer-local to the summary buffers." (defun gnus-ephemeral-group-p (group) "Say whether GROUP is ephemeral or not." - (gnus-group-get-parameter group 'quit-config)) + (gnus-group-get-parameter group 'quit-config t)) (defun gnus-group-quit-config (group) "Return the quit-config of GROUP." - (gnus-group-get-parameter group 'quit-config)) + (gnus-group-get-parameter group 'quit-config t)) (defun gnus-kill-ephemeral-group (group) "Remove ephemeral GROUP from relevant structures." @@ -2386,30 +2389,32 @@ You should probably use `gnus-find-method-for-group' instead." "Say whether the group is secondary or not." (gnus-secondary-method-p (gnus-find-method-for-group group))) -(defun gnus-group-find-parameter (group &optional symbol) +(defun gnus-group-find-parameter (group &optional symbol allow-list) "Return the group parameters for GROUP. If SYMBOL, return the value of that symbol in the group parameters." (save-excursion (set-buffer gnus-group-buffer) (let ((parameters (funcall gnus-group-get-parameter-function group))) (if symbol - (gnus-group-parameter-value parameters symbol) + (gnus-group-parameter-value parameters symbol allow-list) parameters)))) -(defun gnus-group-get-parameter (group &optional symbol) +(defun gnus-group-get-parameter (group &optional symbol allow-list) "Return the group parameters for GROUP. If SYMBOL, return the value of that symbol in the group parameters. Most functions should use `gnus-group-find-parameter', which also examines the topic parameters." (let ((params (gnus-info-params (gnus-get-info group)))) (if symbol - (gnus-group-parameter-value params symbol) + (gnus-group-parameter-value params symbol allow-list) params))) -(defun gnus-group-parameter-value (params symbol) +(defun gnus-group-parameter-value (params symbol &optional allow-list) "Return the value of SYMBOL in group PARAMS." - (or (car (memq symbol params)) ; It's either a simple symbol - (cdr (assq symbol params)))) ; or a cons. + (or (car (memq symbol params)) ; It's either a simple symbol, + (and (or allow-list + (atom (cdr (assq symbol params)))) ; and it's not a local variable + (cdr (assq symbol params))))) ; but a cons. (defun gnus-group-add-parameter (group param) "Add parameter PARAM to GROUP." diff --git a/lisp/lpath.el b/lisp/lpath.el index 7d92912..ebd9174 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -41,9 +41,11 @@ mouse-selection-click-count-buffer buffer-display-table font-lock-defaults user-full-name user-login-name gnus-newsgroup-name gnus-article-x-face-too-ugly - mail-mode-hook enable-multibyte-characters))) + mail-mode-hook enable-multibyte-characters + adaptive-fill-first-line-regexp adaptive-fill-regexp))) (maybe-bind '(mail-mode-hook - enable-multibyte-characters browse-url-browser-function)) + enable-multibyte-characters browse-url-browser-function + adaptive-fill-first-line-regexp adaptive-fill-regexp)) (maybe-fbind '(color-instance-rgb-components make-color-instance color-instance-name specifier-instance device-type device-class get-popup-menu-response event-object diff --git a/lisp/message.el b/lisp/message.el index 010d852..9605ff5 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -279,13 +279,6 @@ If t, use `message-user-organization-file'." :type 'file :group 'message-headers) -(defcustom message-autosave-directory - (nnheader-concat message-directory "drafts/") - "*Directory where Message autosaves buffers. -If nil, Message won't autosave." - :group 'message-buffers - :type 'directory) - (defcustom message-forward-start-separator (concat (mime-make-tag "message" "rfc822") "\n") "*Delimiter inserted before forwarded messages." @@ -638,6 +631,13 @@ the prefix.") The default is `abbrev', which uses mailabbrev. nil switches mail aliases off.") +(defcustom message-autosave-directory + (nnheader-concat message-directory "drafts/") + "*Directory where Message autosaves buffers if Gnus isn't running. +If nil, Message won't autosave." + :group 'message-buffers + :type 'directory) + ;;; Internal variables. ;;; Well, not really internal. @@ -938,6 +938,7 @@ The cdr of ech entry is a function for applying the face to a region.") (autoload 'nndraft-request-expire-articles "nndraft") (autoload 'gnus-open-server "gnus-int") (autoload 'gnus-request-post "gnus-int") + (autoload 'gnus-alive-p "gnus-util") (autoload 'rmail-output "rmail")) @@ -1307,7 +1308,7 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (concat (regexp-quote mail-header-separator) "$\\|[ \t]*[-_][-_][-_]+$\\|" "-- $\\|" - ;;!!! Uhm... shurely this can't be right. + ;;!!! Uhm... shurely this can't be right? "[> " (regexp-quote message-yank-prefix) "]+$\\|" paragraph-start)) (setq paragraph-separate @@ -1340,6 +1341,15 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (unless (string-match "XEmacs" emacs-version) (set (make-local-variable 'font-lock-defaults) '(message-font-lock-keywords t))) + (make-local-variable 'adaptive-fill-regexp) + (setq adaptive-fill-regexp + (concat "[ \t]*[-a-z0-9A-Z]*>+[ \t]*\\|" adaptive-fill-regexp)) + (unless (boundp 'adaptive-fill-first-line-regexp) + (setq adaptive-fill-first-line-regexp nil)) + (make-local-variable 'adaptive-fill-first-line-regexp) + (setq adaptive-fill-first-line-regexp + (concat "[ \t]*[-a-z0-9A-Z]*>+[ \t]*\\|" + adaptive-fill-first-line-regexp)) (run-hooks 'text-mode-hook 'message-mode-hook)) @@ -1632,11 +1642,7 @@ name, rather than giving an automatic name." (name-default (concat "*message* " mail-trimmed-to)) (name (if enter-string (read-string "New buffer name: " name-default) - name-default)) - (default-directory - (if message-autosave-directory - (file-name-as-directory message-autosave-directory) - default-directory))) + name-default))) (rename-buffer name t))))) (defun message-fill-yanked-message (&optional justifyp) @@ -2816,7 +2822,9 @@ to find out how to use this." (when from (let ((stop-pos (string-match " *at \\| *@ \\| *(\\| *<" from))) - (concat (if stop-pos (substring from 0 stop-pos) from) + (concat (if (and stop-pos + (not (zerop stop-pos))) + (substring from 0 stop-pos) from) "'s message of \"" (if (or (not date) (string= date "")) "(unknown date)" date) @@ -3309,7 +3317,12 @@ Headers already prepared in the buffer are not modified." (defun message-set-auto-save-file-name () "Associate the message buffer with a file in the drafts directory." (when message-autosave-directory - (setq message-draft-article (nndraft-request-associate-buffer "drafts")) + (if (gnus-alive-p) + (setq message-draft-article + (nndraft-request-associate-buffer "drafts")) + (setq buffer-file-name (expand-file-name "*message*" + message-autosave-directory)) + (setq buffer-auto-save-file-name (make-auto-save-file-name))) (clear-visited-file-modtime))) (defun message-disassociate-draft () diff --git a/lisp/nnheader.el b/lisp/nnheader.el index b37b539..dc21b7f 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -595,21 +595,27 @@ If FILE is t, return the buffer contents as a string." "Fold continuation lines in the current buffer." (nnheader-replace-regexp "\\(\r?\n[ \t]+\\)+" " ")) -(defun nnheader-translate-file-chars (file) +(defun nnheader-translate-file-chars (file &optional full) + "Translate FILE into something that can be a file name. +If FULL, translate everything." (if (null nnheader-file-name-translation-alist) ;; No translation is necessary. file - ;; We translate -- but only the file name. We leave the directory - ;; alone. (let* ((i 0) trans leaf path len) - (if (string-match "/[^/]+\\'" file) - ;; This is needed on NT's and stuff. - (setq leaf (substring file (1+ (match-beginning 0))) - path (substring file 0 (1+ (match-beginning 0)))) - ;; Fall back on this. - (setq leaf (file-name-nondirectory file) - path (file-name-directory file))) + (if full + ;; Do complete translation. + (setq leaf file + path "") + ;; We translate -- but only the file name. We leave the directory + ;; alone. + (if (string-match "/[^/]+\\'" file) + ;; This is needed on NT's and stuff. + (setq leaf (substring file (1+ (match-beginning 0))) + path (substring file 0 (1+ (match-beginning 0)))) + ;; Fall back on this. + (setq leaf (file-name-nondirectory file) + path (file-name-directory file)))) (setq len (length leaf)) (while (< i len) (when (setq trans (cdr (assq (aref leaf i) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 2b5fbbc..4e79fc9 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -343,7 +343,7 @@ messages will be shown to indicate the current status." "Incoming mail can be split according to this fancy variable. To enable this, set `nnmail-split-methods' to `nnmail-split-fancy'. -The format is this variable is SPLIT, where SPLIT can be one of +The format of this variable is SPLIT, where SPLIT can be one of the following: GROUP: Mail will be stored in GROUP (a string). @@ -636,14 +636,14 @@ parameter. It should return nil, `warn' or `delete'." nil errors nil inbox tofile) (when nnmail-internal-password (list nnmail-internal-password))))))) + (push inbox nnmail-moved-inboxes) (if (and (not (buffer-modified-p errors)) (zerop result)) ;; No output => movemail won (progn (unless popmail (when (file-exists-p tofile) - (set-file-modes tofile nnmail-default-file-modes))) - (push inbox nnmail-moved-inboxes)) + (set-file-modes tofile nnmail-default-file-modes)))) (set-buffer errors) ;; There may be a warning about older revisions. We ;; ignore those. @@ -652,8 +652,8 @@ parameter. It should return nil, `warn' or `delete'." (progn (unless popmail (when (file-exists-p tofile) - (set-file-modes tofile nnmail-default-file-modes))) - (push inbox nnmail-moved-inboxes)) + (set-file-modes + tofile nnmail-default-file-modes)))) ;; Probably a real error. (subst-char-in-region (point-min) (point-max) ?\n ?\ ) (goto-char (point-max)) diff --git a/lisp/nnmbox.el b/lisp/nnmbox.el index ce7e943..2661e7a 100644 --- a/lisp/nnmbox.el +++ b/lisp/nnmbox.el @@ -1,13 +1,16 @@ ;;; nnmbox.el --- mail mbox access for Gnus ;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc. -;; Author: Lars Magne Ingebrignnmbox2, or (at your option) -;; any later version. +;; Author: Lars Magne Ingebrigtsen +;; Masanobu UMEDA +;; Keywords: news, mail + +;; This file is part of GNU Emacs. -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the diff --git a/lisp/nntp.el b/lisp/nntp.el index 77f4ec8..fa99b1e 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -84,7 +84,7 @@ the same.") The default is \"rsh\", but \"ssh\" is a popular alternative.") (defvoo nntp-rlogin-parameters '("telnet" "-8" "${NNTPSERVER:=news}" "nntp") - "*Parameters to `nntp-open-login'. + "*Parameters to `nntp-open-rlogin'. That function may be used as `nntp-open-connection-function'. In that case, this list will be used as the parameter list given to rsh.") @@ -811,7 +811,7 @@ password contained in '~/.nntp-authinfo'." (generate-new-buffer (format " *server %s %s %s*" nntp-address nntp-port-number - (buffer-name (get-buffer buffer))))) + (gnus-buffer-exists-p buffer)))) (buffer-disable-undo (current-buffer)) (set (make-local-variable 'after-change-functions) nil) (set (make-local-variable 'nntp-process-wait-for) nil) @@ -885,11 +885,11 @@ password contained in '~/.nntp-authinfo'." (when (and (> (point) nntp-process-start-point) (re-search-backward nntp-process-wait-for nntp-process-start-point t)) - (when (buffer-name (get-buffer nntp-process-to-buffer)) + (when (gnus-buffer-exists-p nntp-process-to-buffer) (let ((cur (current-buffer)) (start nntp-process-start-point)) (save-excursion - (set-buffer (get-buffer nntp-process-to-buffer)) + (set-buffer nntp-process-to-buffer) (goto-char (point-max)) (let ((b (point))) (insert-buffer-substring cur start) diff --git a/lisp/score-mode.el b/lisp/score-mode.el index fdb8d71..f488947 100644 --- a/lisp/score-mode.el +++ b/lisp/score-mode.el @@ -45,6 +45,12 @@ (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) +(defvar score-mode-syntax-table + (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table))) + (modify-syntax-entry ?| "w" table) + table) + "Syntax table used in score-mode buffers.") + ;;;###autoload (defun gnus-score-mode () "Mode for editing Gnus score files. @@ -55,7 +61,7 @@ This mode is an extended emacs-lisp mode. (kill-all-local-variables) (use-local-map gnus-score-mode-map) (gnus-score-make-menu-bar) - (set-syntax-table emacs-lisp-mode-syntax-table) + (set-syntax-table score-mode-syntax-table) (setq major-mode 'gnus-score-mode) (setq mode-name "Score") (lisp-mode-variables nil) @@ -83,7 +89,8 @@ This mode is an extended emacs-lisp mode. (goto-char (point-min)) (let ((form (read (current-buffer)))) (erase-buffer) - (pp form (current-buffer))) + (let ((emacs-lisp-mode-syntax-table score-mode-syntax-table)) + (pp form (current-buffer)))) (goto-char (point-min))) (defun gnus-score-edit-exit () diff --git a/texi/ChangeLog b/texi/ChangeLog index a2dc5e5..b92670f 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,9 @@ +Sun Apr 26 15:32:45 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Summary Post Commands): Ref to Message. + + * message.texi (Various Message Variables): Deletia. + Fri Apr 24 16:00:40 1998 Lars Magne Ingebrigtsen * gnus.texi (Unread Articles): Typo. diff --git a/texi/Makefile.in b/texi/Makefile.in index e3740e2..c205abe 100644 --- a/texi/Makefile.in +++ b/texi/Makefile.in @@ -30,7 +30,7 @@ most: texi2latex.elc latex latexps makeinfo -o $* $<; \ fi -dvi: gnus.dvi message.dvi +dvi: gnus.dvi message.dvi refcard.dvi .texi.dvi : $(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' $< > gnustmp.texi diff --git a/texi/gnus.texi b/texi/gnus.texi index 1f3ca7c..0737bfc 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -3836,6 +3836,8 @@ command understands the process/prefix convention @end table +Also @pxref{(message)Header Commands} for more information. + @node Summary Post Commands @subsection Summary Post Commands @@ -3910,6 +3912,8 @@ Uuencode a file, split it into parts, and post it as a series (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). @end table +Also @pxref{(message)Header Commands} for more information. + @node Canceling and Superseding @section Canceling Articles @@ -15710,7 +15714,7 @@ actually are people who are using Gnus. Who'd'a thunk it! * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus. * September Gnus:: The Thing Formally Known As Gnus 5.3/5.3. * Red Gnus:: Third time best---Gnus 5.4/5.5. -* Quassia Gnus:: Two times two is four, or Gnus 5.6.5. +* Quassia Gnus:: Two times two is four, or Gnus 5.6.6. @end menu These lists are, of course, just @emph{short} overviews of the @@ -16245,7 +16249,7 @@ Emphasized text can be properly fontisized: @node Quassia Gnus @subsubsection Quassia Gnus -New features in Gnus 5.6.5: +New features in Gnus 5.6.6: @itemize @bullet diff --git a/texi/message.texi b/texi/message.texi index 2386532..0f5ca1f 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.5 Manual +@settitle Message 5.6.6 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 5.6.5 Manual +@title Message 5.6.6 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Message 5.6.5. Message is distributed with +This manual corresponds to Message 5.6.6. Message is distributed with the Gnus distribution bearing the same version number as this manual has. @@ -979,10 +979,6 @@ follows this line--} by default. @vindex message-directory Directory used by many mailey things. The default is @file{~/Mail/}. -@item message-autosave-directory -@vindex message-autosave-directory -Directory where message buffers will be autosaved to. - @item message-signature-setup-hook @vindex message-signature-setup-hook Hook run when initializing the message buffer. It is run after the