+Sun Sep 8 12:24:11 1996 Lars Magne Ingebrigtsen <larsi@hymir.ifi.uio.no>
+
+ * nntp.el (nntp-accept-process-output): Don't message so
+ obsessively.
+
+ * gnus.el: Fixed indentation and stuff.
+
+Sun Sep 8 12:23:56 1996 Sudish Joseph <sudish@mindspring.com>
+
+ * nnweb.el (nnweb-fetch-form): Return t.
+
+Sat Sep 7 15:15:42 1996 Lars Magne Ingebrigtsen <larsi@hymir.ifi.uio.no>
+
+ * gnus.el: Red Gnus v0.28 is released.
+
Sat Sep 7 14:33:17 1996 Lars Magne Ingebrigtsen <larsi@hymir.ifi.uio.no>
* nntp.el (nntp-after-change-function-callback): Renamed.
(remove-text-properties b e gnus-hidden-properties)
(when (memq 'intangible gnus-hidden-properties)
(put-text-property (max (1- b) (point-min))
- b 'intangible nil)))
+ b 'intangible nil)))
(defun article-hide-text-type (b e type)
"Hide text of TYPE between B and E."
b e (cons 'article-type (cons type gnus-hidden-properties)))
(when (memq 'intangible gnus-hidden-properties)
(put-text-property (max (1- b) (point-min))
- b 'intangible nil)))
+ b 'intangible nil)))
(defun article-hide-text-of-type (type)
"Hide text of TYPE in the current buffer."
;; Check whether we have some limits to what we consider
;; to be a signature.
(let ((limits (if (listp gnus-signature-limit) gnus-signature-limit
- (list gnus-signature-limit)))
+ (list gnus-signature-limit)))
limit limited)
(while (setq limit (pop limits))
(if (or (and (integerp limit)
(funcall limit))
(and (stringp limit)
(not (re-search-forward limit nil t))))
- () ; This limit did not succeed.
+ () ; This limit did not succeed.
(setq limited t
limits nil)))
(unless limited
current)
(if face-tag
(custom-put-text-property from (+ from (length (custom-tag custom)))
- 'face (funcall face-tag field value)))
+ 'face (funcall face-tag field value)))
(if original
(custom-field-original-set field value))
(while values
(from (point)))
(custom-text-insert (custom-tag custom))
(custom-add-text-properties from (point)
- (list 'face face
- rear-nonsticky t))
+ (list 'face face
+ rear-nonsticky t))
(custom-documentation-insert custom)
(custom-field-move field from (point))
field))
(let ((from (custom-field-start field))
(custom (custom-field-custom field)))
(custom-put-text-property from (+ from (length (custom-tag custom)))
- 'face (custom-field-face field))))
+ 'face (custom-field-face field))))
(defun custom-const-valid (custom value)
"Non-nil if CUSTOM can validly have the value VALUE."
(tag (get-text-property pos 'custom-tag))
(data (get-text-property pos 'custom-data)))
(cond (data
- (funcall tag data))
+ (funcall tag data))
((and (symbolp tag) (fboundp tag))
(call-interactively tag))
(field
"Save and exit customization buffer."
(interactive "@")
(save-excursion
- (funcall custom-save))
+ (funcall custom-save))
(kill-buffer (current-buffer)))
(defun custom-save ()
;; Read the screen content of FIELD.
(custom-read (custom-field-custom field)
(custom-buffer-substring-no-properties (custom-field-start field)
- (custom-field-end field))))
+ (custom-field-end field))))
;; Fields are shown in a special `active' face when point is inside
;; it. You activate the field by moving point inside (entering) it
(let ((before-change-functions nil)
(after-change-functions nil))
(custom-put-text-property (custom-field-start field) (custom-field-end field)
- 'face (custom-field-face field))))
+ 'face (custom-field-face field))))
(defun custom-field-enter (field)
;; Activate FIELD.
(setq pos (1+ pos)))
(if (eq pos len)
string
- (substring string 0 pos))))
+ (substring string 0 pos))))
(defun custom-insert-before (list old new)
"In LIST insert before OLD a NEW element."
(defalias 'ange-ftp-re-read-dir 'ignore)
(defun dgnushack-compile ()
- ;(setq byte-compile-dynamic t)
+ ;(setq byte-compile-dynamic t)
(let ((files (directory-files "." nil ".el$"))
(xemacs (string-match "XEmacs" emacs-version))
;;(byte-compile-generate-call-tree t)
(setq beg (point))
(while (setq entry (pop alist))
(setq regexp (concat (regexp-quote earcon-prefix)
- ".*\\("
- (car entry)
- "\\).*"
- (regexp-quote earcon-suffix)))
+ ".*\\("
+ (car entry)
+ "\\).*"
+ (regexp-quote earcon-suffix)))
(goto-char beg)
(while (re-search-forward regexp nil t)
(let* ((start (and entry (match-beginning 1)))
(setq buffer-read-only t)
(gnus-add-current-to-buffer-list)
(unless (eq major-mode 'gnus-article-mode)
- (gnus-article-mode))
+ (gnus-article-mode))
(current-buffer))
(save-excursion
(set-buffer (get-buffer-create name))
;;; Commentary:
;; This file provides access to sound effects in Gnus.
;; Prerelease: This file is partially stripped to support earcons.el
-;; You can safely ignore most of it until Red Gnus. **Evil Laugh**
+;; You can safely ignore most of it until Red Gnus. **Evil Laugh**
;;; Code:
(if (null (boundp 'running-xemacs))
;;;###autoload
-;(defun gnus-audio-enable-sound ()
+ ;(defun gnus-audio-enable-sound ()
; "Enable Sound Effects for Gnus."
; (interactive)
; (setq gnus-audio-effects-enabled t)
; (run-hooks gnus-audio-enable-hooks))
;;;###autoload
-;(defun gnus-audio-disable-sound ()
+ ;(defun gnus-audio-disable-sound ()
; "Disable Sound Effects for Gnus."
; (interactive)
; (setq gnus-audio-effects-enabled nil)
;;; The following isn't implemented yet, wait for Red Gnus
-;(defun gnus-audio-startrek-sounds ()
+ ;(defun gnus-audio-startrek-sounds ()
; "Enable sounds from Star Trek the original series."
; (interactive)
; (setq gnus-audio-busy-sound "working.au")
gnus-backlog-hashtb))
b)
(if (memq ident gnus-backlog-articles)
- () ; It's already kept.
+ () ; It's already kept.
;; Remove the oldest article, if necessary.
(and (numberp gnus-keep-backlog)
(>= (length gnus-backlog-articles) gnus-keep-backlog)
(set-buffer (gnus-backlog-buffer))
(goto-char (point-min))
(if (zerop (buffer-size))
- () ; The buffer is empty.
+ () ; The buffer is empty.
(let ((ident (get-text-property (point) 'gnus-backlog))
buffer-read-only)
;; Remove the ident from the list of articles.
(when (and (or force (not (eq gnus-use-cache 'passive)))
(numberp article)
(> article 0)
- (vectorp headers)) ; This might be a dummy article.
+ (vectorp headers)) ; This might be a dummy article.
;; If this is a virtual group, we find the real group.
(when (gnus-virtual-group-p group)
(let ((result (nnvirtual-find-group-art
;; We got all the potential prefixes. Now create
;; `gnus-cite-prefix-alist' containing the oldest prefix for each
;; line that appears at least gnus-cite-minimum-match-count
- ;; times. First sort them by length. Longer is older.
+ ;; times. First sort them by length. Longer is older.
(setq alist (sort alist (lambda (a b)
(> (length (car a)) (length (car b))))))
(while alist
(let ((inhibit-point-motion-hooks t)
from to)
(goto-line number)
- (unless (eobp) ;; Sometimes things become confused.
+ (unless (eobp);; Sometimes things become confused.
(forward-char (length prefix))
(skip-chars-forward " \t")
(setq from (point))
(t
(gnus-add-text-properties
(point) (progn (forward-line 1) (point))
- (nconc (list 'article-type 'cite)
- gnus-hidden-properties))))))))
+ (nconc (list 'article-type 'cite)
+ gnus-hidden-properties))))))))
(defun gnus-cite-find-prefix (line)
;; Return citation prefix for LINE.
regular expression that should match the beginning of the header line,
but if you don't know what a regular expression is, just write the
name of the header. The second field is the `Name' field, which
-determines how the header name (i.e. the part of the header left
+determines how the header name (i. e., the part of the header left
of the `:') is displayed. The third field is the `Content' field,
-which determines how the content (i.e. the part of the header right of
+which determines how the content (i. e., the part of the header right of
the `:') is displayed.
If you leave the last `Header' field in the list empty, the `Name' and
Below is a list of `Form'/`Face' pairs. When deciding how a a
particular summary line should be displayed, each form is
-evaluated. The content of the face field after the first true form is
+evaluated. The content of the face field after the first true form is
used. You can change how those summary lines are displayed, by
editing the face field.
Below is a list of `Form'/`Face' pairs. When deciding how a a
particular group line should be displayed, each form is
-evaluated. The content of the face field after the first true form is
+evaluated. The content of the face field after the first true form is
used. You can change how those group lines are displayed by
editing the face field.
(interactive)
(gnus-demon-cancel)
(if (null gnus-demon-handlers)
- () ; Nothing to do.
+ () ; Nothing to do.
;; Set up timer.
(setq gnus-demon-timer
(nnheader-run-at-time
List of local variables to set when this score file is loaded.
Using this entry can provide a convenient way to set variables that
-will affect the summary mode for only some specific groups, i.e. those
+will affect the summary mode for only some specific groups, i. e., those
groups matched by the current score file.")
(type . list)
(data ((type . repeat)
(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
+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'.
+`~/.Xdefaults'. See also `gnus-background-mode'.
This is a meta-variable that will affect what default values other
variables get. You would normally not change this variable, but
(process-send-string process command)
(process-send-string process "\r\n"))
-(defun bbb-read-response (process) ; &optional return-response-string)
+(defun bbb-read-response (process) ; &optional return-response-string)
"This function eats the initial response of OK or ERROR from the BBB."
(let ((case-fold-search nil)
- match-end)
+ match-end)
(goto-char bbb-read-point)
(while (and (not (search-forward "\r\n" nil t))
(accept-process-output process bbb-timeout-secs))
(defun bbb-build-mid-scores-alist (groupname)
"this function can be called as part of the function to return the
-list of score files to use. See the gnus variable
+list of score files to use. See the gnus variable
gnus-score-find-score-files-function.
*Note:* If you want to use grouplens scores along with calculated scores,
cmd (concat cmd art "\r\n")
mlist (cdr mlist)))
(setq cmd (concat cmd ".\r\n"))
- cmd))
+ cmd))
(defun bbb-get-prediction-response (process)
(let ((case-fold-search nil)
(accept-process-output process bbb-timeout-secs))
(goto-char bbb-read-point))
(setq match-end (point))
- (goto-char (+ bbb-response-point 4)) ;; we ought to be right before OK
+ (goto-char (+ bbb-response-point 4));; we ought to be right before OK
(bbb-build-response-alist)))
;; build-response-alist assumes that the cursor has been positioned at
(defun bbb-get-pred ()
(let ((tpred (string-to-number (buffer-substring
- (match-beginning 2)
- (match-end 2)))))
+ (match-beginning 2)
+ (match-end 2)))))
(if (> tpred 0)
(round (* grouplens-score-scale-factor (+ grouplens-score-offset tpred)))
1)))
(if (and grouplens-rating-alist
(member gnus-newsgroup-name grouplens-newsgroups))
(let ((bbb-process (bbb-connect-to-bbbd grouplens-bbb-host
- grouplens-bbb-port))
+ grouplens-bbb-port))
(rate-command (bbb-build-rate-command grouplens-rating-alist)))
(if bbb-process
(save-excursion
(gnus-summary-best-unread-article))
(defun grouplens-summary-catchup-and-exit (rating)
- "Mark all articles not marked as unread in this newsgroup as read,
+ "Mark all articles not marked as unread in this newsgroup as read,
then exit. If prefix argument ALL is non-nil, all articles are
marked as read."
- (interactive "P")
- (if rating
- (bbb-summary-rate-article rating))
- (if (numberp rating)
- (gnus-summary-catchup-and-exit)
- (gnus-summary-catchup-and-exit rating)))
+ (interactive "P")
+ (if rating
+ (bbb-summary-rate-article rating))
+ (if (numberp rating)
+ (gnus-summary-catchup-and-exit)
+ (gnus-summary-catchup-and-exit rating)))
(defun grouplens-score-thread (score)
"Raise the score of the articles in the current thread with SCORE."
(defun bbb-time-float (timeval)
(+ (* (car timeval) 65536)
- (cadr timeval)))
+ (cadr timeval)))
(defun grouplens-do-time ()
(when (member gnus-newsgroup-name grouplens-newsgroups)
;; or make a list
(if (listp gnus-score-find-score-files-function)
(setq gnus-score-find-score-files-function
- (append 'bbb-build-mid-scores-alist
- gnus-score-find-score-files-function ))
+ (append 'bbb-build-mid-scores-alist
+ gnus-score-find-score-files-function ))
(setq gnus-score-find-score-files-function
(list gnus-score-find-score-files-function
'bbb-build-mid-scores-alist))))
- ;; leave the gnus-score-find-score-files variable alone
+ ;; leave the gnus-score-find-score-files variable alone
((eq gnus-grouplens-override-scoring 'separate)
(add-hook 'gnus-select-group-hook
'(lambda()
groups.
If you use %o or %O, reading the active file will be slower and quite
-a bit of extra memory will be used. %D will also worsen performance.
+a bit of extra memory will be used. %D will also worsen performance.
Also note that if you change the format specification to include any
of these specs, you must probably re-start Gnus to see them go into
effect.")
;; Insert the text.
(eval gnus-group-line-format-spec))
`(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb)
- gnus-unread ,(if (numberp number)
- (string-to-int gnus-tmp-number-of-unread)
- t)
- gnus-marked ,gnus-tmp-marked-mark
- gnus-indentation ,gnus-group-indentation
- gnus-level ,gnus-tmp-level))
+ gnus-unread ,(if (numberp number)
+ (string-to-int gnus-tmp-number-of-unread)
+ t)
+ gnus-marked ,gnus-tmp-marked-mark
+ gnus-indentation ,gnus-group-indentation
+ gnus-level ,gnus-tmp-level))
(when (inline (gnus-visual-p 'group-highlight 'highlight))
(forward-line -1)
(run-hooks 'gnus-group-update-hook)
(goto-char b)
;; ... or insert the line.
(or
- t ;; Don't activate group.
+ t;; Don't activate group.
(gnus-active group)
(gnus-activate-group group)
(error "%s error: %s" group (gnus-status-message group)))
(format
"Do you really want to delete %s%s? "
group (if force " and all its contents" ""))))
- () ; Whew!
+ () ; Whew!
(gnus-message 6 "Deleting group %s..." group)
(if (not (gnus-request-delete-group group force))
(gnus-error 3 "Couldn't delete group %s" group)
"Sort the process/prefixed groups."
(interactive (list current-prefix-arg gnus-group-sort-function))
(let ((groups (gnus-group-process-prefix n)))
- (funcall gnus-group-sort-selected-function
- groups (gnus-make-sort-function func) reverse)
- (gnus-group-list-groups)))
+ (funcall gnus-group-sort-selected-function
+ groups (gnus-make-sort-function func) reverse)
+ (gnus-group-list-groups)))
(defun gnus-group-sort-selected-flat (groups func reverse)
(let (entries infos)
(setq entry (gnus-gethash group gnus-newsrc-hashtb)))
(gnus-undo-register
`(progn
- (gnus-group-goto-group ,(gnus-group-group-name))
- (gnus-group-yank-group)))
+ (gnus-group-goto-group ,(gnus-group-group-name))
+ (gnus-group-yank-group)))
(push (cons (car entry) (nth 2 entry))
gnus-list-of-killed-groups))
(gnus-group-change-level
(gnus-group-insert-group-line-info group)
(gnus-undo-register
`(when (gnus-group-goto-group ,group)
- (gnus-group-kill-group 1))))
+ (gnus-group-kill-group 1))))
(forward-line -1)
(gnus-group-position-point)
(if (< (length out) 2) (car out) (nreverse out))))
(setq desc (gnus-group-get-description group))
(gnus-read-descriptions-file method))
(gnus-message 1
- (or desc (gnus-gethash group gnus-description-hashtb)
- "No description available")))))
+ (or desc (gnus-gethash group gnus-description-hashtb)
+ "No description available")))))
;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
(defun gnus-group-describe-all-groups (&optional force)
does this easily for non-Lisp programmers.
The `gnus-kill' function executes commands available in Summary Mode
-by their key sequences. `gnus-kill' should be called with FIELD,
+by their key sequences. `gnus-kill' should be called with FIELD,
REGEXP and optional COMMAND and ALL. FIELD is a string representing
the header field or an empty string. If FIELD is an empty string, the
entire article body is searched for. REGEXP is a string which is
-compared with FIELD value. COMMAND is a string representing a valid
-key sequence in Summary mode or Lisp expression. COMMAND defaults to
+compared with FIELD value. COMMAND is a string representing a valid
+key sequence in Summary mode or Lisp expression. COMMAND defaults to
'(gnus-summary-mark-as-read nil \"X\"). Make sure that COMMAND is
executed in the Summary buffer. If the second optional argument ALL
is non-nil, the COMMAND is applied to articles which are already
;; Ignores global KILL.
(if (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
(gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE"
- gnus-newsgroup-name))
+ gnus-newsgroup-name))
0)
((or (file-exists-p (gnus-newsgroup-kill-file nil))
(file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
(setq gnus-newsgroup-kill-headers nil)
;; If there are any previously scored articles, we remove these
;; from the `gnus-newsgroup-headers' list that the score functions
- ;; will see. This is probably pretty wasteful when it comes to
+ ;; will see. This is probably pretty wasteful when it comes to
;; conses, but is, I think, faster than having to assq in every
;; single score function.
(let ((files kill-files))
(save-excursion
(save-window-excursion
;; Selected window must be summary buffer to execute keyboard
- ;; macros correctly. See command_loop_1.
+ ;; macros correctly. See command_loop_1.
(switch-to-buffer gnus-summary-buffer 'norecord)
(goto-char (point-min)) ;From the beginning.
(let ((kill-list regexp)
(if prev
(setcdr prev (cdr kill-list))
(setq regexp (cdr regexp))))
- ;; Successful kill. Set the date to today.
+ ;; Successful kill. Set the date to today.
(setcdr kill date)))
;; It's a permanent kill.
(gnus-execute field kill command nil (not all)))
(or (stringp value)
(setq value (gnus-prin1-to-string value)))
(setq did-kill (string-match regexp value)))
- (cond ((stringp form) ;Keyboard macro.
+ (cond ((stringp form) ;Keyboard macro.
(execute-kbd-macro form))
((gnus-functionp form)
(funcall form))
"An alist of valid select methods.
The first element of each list lists should be a string with the name
of the select method. The other elements may be the category of
-this method (ie. `post', `mail', `none' or whatever) or other
+this method (i. e., `post', `mail', `none' or whatever) or other
properties that this method has (like being respoolable).
If you implement a new select method, all you should have to change is
this variable. I think.")
(or (nth 1 rule)
gnus-score-interactive-default-score)))
(push (cons (mail-header-number gnus-advanced-headers)
- (or (nth 1 rule)
- gnus-score-interactive-default-score))
+ (or (nth 1 rule)
+ gnus-score-interactive-default-score))
gnus-newsgroup-scored)
(when trace
(push (cons "A file" rule)
(defvar gnus-outgoing-message-group nil
"*All outgoing messages will be put in this group.
If you want to store all your outgoing mail and articles in the group
-\"nnml:archive\", you set this variable to that value. This variable
+\"nnml:archive\", you set this variable to that value. This variable
can also be a list of group names.
If you want to have greater control over what group to put each
(setq olist (cdr olist)))
(insert "\n\n")
;; Remove any null chars - they seem to cause trouble for some
- ;; mailers. (Byte-compiled output from the stuff above.)
+ ;; mailers. (Byte-compiled output from the stuff above.)
(goto-char (point-min))
(while (re-search-forward "[\000\200]" nil t)
(replace-match "" t t))))
;; arrived.
(while (setq group (pop groups))
(if (not (setq gactive (gnus-activate-group group)))
- () ; This group doesn't exist.
+ () ; This group doesn't exist.
(setq active (nth 1 (assoc group gnus-nocem-active)))
(when (and (not (< (cdr gactive) (car gactive))) ; Empty group.
(or (not active)
nobar-p)
"Inserts a face at point if I can find one"
;; '(gnus-picons-insert-face-if-exists
- ; "Database" '("edu" "indiana" "cs") "Name")
+ ; "Database" '("edu" "indiana" "cs") "Name")
;; looks for:
;; 1. edu/indiana/cs/Name
;; 2. edu/indiana/Name
(progn
(gnus-summary-limit-to-articles nil)
(when (or catch-up gnus-mark-unpicked-articles-as-read)
- (gnus-summary-limit-mark-excluded-as-read))
+ (gnus-summary-limit-mark-excluded-as-read))
(gnus-summary-first-unread-article)
(gnus-configure-windows
(if gnus-pick-display-summary 'article 'pick) t))
(gnus-get-tree-buffer))
(defun gnus-tree-close (group)
- ;(gnus-kill-buffer gnus-tree-buffer)
+ ;(gnus-kill-buffer gnus-tree-buffer)
)
(defun gnus-highlight-selected-tree (article)
will be expired along with non-matching score entries.")
(defvar gnus-orphan-score nil
- "*All orphans get this score added. Set in the score file.")
+ "*All orphans get this score added. Set in the score file.")
(defvar gnus-decay-scores nil
"*If non-nil, decay non-permanent scores.")
(if (eq 's score) nil score) ; Score
(if (eq 'perm temporary) ; Temp
nil
- temporary)
+ temporary)
(not (nth 3 entry))) ; Prompt
))
(setq max n))
(setq list (cdr list)))
(setq max (+ max 4)) ; %c, `:', SPACE, a SPACE at end
- (setq n (/ (1- (window-width)) max)) ; items per line
+ (setq n (/ (1- (window-width)) max)) ; items per line
(setq width (/ (1- (window-width)) n)) ; width of each item
;; insert `n' items, each in a field of width `width'
(while alist
(unless (eq date 'now)
;; Add the score entry to the score file.
(when (= score gnus-score-interactive-default-score)
- (setq score nil))
+ (setq score nil))
(let ((old (gnus-score-get header))
elem)
(setq new
(t (list match))))
;; We see whether we can collapse some score entries.
;; This isn't quite correct, because there may be more elements
- ;; later on with the same key that have matching elems... Hm.
+ ;; later on with the same key that have matching elems... Hm.
(if (and old
(setq elem (assoc match old))
(eq (nth 3 elem) (nth 3 new))
new-thread-ids (cdr new-thread-ids))
(goto-char (point-min))
(while (search-forward this-id nil t)
- ;; found a match. remove this line
+ ;; found a match. remove this line
(beginning-of-line)
(kill-line 1)))
;; time than one would gain.
(while articles
(when (funcall match-func
- (or (aref (caar articles) gnus-score-index) 0)
- match)
+ (or (aref (caar articles) gnus-score-index) 0)
+ match)
(when trace
(push (cons (car-safe (rassq alist gnus-score-cache)) kill)
gnus-score-trace))
((and found gnus-update-score-entry-dates) ;Match, update date.
(gnus-score-set 'touched '(t) alist)
(setcar (nthcdr 2 kill) now))
- ((and expire (< date expire)) ;Old entry, remove.
+ ((and expire (< date expire)) ;Old entry, remove.
(gnus-score-set 'touched '(t) alist)
(setcdr entries (cdr rest))
(setq rest entries)))
((and found gnus-update-score-entry-dates) ;Match, update date.
(gnus-score-set 'touched '(t) alist)
(setcar (nthcdr 2 kill) now))
- ((and expire (< date expire)) ;Old entry, remove.
+ ((and expire (< date expire)) ;Old entry, remove.
(gnus-score-set 'touched '(t) alist)
(setcdr entries (cdr rest))
(setq rest entries)))
;; Find all the words in the buffer and enter them into
;; the hashtable.
(let ((syntab (syntax-table))
- word val)
+ word val)
(goto-char (point-min))
(unwind-protect
(progn
(setq sfiles (cdr sfiles)))
(kill-buffer (current-buffer))
;; Slight kludge here - the last score file returned should be
- ;; the local score file, whether it exists or not. This is so
+ ;; the local score file, whether it exists or not. This is so
;; that any score commands the user enters will go to the right
;; file, and not end up in some global score file.
(let ((localscore (gnus-score-file-name group)))
(while alist
(and (string-match (caar alist) group)
;; progn used just in case ("regexp") has no files
- ;; and score-files is still nil. -sj
+ ;; and score-files is still nil. -sj
;; this can be construed as a "stop searching here" feature :>
;; and used to simplify regexps in the single-alist
(progn
"Decay non-permanent scores in ALIST."
(let ((times (- (gnus-time-to-day (current-time)) day))
kill entry updated score n)
- (unless (zerop times) ;Done decays today already?
+ (unless (zerop times) ;Done decays today already?
(while (setq entry (pop alist))
(when (stringp (car entry))
(setq entry (cdr entry))
(defvar gnus-soup-packer "tar cf - %s | gzip > $HOME/Soupout%d.tgz"
"Format string command for packing a SOUP packet.
The SOUP files will be inserted where the %s is in the string.
-This string MUST contain both %s and %d. The file number will be
+This string MUST contain both %s and %d. The file number will be
inserted where %d appears.")
(defvar gnus-soup-unpacker "gunzip -c %s | tar xvf -"
(defun gnus-soup-parse-replies (file)
"Parse soup REPLIES file FILE.
The result is a of vectors, each containing one entry from the REPLIES
-file. The vector contain three strings, [prefix name encoding]."
+file. The vector contain three strings, [prefix name encoding]."
(let (replies)
(save-excursion
(set-buffer (find-file-noselect file))
(funcall message-send-news-function)))
((string= (gnus-soup-reply-kind (car replies)) "mail")
(gnus-message 5 "Sending mail to %s..."
- (mail-fetch-field "to"))
+ (mail-fetch-field "to"))
(sit-for 1)
(message-send-mail))
(t
;; the `gnus-newsrc-hashtb' has been created. While reading
;; the .newsrc file, Gnus will only use the information it
;; can find there for changing the data already read -
- ;; ie. reading the .newsrc file will not trash the data
+ ;; i. e., reading the .newsrc file will not trash the data
;; already read (except for read articles).
(save-excursion
(gnus-message 5 "Reading %s..." newsrc-file)
entry mentry)
(while rc
(or (null (nth 4 (car rc))) ; It's a native group.
- (assoc (caar rc) newsrc) ; It's already in the alist.
+ (assoc (caar rc) newsrc) ; It's already in the alist.
(if (setq entry (assoc (caar prev) newsrc))
(setcdr (setq mentry (memq entry newsrc))
(cons (car rc) (cdr mentry)))
(error
(gnus-error 3.2 "Possible error in %s" file)
nil))
- (or gnus-slave ; Slaves shouldn't delete these files.
+ (or gnus-slave ; Slaves shouldn't delete these files.
(condition-case ()
(delete-file file)
(error nil))))
(i 32))
(while (>= (setq i (1- i)) 0)
(aset table i [??]))
- ;; ... but not newline and cr, of course. (cr is necessary for the
+ ;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
(aset table ?\n nil)
(aset table ?\r nil)
(defmacro gnus-summary-skip-intangible ()
"If the current article is intangible, then jump to a different article."
'(let ((to (get-text-property (point) 'gnus-intangible)))
- (and to (gnus-summary-goto-subject to))))
+ (and to (gnus-summary-goto-subject to))))
(defmacro gnus-summary-article-intangible-p ()
"Say whether this article is intangible or not."
(gnus-data-list t)))
(level (gnus-data-level (car data))))
(if (zerop level)
- () ; This is a root.
+ () ; This is a root.
;; We search until we find an article with a level less than
;; this one. That function has to be the parent.
(while (and (setq data (cdr 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-existant numbers are the last article. :-)
+ t ; All non-existant numbers are the last article. :-)
(not (cdr (gnus-data-find-list article)))))
(defun gnus-make-thread-indent-array ()
number)))
(defun gnus-summary-set-local-parameters (group)
- "Go through the local params of GROUP and set all variable specs in that list."
+ "Go through the local params of GROUP and set all variable specs in that list."
(let ((params (gnus-group-find-parameter group))
elem)
(while params
(setq thread (cdr thread))
(while thread
(unless (memq (setq thr (gnus-id-to-thread
- (gnus-root-id
- (mail-header-id (caar thread)))))
+ (gnus-root-id
+ (mail-header-id (caar thread)))))
roots)
(push thr roots))
(setq thread (cdr thread)))
(setq thread (gnus-gethash last-id dep)))
(when thread
(prog1
- thread ; We return this thread.
+ thread ; We return this thread.
(unless dont-remove
(if (stringp (car thread))
(progn
(mapcar 'gnus-thread-total-score
(cdr (gnus-gethash (mail-header-id root)
gnus-newsgroup-dependencies)))
- (if (> (mail-header-number root) 0)
- (list (or (cdr (assq (mail-header-number root)
- gnus-newsgroup-scored))
- gnus-summary-default-score 0))))
+ (if (> (mail-header-number root) 0)
+ (list (or (cdr (assq (mail-header-number root)
+ gnus-newsgroup-scored))
+ gnus-summary-default-score 0))))
(list gnus-summary-default-score)
'(0))))
;; The user has to want it.
(when gnus-auto-center-summary
(when (get-buffer-window gnus-article-buffer)
- ;; Only do recentering when the article buffer is displayed,
- ;; Set the window start to either `bottom', which is the biggest
- ;; possible valid number, or the second line from the top,
- ;; whichever is the least.
- (set-window-start
- window (min bottom (save-excursion
- (forward-line (- top)) (point)))))
+ ;; Only do recentering when the article buffer is displayed,
+ ;; Set the window start to either `bottom', which is the biggest
+ ;; possible valid number, or the second line from the top,
+ ;; whichever is the least.
+ (set-window-start
+ window (min bottom (save-excursion
+ (forward-line (- top)) (point)))))
;; Do horizontal recentering while we're at it.
(when (and (get-buffer-window (current-buffer) t)
(not (eq gnus-auto-center-summary 'vertical)))
(not (eq gnus-build-sparse-threads 'more))
(null gnus-thread-expunge-below)
(not gnus-use-nocem)))
- () ; Do nothing.
+ () ; Do nothing.
(push gnus-newsgroup-limit gnus-newsgroup-limits)
(setq gnus-newsgroup-limit nil)
(mapatoms
gnus-visual)
(gnus-summary-select-article nil 'force)))
(gnus-summary-goto-subject gnus-current-article)
-; (gnus-configure-windows 'article)
+ ; (gnus-configure-windows 'article)
(gnus-summary-position-point))
(defun gnus-summary-verbose-headers (&optional arg)
(save-window-excursion
(let ((gnus-article-buffer " *reparent*")
(current-article (gnus-summary-article-number))
- ; first grab the marked article, otherwise one line up.
+ ; first grab the marked article, otherwise one line up.
(parent-article (if (not (null gnus-newsgroup-processable))
(car gnus-newsgroup-processable)
(save-excursion
(gnus-summary-sort 'author reverse))
(defun gnus-summary-sort-by-subject (&optional reverse)
- "Sort summary buffer by subject alphabetically. `Re:'s are ignored.
+ "Sort summary buffer by subject alphabetically. `Re:'s are ignored.
If case-fold-search is non-nil, case of letters is ignored.
Argument REVERSE means reverse order."
(interactive "P")
(forward-line 1)
(setq b (point))
(insert " " (file-name-nondirectory
- (cdr (assq 'name (car pslist))))
+ (cdr (assq 'name (car pslist))))
": " (or (cdr (assq 'execute (car pslist))) "") "\n")
(setq e (point))
(forward-line -1) ; back to `b'
(t gnus-reffed-article-number))
(current-buffer))
(insert " Article retrieved.\n"))
- ;(when (and header
- ; (memq (mail-header-number header) gnus-newsgroup-sparse))
- ; (setcar (gnus-id-to-thread id) nil))
+ ;(when (and header
+ ; (memq (mail-header-number header) gnus-newsgroup-sparse))
+ ; (setcar (gnus-id-to-thread id) nil))
(if (not (setq header (car (gnus-get-newsgroup-headers))))
() ; Malformed head.
(unless (memq (mail-header-number header) gnus-newsgroup-sparse)
(forward-line -1)
(when (setq alist (assoc (gnus-current-topic) gnus-topic-alist))
(setcdr alist (gnus-delete-first group (cdr alist))))))
- ;; If the group is subscribed. then we enter it into the topics.
+ ;; If the group is subscribed. then we enter it into the topics.
(when (and (< level gnus-level-zombie)
(>= oldlevel gnus-level-zombie))
(let* ((prev (gnus-group-group-name))
(message "")))
;; I suspect there's a better way, but I haven't taken the time to do
-;; it yet. -erik selberg@cs.washington.edu
+;; it yet. -erik selberg@cs.washington.edu
(defun gnus-dd-mmm (messy-date)
"Return a string like DD-MMM from a big messy string"
(let ((datevec (condition-case () (timezone-parse-date messy-date)
(setq gnus-uu-user-view-rules '((\"jpg$\\\\|gif$\" \"xli\")))
-Both these variables are lists of lists with two string elements. The
-first string is a regular expression. If the file name matches this
+Both these variables are lists of lists with two string elements. The
+first string is a regular expression. If the file name matches this
regular expression, the command in the second string is executed with
the file as an argument.
If the command string contains \"%s\", the file name will be inserted
-at that point in the command string. If there's no \"%s\" in the
+at that point in the command string. If there's no \"%s\" in the
command string, the file name will be appended to the command string
before executing.
There are several user variables to tailor the behaviour of gnus-uu to
-your needs. First we have `gnus-uu-user-view-rules', which is the
+your needs. First we have `gnus-uu-user-view-rules', which is the
variable gnus-uu first consults when trying to decide how to view a
-file. If this variable contains no matches, gnus-uu examines the
-default rule variable provided in this package. If gnus-uu finds no
+file. If this variable contains no matches, gnus-uu examines the
+default rule variable provided in this package. If gnus-uu finds no
match here, it uses `gnus-uu-user-view-rules-end' to try to make a
match.")
(defvar gnus-uu-ignore-default-view-rules nil
"*Non-nil means that gnus-uu will ignore the default viewing rules.
-Only the user viewing rules will be consulted. Default is nil.")
+Only the user viewing rules will be consulted. Default is nil.")
(defvar gnus-uu-grabbed-file-functions nil
"*Functions run on each file after successful decoding.
(defvar gnus-uu-ignore-default-archive-rules nil
"*Non-nil means that gnus-uu will ignore the default archive unpacking commands.
-Only the user unpacking commands will be consulted. Default is nil.")
+Only the user unpacking commands will be consulted. Default is nil.")
(defvar gnus-uu-kill-carriage-return t
"*Non-nil means that gnus-uu will strip all carriage returns from articles.
(defvar gnus-uu-view-with-metamail nil
"*Non-nil means that files will be viewed with metamail.
The gnus-uu viewing functions will be ignored and gnus-uu will try
-to guess at a content-type based on file name suffixes. Default
+to guess at a content-type based on file name suffixes. Default
it nil.")
(defvar gnus-uu-unmark-articles-not-decoded nil
(defvar gnus-uu-save-in-digest nil
"*Non-nil means that gnus-uu, when asked to save without decoding, will save in digests.
If this variable is nil, gnus-uu will just save everything in a
-file without any embellishments. The digesting almost conforms to RFC1153 -
+file without any embellishments. The digesting almost conforms to RFC1153 -
no easy way to specify any meaningful volume and issue numbers were found,
so I simply dropped them.")
(and scan (setq files (gnus-uu-scan-directory gnus-uu-work-dir))))
(and save (gnus-uu-save-files files save))
(if (eq gnus-uu-do-not-unpack-archives nil)
- (setq files (gnus-uu-unpack-files files)))
+ (setq files (gnus-uu-unpack-files files)))
(setq files (nreverse (gnus-uu-get-actions files)))
(or not-insert (not gnus-insert-pseudo-articles)
(gnus-summary-insert-pseudos files save))))
;; ignores any leading "version numbers" thingies that they use in
;; the comp.binaries groups, and either replaces anything that looks
;; like "2/3" with "[0-9]+/[0-9]+" or, if it can't find something
- ;; like that, replaces the last two numbers with "[0-9]+". This, in
+ ;; like that, replaces the last two numbers with "[0-9]+". This, in
;; my experience, should get most postings of a series.
(let ((count 2)
(vernum "v[0-9]+[a-z][0-9]+:")
(defun gnus-uu-find-articles-matching
(&optional subject only-unread do-not-translate)
;; Finds all articles that matches the regexp SUBJECT. If it is
- ;; nil, the current article name will be used. If ONLY-UNREAD is
- ;; non-nil, only unread articles are chosen. If DO-NOT-TRANSLATE is
+ ;; nil, the current article name will be used. If ONLY-UNREAD is
+ ;; non-nil, only unread articles are chosen. If DO-NOT-TRANSLATE is
;; non-nil, article names are not equalized before sorting.
(let ((subject (or subject
(gnus-uu-reginize-string (gnus-summary-article-subject))))
(defun gnus-uu-expand-numbers (string-list &optional translate)
;; Takes a list of strings and "expands" all numbers in all the
;; strings. That is, this function makes all numbers equal length by
- ;; prepending lots of zeroes before each number. This is to ease later
+ ;; prepending lots of zeroes before each number. This is to ease later
;; sorting to find out what sequence the articles are supposed to be
- ;; decoded in. Returns the list of expanded strings.
+ ;; decoded in. Returns the list of expanded strings.
(let ((out-list string-list)
string)
(save-excursion
;; to apply to each article.
;;
;; The function to be called should take two parameters. The first
-;; parameter is the article buffer. The function should leave the
-;; result, if any, in this buffer. Most treatment functions will just
+;; parameter is the article buffer. The function should leave the
+;; result, if any, in this buffer. Most treatment functions will just
;; generate files...
;;
;; The second parameter is the state of the list of articles, and can
;; have four values: `first', `middle', `last' and `first-and-last'.
;;
-;; The function should return a list. The list may contain the
+;; The function should return a list. The list may contain the
;; following symbols:
;; `error' if an error occurred
;; `begin' if the beginning of an encoded file has been received
action))
(defun gnus-uu-treat-archive (file-path)
- ;; Unpacks an archive. Returns t if unpacking is successful.
+ ;; Unpacks an archive. Returns t if unpacking is successful.
(let ((did-unpack t)
action command dir)
(setq action (gnus-uu-choose-action
;;;
;; Any function that is to be used as and encoding method will take two
-;; parameters: PATH-NAME and FILE-NAME. (E.g. "/home/gaga/spiral.jpg"
+;; parameters: PATH-NAME and FILE-NAME. (E.g. "/home/gaga/spiral.jpg"
;; and "spiral.jpg", respectively.) The function should return nil if
;; the encoding wasn't successful.
(defvar gnus-uu-post-encode-method 'gnus-uu-post-encode-uuencode
(defvar gnus-uu-post-threaded nil
"Non-nil means that gnus-uu will post the encoded file in a thread.
This may not be smart, as no other decoder I have seen are able to
-follow threads when collecting uuencoded articles. (Well, I have seen
+follow threads when collecting uuencoded articles. (Well, I have seen
one package that does that - gnus-uu, but somehow, I don't think that
counts...) Default is nil.")
(defvar gnus-uu-post-separate-description t
"Non-nil means that the description will be posted in a separate article.
-The first article will typically be numbered (0/x). If this variable
+The first article will typically be numbered (0/x). If this variable
is nil, the description the user enters will be included at the
-beginning of the first article, which will be numbered (1/x). Default
+beginning of the first article, which will be numbered (1/x). Default
is t.")
(defvar gnus-uu-post-binary-separator "--binary follows this line--")
(set-window-configuration gnus-uu-winconf-post-news)))
;; Asks for a file to encode, encodes it and inserts the result in
-;; the current buffer. Returns the file name the user gave.
+;; the current buffer. Returns the file name the user gave.
(defun gnus-uu-post-insert-binary ()
(let ((uuencode-buffer-name "*uuencode buffer*")
file-path uubuf file-name)
(setq win (get-buffer-window buf t)))
(if win
(when (memq 'point split)
- (setq all-visible win))
+ (setq all-visible win))
(setq all-visible nil)))
(t
(when (eq type 'frame)
(defun gnus-xmas-group-menu-add ()
(gnus-xmas-menu-add group
- gnus-group-reading-menu gnus-group-group-menu gnus-group-misc-menu))
+ gnus-group-reading-menu gnus-group-group-menu gnus-group-misc-menu))
(defun gnus-xmas-summary-menu-add ()
(gnus-xmas-menu-add summary
- gnus-summary-misc-menu gnus-summary-kill-menu
- gnus-summary-article-menu gnus-summary-thread-menu
- gnus-summary-post-menu ))
+ gnus-summary-misc-menu gnus-summary-kill-menu
+ gnus-summary-article-menu gnus-summary-thread-menu
+ gnus-summary-post-menu ))
(defun gnus-xmas-article-menu-add ()
(gnus-xmas-menu-add article
- gnus-article-article-menu gnus-article-treatment-menu))
+ gnus-article-article-menu gnus-article-treatment-menu))
(defun gnus-xmas-score-menu-add ()
(gnus-xmas-menu-add score
- gnus-score-menu))
+ gnus-score-menu))
(defun gnus-xmas-pick-menu-add ()
(gnus-xmas-menu-add pick
- gnus-pick-menu))
+ gnus-pick-menu))
(defun gnus-xmas-binary-menu-add ()
(gnus-xmas-menu-add binary
- gnus-binary-menu))
+ gnus-binary-menu))
(defun gnus-xmas-tree-menu-add ()
(gnus-xmas-menu-add tree
- gnus-tree-menu))
+ gnus-tree-menu))
(defun gnus-xmas-server-menu-add ()
(gnus-xmas-menu-add menu
- gnus-server-server-menu gnus-server-connections-menu))
+ gnus-server-server-menu gnus-server-connections-menu))
(defun gnus-xmas-browse-menu-add ()
(gnus-xmas-menu-add browse
- gnus-browse-menu))
+ gnus-browse-menu))
(defun gnus-xmas-grouplens-menu-add ()
(gnus-xmas-menu-add grouplens
- gnus-grouplens-menu))
+ gnus-grouplens-menu))
(defun gnus-xmas-read-event-char ()
"Get the next event."
(while (not (key-press-event-p event))
(setq event (next-event)))
(cons (and (key-press-event-p event)
- ; (numberp (event-key event))
+ ; (numberp (event-key event))
(event-to-character event))
event)))
;; Fix by "jeff (j.d.) sparkes" <jsparkes@bnr.ca>.
(defvar gnus-display-type (device-class)
"A symbol indicating the display Emacs is running under.
-The symbol should be one of `color', `grayscale' or `mono'. If Emacs
+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'.
+`~/.Xdefaults'. See also `gnus-background-mode'.
This is a meta-variable that will affect what default values other
variables get. You would normally not change this variable, but
(eval '(run-hooks 'gnus-load-hook))
-(defconst gnus-version-number "0.28"
+(defconst gnus-version-number "0.29"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Red Gnus v%s" gnus-version-number)
"Add parameter PARAM to GROUP."
(let ((info (gnus-get-info group)))
(if (not info)
- () ; This is a dead group. We just ignore it.
+ () ; This is a dead group. We just ignore it.
;; Cons the new param to the old one and update.
(gnus-group-set-info (cons param (gnus-info-params info))
group 'params))))
"Set parameter NAME to VALUE in GROUP."
(let ((info (gnus-get-info group)))
(if (not info)
- () ; This is a dead group. We just ignore it.
+ () ; This is a dead group. We just ignore it.
(let ((old-params (gnus-info-params info))
(new-params (list (cons name value))))
(while old-params
value))
(push (if (cdr value)
(cons header (mapconcat #'identity (nreverse value) " "))
- (cons header (car value)))
+ (cons header (car value)))
message-headers)))
(goto-char top)
(nreverse message-headers)))
HEADER-ALIST defaults to the dynamically bound variable `headers' if nil.
See `mail-header' for the semantics of VALUE."
(let* ((alist (or header-alist headers))
- (entry (assq header alist)))
+ (entry (assq header alist)))
(if entry
(setf (cdr entry) value)
- (nconc alist (list (cons header value)))))
+ (nconc alist (list (cons header value)))))
value)
(defsetf mail-header (header &optional header-alist) (value)
(mapcar #'car format-rules))))
(dolist (rule format-rules)
(let* ((header (car rule))
- (value (mail-header header)))
+ (value (mail-header header)))
(cond ((null header) 'ignore)
((eq header t)
(dolist (defaulted headers)
(value (cdr defaulted)))
(if (cdr rule)
(funcall (cdr rule) header value)
- (funcall mail-header-format-function header value))))))
+ (funcall mail-header-format-function header value))))))
(value
(if (cdr rule)
(funcall (cdr rule) header value)
- (funcall mail-header-format-function header value))))))
+ (funcall mail-header-format-function header value))))))
(insert "\n")))
(provide 'mailheader)
(defvar message-fcc-handler-function 'rmail-output
"*A function called to save outgoing articles.
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
+article in. The default function is `rmail-output' which saves in Unix
mailbox format.")
;;;###autoload
;;;###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
+If nil, ignore the header. If it is t, use its value, but query before
using the \"poster\" value. If it is the symbol `ask', query the user
whether to ignore the \"poster\" value. If it is the symbol `use',
always use the value.")
(re-search-forward "^OR\\>" nil t)))
(kill-buffer buffer))))
;; According to RFC822, "The field-name must be composed of printable
- ;; ASCII characters (i.e. characters that have decimal values between
- ;; 33 and 126, except colon)", i.e. any chars except ctl chars,
+ ;; ASCII characters (i. e., characters that have decimal values between
+ ;; 33 and 126, except colon)", i. e., any chars except ctl chars,
;; space, or colon.
'(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:"))
"Set this non-nil if the system's mailer runs the header and body together.
name-default))
(default-directory
(file-name-as-directory message-autosave-directory)))
- (rename-buffer name t)))))
+ (rename-buffer name t)))))
(defun message-fill-yanked-message (&optional justifyp)
"Fill the paragraphs of a message yanked into this one.
(save-excursion
(let ((start (point))
mark)
- (if (not (re-search-forward message-signature-separator (mark t) t))
- ;; No signature here, so we just indent the cited text.
+ (if (not (re-search-forward message-signature-separator (mark t) t))
+ ;; No signature here, so we just indent the cited text.
+ (message-indent-citation)
+ ;; Find the last non-empty line.
+ (forward-line -1)
+ (while (looking-at "[ \t]*$")
+ (forward-line -1))
+ (forward-line 1)
+ (setq mark (set-marker (make-marker) (point)))
+ (goto-char start)
(message-indent-citation)
- ;; Find the last non-empty line.
- (forward-line -1)
- (while (looking-at "[ \t]*$")
- (forward-line -1))
- (forward-line 1)
- (setq mark (set-marker (make-marker) (point)))
- (goto-char start)
- (message-indent-citation)
- ;; Enable undoing the deletion.
- (undo-boundary)
- (delete-region mark (mark t))
- (set-marker mark nil)))))
+ ;; Enable undoing the deletion.
+ (undo-boundary)
+ (delete-region mark (mark t))
+ (set-marker mark nil)))))
\f
;; yes, it does The Right Thing w.r.t. Resent-To and it's kin.
;;
;; in general, ALL of qmail-inject's defaults are perfect for simply
- ;; reading a formatted (i.e., at least a To: or Resent-To header)
+ ;; reading a formatted (i. e., at least a To: or Resent-To header)
;; message from stdin.
;;
;; qmail also has the advantage of not having being raped by
;; all this is way cool coz it lets us keep the arguments entirely
;; free for -inject-arguments -- a big win for the user and for us
;; since we don't have to play that double-guessing game and the user
- ;; gets full control (no gestapo'ish -f's, for instance). --sj
+ ;; gets full control (no gestapo'ish -f's, for instance). --sj
message-qmail-inject-args)
;; qmail-inject doesn't say anything on it's stdout/stderr,
;; we have to look at the retval instead
(buffer-disable-undo (current-buffer))
(erase-buffer)
;; Avoid copying text props.
- (insert (format
- "%s" (save-excursion
- (set-buffer messbuf)
- (buffer-string))))
+ (insert (format
+ "%s" (save-excursion
+ (set-buffer messbuf)
+ (buffer-string))))
;; Remove some headers.
(save-restriction
(message-narrow-to-headers)
(save-excursion
(if (string-match "^cmsg " (message-fetch-field "subject"))
(y-or-n-p
- "The control code \"cmsg \" is in the subject. Really post? ")
+ "The control code \"cmsg \" is in the subject. Really post? ")
t)))
;; Check for multiple identical headers.
(or (message-check-element 'multiple-headers)
(setq found nil))))
(if found
(y-or-n-p
- (format "Multiple %s headers. Really post? " found))
+ (format "Multiple %s headers. Really post? " found))
t))))
;; Check for Version and Sendsys.
(or (message-check-element 'sendsys)
(save-excursion
(if (re-search-forward "^Sendsys:\\|^Version:" nil t)
(y-or-n-p
- (format "The article contains a %s command. Really post? "
+ (format "The article contains a %s command. Really post? "
(buffer-substring (match-beginning 0)
(1- (match-end 0)))))
t)))
(save-excursion
(if (re-search-forward "^Approved:" nil t)
(y-or-n-p
- "The article contains an Approved header. Really post? ")
+ "The article contains an Approved header. Really post? ")
t)))
;; Check the Message-Id header.
(or (message-check-element 'message-id)
(string-match "@[^\\.]*\\." message-id))
(y-or-n-p
(format
- "The Message-ID looks strange: \"%s\". Really post? "
+ "The Message-ID looks strange: \"%s\". Really post? "
message-id))))))
;; Check the Subject header.
(or
(save-excursion
(if (re-search-forward "[\000-\007\013\015-\037\200-\237]" nil t)
(y-or-n-p
- "The article contains control characters. Really post? ")
+ "The article contains control characters. Really post? ")
t)))
;; Check excessive size.
(or (message-check-element 'size)
(if (> (buffer-size) 60000)
(y-or-n-p
- (format "The article is %d octets long. Really post? "
+ (format "The article is %d octets long. Really post? "
(buffer-size)))
t))
;; Check whether any new text has been added.
(goto-char fullname-start)
(while (re-search-forward
"\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)"
- nil 1)
+ nil 1)
(replace-match "\\1(\\3)" t)
(goto-char fullname-start)))
(insert ")")))
(message-delete-line))
(pop headers)))
;; Go through all the required headers and see if they are in the
- ;; articles already. If they are not, or are empty, they are
+ ;; articles already. If they are not, or are empty, they are
;; inserted automatically - except for Subject, Newsgroups and
;; Distribution.
(while headers
(concat "^" (downcase (symbol-name header)) ":")
nil t))
(progn
- ;; The header was found. We insert a space after the
+ ;; The header was found. We insert a space after the
;; colon, if there is none.
(if (/= (following-char) ? ) (insert " ") (forward-char 1))
;; Find out whether the header is empty...
(defun message-insert-courtesy-copy ()
"Insert a courtesy message in mail copies of combined messages."
(let (newsgroups)
- (save-excursion
- (save-restriction
- (message-narrow-to-headers)
- (when (setq newsgroups (message-fetch-field "newsgroups"))
- (goto-char (point-max))
- (insert "Posted-To: " newsgroups "\n")))
- (forward-line 1)
- (when message-courtesy-message
- (cond
- ((string-match "%s" message-courtesy-message)
- (insert (format message-courtesy-message newsgroups)))
- (t
- (insert message-courtesy-message)))))))
+ (save-excursion
+ (save-restriction
+ (message-narrow-to-headers)
+ (when (setq newsgroups (message-fetch-field "newsgroups"))
+ (goto-char (point-max))
+ (insert "Posted-To: " newsgroups "\n")))
+ (forward-line 1)
+ (when message-courtesy-message
+ (cond
+ ((string-match "%s" message-courtesy-message)
+ (insert (format message-courtesy-message newsgroups)))
+ (t
+ (insert message-courtesy-message)))))))
;;;
;;; Setting up a message buffer
(lambda (addr) (cdr addr)) ccalist ", "))))
(when (string-match "^ +" (cdr ccs))
(setcdr ccs (substring (cdr ccs) (match-end 0))))
- (push ccs follow-to))))))
+ (push ccs follow-to))))))
(widen))
(message-pop-to-buffer (message-buffer-name
which specify the range to operate on."
(interactive "r")
(save-excursion
- (let ((end1 (make-marker)))
- (move-marker end1 (max start end))
- (goto-char (min start end))
- (while (< (point) end1)
- (or (looking-at "[_\^@- ]")
- (insert (following-char) "\b"))
- (forward-char 1)))))
+ (let ((end1 (make-marker)))
+ (move-marker end1 (max start end))
+ (goto-char (min start end))
+ (while (< (point) end1)
+ (or (looking-at "[_\^@- ]")
+ (insert (following-char) "\b"))
+ (forward-char 1)))))
;;;###autoload
(defun unbold-region (start end)
which specify the range to operate on."
(interactive "r")
(save-excursion
- (let ((end1 (make-marker)))
- (move-marker end1 (max start end))
- (goto-char (min start end))
- (while (re-search-forward "\b" end1 t)
- (if (eq (following-char) (char-after (- (point) 2)))
- (delete-char -2))))))
+ (let ((end1 (make-marker)))
+ (move-marker end1 (max start end))
+ (goto-char (min start end))
+ (while (re-search-forward "\b" end1 t)
+ (if (eq (following-char) (char-after (- (point) 2)))
+ (delete-char -2))))))
(defalias 'message-exchange-point-and-mark 'exchange-point-and-mark)
;;; Internal functions.
;; If FORCE, delete article no matter how many X-Gnus-Newsgroup
-;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
+;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
;; delimiter line.
(defun nnbabyl-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(save-excursion
(set-buffer nnbabyl-mbox-buffer)
(= (buffer-size) (nnheader-file-size nnbabyl-mbox-file))))
- () ; This buffer hasn't changed since we read it last. Possibly.
+ () ; This buffer hasn't changed since we read it last. Possibly.
(save-excursion
(let ((delim (concat "^" nnbabyl-mail-delimiter))
(alist nnbabyl-group-alist)
(defun nndoc-mime-digest-type-p ()
(let ((case-fold-search t)
boundary-id b-delimiter entry)
- (when (and
- (re-search-forward
- (concat "^Content-Type: *multipart/digest;[ \t\n]*[ \t]"
- "boundary=\"\\([^\"\n]*[^\" \t\n]\\)\"")
- nil t)
- (match-beginning 1))
- (setq boundary-id (match-string 1)
- b-delimiter (concat "\n--" boundary-id "[\n \t]+"))
- (setq entry (assq 'mime-digest nndoc-type-alist))
- (setcdr entry
- (list
- (cons 'head-end "^ ?$")
- (cons 'body-begin "^ ?\n")
- (cons 'article-begin b-delimiter)
- (cons 'body-end-function 'nndoc-digest-body-end)
- (cons 'file-end (concat "\n--" boundary-id "--[ \t]*$"))))
- t)))
+ (when (and
+ (re-search-forward
+ (concat "^Content-Type: *multipart/digest;[ \t\n]*[ \t]"
+ "boundary=\"\\([^\"\n]*[^\" \t\n]\\)\"")
+ nil t)
+ (match-beginning 1))
+ (setq boundary-id (match-string 1)
+ b-delimiter (concat "\n--" boundary-id "[\n \t]+"))
+ (setq entry (assq 'mime-digest nndoc-type-alist))
+ (setcdr entry
+ (list
+ (cons 'head-end "^ ?$")
+ (cons 'body-begin "^ ?\n")
+ (cons 'article-begin b-delimiter)
+ (cons 'body-end-function 'nndoc-digest-body-end)
+ (cons 'file-end (concat "\n--" boundary-id "--[ \t]*$"))))
+ t)))
(defun nndoc-standard-digest-type-p ()
(when (and (re-search-forward (concat "^" (make-string 70 ?-) "\n\n") nil t)
;; file entirely for mboxes.)
(when (or nnfolder-ignore-active-file
(< maxid 2))
- (while (and (search-forward marker nil t)
- (re-search-forward number nil t))
- (let ((newnum (string-to-number (match-string 0))))
- (setq maxid (max maxid newnum))
- (setq minid (min minid newnum))))
- (setcar active (max 1 (min minid maxid)))
- (setcdr active (max maxid (cdr active)))
- (goto-char (point-min)))
+ (while (and (search-forward marker nil t)
+ (re-search-forward number nil t))
+ (let ((newnum (string-to-number (match-string 0))))
+ (setq maxid (max maxid newnum))
+ (setq minid (min minid newnum))))
+ (setcar active (max 1 (min minid maxid)))
+ (setcdr active (max maxid (cdr active)))
+ (goto-char (point-min)))
;; As long as we trust that the user will only insert unmarked mail
;; at the end, go to the end and search backwards for the last
(goto-char (point-min))))))
;; Keep track of the active number on our own, and insert it back
- ;; into the active list when we're done. Also, prime the pump to
+ ;; into the active list when we're done. Also, prime the pump to
;; cut down on the number of searches we do.
(setq end (point-marker))
(set-marker end (or (and (re-search-forward delim nil t)
(goto-char (point-min))
(when naked
(insert "\n"))
- ;; Search to the beginning of the next header. Error messages
+ ;; Search to the beginning of the next header. Error messages
;; do not begin with 2 or 3.
(prog1
(when (or naked (re-search-forward "^[23][0-9]+ " nil t))
(defun nnheader-insert-references (references message-id)
"Insert a References header based on REFERENCES and MESSAGE-ID."
(if (and (not references) (not message-id))
- () ; This is illegal, but not all articles have Message-IDs.
+ () ; This is illegal, but not all articles have Message-IDs.
(mail-position-on-field "References")
(let ((begin (save-excursion (beginning-of-line) (point)))
(fill-column 78)
(defvar efs-path-regexp)
(defun nnheader-re-read-dir (path)
"Re-read directory PATH if PATH is on a remote system."
- (if (and (fboundp 'efs-re-read-dir) (boundp 'efs-path-regexp))
- (when (string-match efs-path-regexp path)
- (efs-re-read-dir path))
- (if (and (fboundp 'ange-ftp-re-read-dir) (boundp 'ange-ftp-path-format))
- (when (string-match (car ange-ftp-path-format) path)
- (ange-ftp-re-read-dir path)))))
+ (if (and (fboundp 'efs-re-read-dir) (boundp 'efs-path-regexp))
+ (when (string-match efs-path-regexp path)
+ (efs-re-read-dir path))
+ (if (and (fboundp 'ange-ftp-re-read-dir) (boundp 'ange-ftp-path-format))
+ (when (string-match (car ange-ftp-path-format) path)
+ (ange-ftp-re-read-dir path)))))
(defun nnheader-insert-file-contents-literally (filename &optional visit beg end replace)
"Like `insert-file-contents', q.v., but only reads in the file.
(deffoo nnkiboze-request-article (article &optional newsgroup server buffer)
(nnkiboze-possibly-change-group newsgroup)
(if (not (numberp article))
- ;; This is a real kludge. It might not work at times, but it
- ;; does no harm I think. The only alternative is to offer no
+ ;; This is a real kludge. It might not work at times, but it
+ ;; does no harm I think. The only alternative is to offer no
;; article fetching by message-id at all.
(nntp-request-article article newsgroup gnus-nntp-server buffer)
(let* ((header (gnus-summary-article-header article))
(progn
(gnus-group-select-group nil)
(eq major-mode 'gnus-summary-mode))))
- () ; No unread articles, or we couldn't enter this group.
+ () ; No unread articles, or we couldn't enter this group.
;; We are now in the group where we want to be.
(setq method (gnus-find-method-for-group gnus-newsgroup-name))
(and (eq method gnus-select-method) (setq method nil))
"*Hook that will be run after the incoming mail has been transferred.
The incoming mail is moved from `nnmail-spool-file' (which normally is
something like \"/usr/spool/mail/$user\") to the user's home
-directory. This hook is called after the incoming mail box has been
+directory. This hook is called after the incoming mail box has been
emptied, and can be used to call any mail box programs you have
running (\"xwatch\", etc.)
;;; Internal functions.
;; If FORCE, delete article no matter how many X-Gnus-Newsgroup
-;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
+;; headers there are. If LEAVE-DELIM, don't delete the Unix mbox
;; delimiter line.
(defun nnmbox-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(defun nnmh-update-gnus-unreads (group)
;; Go through the .nnmh-articles file and compare with the actual
- ;; articles in this folder. The articles that are "new" will be
+ ;; articles in this folder. The articles that are "new" will be
;; marked as unread by Gnus.
(let* ((dir nnmh-current-directory)
(files (sort (mapcar (function (lambda (name) (string-to-int name)))
(defvoo nnml-nov-is-evil nil
"If non-nil, Gnus will never generate and use nov databases for mail groups.
Using nov databases will speed up header fetching considerably.
-This variable shouldn't be flipped much. If you have, for some reason,
+This variable shouldn't be flipped much. If you have, for some reason,
set this to t, and want to set it to nil again, you should always run
-the `nnml-generate-nov-databases' command. The function will go
+the `nnml-generate-nov-databases' command. The function will go
through all nnml directories and generate nov databases for them
-all. This may very well take some time.")
+all. This may very well take some time.")
(defvoo nnml-prepare-save-mail-hook nil
"Hook run narrowed to an article before saving.")
(delete-region (progn (beginning-of-line) (point))
(progn (forward-line 1) (point)))
;; The line isn't here, so we have to find out where
- ;; we should insert it. (This situation should never
+ ;; we should insert it. (This situation should never
;; occur, but one likes to make sure...)
(while (and (looking-at "[0-9]+\t")
(< (string-to-int
(if (nnheader-be-verbose 5) nil 'nomesg))
(setq first file)))
(setq ga (cdr ga))))
- ;; Generate a nov line for this article. We generate the nov
+ ;; Generate a nov line for this article. We generate the nov
;; line after saving, because nov generation destroys the
;; header.
(setq headers (nnml-parse-head chars))
(while functions
(unless (fboundp (setq function
(nnoo-symbol backend (nnoo-rest-symbol
- (car functions)))))
+ (car functions)))))
(eval `(deffoo ,function (&rest args)
(,call-function ',backend ',(car functions) args))))
(pop functions)))))
(defvoo nnsoup-packer "tar cf - %s | gzip > $HOME/Soupin%d.tgz"
"Format string command for packing a SOUP packet.
The SOUP files will be inserted where the %s is in the string.
-This string MUST contain both %s and %d. The file number will be
+This string MUST contain both %s and %d. The file number will be
inserted where %d appears.")
(defvoo nnsoup-unpacker "gunzip -c %s | tar xvf -"
(buffer-name (concat " *nnsoup " file "*")))
(or (get-buffer buffer-name) ; File aready loaded.
(when (file-exists-p (concat nnsoup-directory file))
- (save-excursion ; Load the file.
+ (save-excursion ; Load the file.
(set-buffer (get-buffer-create buffer-name))
(buffer-disable-undo (current-buffer))
(push (cons nnsoup-current-group (current-buffer)) nnsoup-buffers)
(while (and (looking-at "\\([^ ]+\\) +[0-9]+ ")
(progn
;; We insert a .0 to make the list reader
- ;; interpret the number as a float. It is far
+ ;; interpret the number as a float. It is far
;; too big to be stored in a lisp integer.
(goto-char (1- (match-end 0)))
(insert ".0")
(defvoo nntp-xover-commands '("XOVER" "XOVERVIEW")
"*List of strings that are used as commands to fetch NOV lines from a server.
-The strings are tried in turn until a positive response is gotten. If
+The strings are tried in turn until a positive response is gotten. If
none of the commands are successful, nntp will just grab headers one
by one.")
have an account at the machine \"other.machine\". This machine has
access to an NNTP server that you can't access locally. You could
then use this hook to rsh to the remote machine and start a proxy NNTP
-server there that you can connect to. See also `nntp-open-connection-function'")
+server there that you can connect to. See also `nntp-open-connection-function'")
(defvoo nntp-warn-about-losing-connection t
"*If non-nil, beep when a server closes connection.")
(not (re-search-backward "^\\.\r?\n" (- (point) 4) t))))
(nntp-accept-response)))
- ;; Now all replies are received. We remove CRs.
+ ;; Now all replies are received. We remove CRs.
(goto-char (point-min))
(while (search-forward "\r" nil t)
(replace-match "" t t))
(save-excursion
(set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
nntp-server-buffer))
- (message "nntp reading%s" (make-string (/ (point-max) 10000) ?.))
+ (let ((len (/ (point-max) 10000)))
+ (unless (zerop len)
+ (message "nntp reading%s" (make-string len ?.))))
(accept-process-output process 1)))
(defun nntp-accept-response ()
(zerop (% count nntp-maximum-request)))
(accept-process-output)
;; On some Emacs versions the preceding function has
- ;; a tendency to change the buffer. Perhaps. It's
+ ;; a tendency to change the buffer. Perhaps. It's
;; quite difficult to reproduce, because it only
;; seems to happen once in a blue moon.
(set-buffer buf)
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
- (and (looking-at "[23]") ; No error message.
+ (and (looking-at "[23]") ; No error message.
;; We also have to look at the lines. Some buggy
;; servers give back simple lines with just the
;; article number. How... helpful.
;;; Commentary:
;; The other access methods (nntp, nnspool, etc) are general news
-;; access methods. This module relies on Gnus and can not be used
+;; access methods. This module relies on Gnus and can not be used
;; separately.
;;; Code:
(defun nnweb-encode-www-form-urlencoded (pairs)
"Return PAIRS encoded for forms."
(mapconcat
- (function
- (lambda (data)
- (concat (w3-form-encode-xwfu (car data)) "="
- (w3-form-encode-xwfu (cdr data))))) pairs "&"))
+ (function
+ (lambda (data)
+ (concat (w3-form-encode-xwfu (car data)) "="
+ (w3-form-encode-xwfu (cdr data))))) pairs "&"))
(defun nnweb-fetch-form (url pairs)
(let ((url-request-data (nnweb-encode-www-form-urlencoded pairs))
(url-request-method 'POST)
(url-request-extra-headers
'(("Content-type" . "application/x-www-form-urlencoded"))))
- (prog1
- (url-insert-file-contents url)
- (setq buffer-file-name nil))))
+ (url-insert-file-contents url)
+ (setq buffer-file-name nil))
+ t)
(defun nnweb-decode-entities ()
(goto-char (point-min))
("threaded" . "0")
("showsort" . "score")
("agesign" . "1")
- ("ageweight" . "1"))))
+ ("ageweight" . "1")))
+ t)
;;;
;;; InReference
(goto-char (point-min))
(search-forward "</pre><hr>" nil t)
(delete-region (point-min) (point))
- ;(nnweb-decode-entities)
+ ;(nnweb-decode-entities)
(goto-char (point-min))
(while (re-search-forward "^ +[0-9]+\\." nil t)
(narrow-to-region
("first" . "1")
("last" . "25")
("score" . "50")))))
- (setq buffer-file-name nil)))
+ (setq buffer-file-name nil))
+ t)
;;;
;;; Alta Vista
("r" . "")
("d0" . "")
("d1" . "")))))
- (setq buffer-file-name nil)))
+ (setq buffer-file-name nil))
+ )t
(provide 'nnweb)
(insert output)))
(defun pop3-send-command (process command)
- (set-buffer (process-buffer process))
- (goto-char (point-max))
-;; (if (= (aref command 0) ?P)
-;; (insert "PASS <omitted>\r\n")
-;; (insert command "\r\n"))
- (setq pop3-read-point (point))
- (goto-char (point-max))
- (process-send-string process command)
- (process-send-string process "\r\n")
- )
+ (set-buffer (process-buffer process))
+ (goto-char (point-max))
+ ;; (if (= (aref command 0) ?P)
+ ;; (insert "PASS <omitted>\r\n")
+ ;; (insert command "\r\n"))
+ (setq pop3-read-point (point))
+ (goto-char (point-max))
+ (process-send-string process command)
+ (process-send-string process "\r\n")
+ )
(defun pop3-read-response (process &optional return)
"Read the response from the server.
("\\(;-+[>)}»]+\\)\\W" 1 "FaceWinking.xpm")
("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm")
("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm"))
- "Smileys with noses. These get less false matches.")
+ "Smileys with noses. These get less false matches.")
(defvar smiley-regexp-alist smiley-deformed-regexp-alist
"A list of regexps to map smilies to real images.