+2004-02-14 Jesper Harder <harder@ifa.au.dk>
+
+ * nnrss.el (nnrss-request-article, nnrss-find-el): Cleanup.
+
+ * html2text.el (html2text-get-attr, html2text-fix-paragraph): do
+
+ * gnus-sum.el (gnus-summary-limit-to-age)
+ (gnus-summary-limit-children): do.
+
+ * gnus-int.el (gnus-request-scan): do.
+
+ * gnus-group.el (gnus-group-suspend): do.
+
+ * gnus-cus.el (gnus-agent-cat-prepare-category-field): do.
+
+ * gnus-cite.el (gnus-cite-parse-attributions): do.
+
+ * gnus-agent.el (gnus-summary-set-agent-mark)
+ (gnus-agent-regenerate-group): do.
+
+ * deuglify.el (gnus-article-outlook-unwrap-lines): do.
+
+ * binhex.el (binhex-decode-region-internal): do.
+
2004-02-12 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-fun.el (gnus-face-properties-alist): New user option.
(setq file-name-length (char-after (point-min))
data-fork-start (+ (point-min)
file-name-length 22))))
- (if (and (null header)
- (with-current-buffer work-buffer
- (>= (buffer-size) data-fork-start)))
- (progn
- (binhex-verify-crc work-buffer
- (point-min) data-fork-start)
- (setq header (binhex-header work-buffer))
- (if header-only (setq tmp nil counter 0))))
+ (when (and (null header)
+ (with-current-buffer work-buffer
+ (>= (buffer-size) data-fork-start)))
+ (binhex-verify-crc work-buffer
+ (point-min) data-fork-start)
+ (setq header (binhex-header work-buffer))
+ (when header-only (setq tmp nil counter 0)))
(setq tmp (and tmp (not (eq inputpos end)))))
(cond
((= counter 3)
nil t)
(let ((len12 (- (match-end 2) (match-beginning 1)))
(len3 (- (match-end 3) (match-beginning 3))))
- (if (and (> len12 gnus-outlook-deuglify-unwrap-min)
- (< (+ len12 len3) gnus-outlook-deuglify-unwrap-max))
- (progn
- (replace-match "\\1\\2 \\3")
- (goto-char (match-beginning 0))))))))
+ (when (and (> len12 gnus-outlook-deuglify-unwrap-min)
+ (< (+ len12 len3) gnus-outlook-deuglify-unwrap-max))
+ (replace-match "\\1\\2 \\3")
+ (goto-char (match-beginning 0)))))))
(unless nodisplay (gnus-outlook-display-article-buffer)))
(defun gnus-outlook-rearrange-article (attr-start)
(setq gnus-newsgroup-downloadable
(delq article gnus-newsgroup-downloadable))
(gnus-article-mark article))
- (progn
- (setq gnus-newsgroup-downloadable
- (gnus-add-to-sorted-list gnus-newsgroup-downloadable article))
- gnus-downloadable-mark)
- )
+ (setq gnus-newsgroup-downloadable
+ (gnus-add-to-sorted-list gnus-newsgroup-downloadable article))
+ gnus-downloadable-mark)
'unread))))
(defun gnus-agent-get-undownloaded-list ()
entries contained line that did not begin with an article number. Deleted\
line.")
(gnus-delete-line))))
- (if load
- (progn
- (gnus-message 5 "gnus-agent-regenerate-group: Sorting NOV\
+ (when load
+ (gnus-message 5 "gnus-agent-regenerate-group: Sorting NOV\
entries into ascending order.")
- (sort-numeric-fields 1 (point-min) (point-max))
- (setq nov-arts nil)))))
+ (sort-numeric-fields 1 (point-min) (point-max))
+ (setq nov-arts nil))))
(gnus-agent-check-overview-buffer)
;; Construct a new article alist whose nodes match every header
(let ((al (buffer-substring (save-excursion (beginning-of-line 0)
(1+ (point)))
end)))
- (if (not (assoc al al-alist))
- (progn
- (push (list wrote in prefix tag)
- gnus-cite-loose-attribution-alist)
- (push (cons al t) al-alist))))))))
+ (when (not (assoc al al-alist))
+ (push (list wrote in prefix tag)
+ gnus-cite-loose-attribution-alist)
+ (push (cons al t) al-alist)))))))
(defun gnus-cite-connect-attributions ()
;; Connect attributions to citations
(if deflt
(let ((tag (cdr (memq :tag type))))
- (if (string-match "\n" deflt)
- (progn (while (progn (setq deflt (replace-match "\n " t t
- deflt))
- (string-match "\n" deflt (match-end 0))))
- (setq deflt (concat "\n" deflt))))
+ (when (string-match "\n" deflt)
+ (while (progn (setq deflt (replace-match "\n " t t
+ deflt))
+ (string-match "\n" deflt (match-end 0))))
+ (setq deflt (concat "\n" deflt)))
(setcar tag (concat (car tag) deflt))))
(let ((group-buf (get-buffer gnus-group-buffer)))
(mapcar (lambda (buf)
(unless (or (member buf (list group-buf gnus-dribble-buffer))
- (progn
- (save-excursion
- (set-buffer buf)
- (eq major-mode 'message-mode))))
+ (with-current-buffer buf
+ (eq major-mode 'message-mode)))
(gnus-kill-buffer buf)))
(gnus-buffers))
(setq gnus-backlog-articles nil)
(if group (gnus-find-method-for-group group) gnus-command-method))
(gnus-inhibit-demon t)
(mail-source-plugged gnus-plugged))
- (if (or gnus-plugged (not (gnus-agent-method-p gnus-command-method)))
- (progn
- (setq gnus-internal-registry-spool-current-method gnus-command-method)
- (funcall (gnus-get-function gnus-command-method 'request-scan)
- (and group (gnus-group-real-name group))
- (nth 1 gnus-command-method))))))
+ (when (or gnus-plugged (not (gnus-agent-method-p gnus-command-method)))
+ (setq gnus-internal-registry-spool-current-method gnus-command-method)
+ (funcall (gnus-get-function gnus-command-method 'request-scan)
+ (and group (gnus-group-real-name group))
+ (nth 1 gnus-command-method)))))
(defsubst gnus-request-update-info (info gnus-command-method)
"Request that GNUS-COMMAND-METHOD update INFO."
(if (numberp days)
(progn
(setq days-got t)
- (if (< days 0)
- (progn
- (setq younger (not younger))
- (setq days (* days -1)))))
+ (when (< days 0)
+ (setq younger (not younger))
+ (setq days (* days -1))))
(message "Please enter a number.")
(sleep-for 1)))
(list days younger)))
(and gnus-newsgroup-display
(not (funcall gnus-newsgroup-display)))
;; Check NoCeM things.
- (if (and gnus-use-nocem
- (gnus-nocem-unwanted-article-p
- (mail-header-id (car thread))))
- (progn
- (setq gnus-newsgroup-unreads
- (delq number gnus-newsgroup-unreads))
- t))))
+ (when (and gnus-use-nocem
+ (gnus-nocem-unwanted-article-p
+ (mail-header-id (car thread))))
+ (setq gnus-newsgroup-unreads
+ (delq number gnus-newsgroup-unreads))
+ t)))
;; Nope, invisible article.
0
;; Ok, this article is to be visible, so we add it to the limit
(setq next (nth 2 tmp-list))
(setq index 1)
- (if (not (string-match "=" prev))
- (progn
- (if (not (string= (substring this 0 1) "="))
- (setq attr-list (cons (list prev nil) attr-list))
- )
- )
- )
+ (unless (string-match "=" prev)
+ (unless (string= (substring this 0 1) "=")
+ (setq attr-list (cons (list prev nil) attr-list))))
(while (< index (1- (length tmp-list)))
(if (not (string-match "=" this))
(if (not (or (string= (substring next 0 1) "=")
(string= (substring prev -1) "=")))
- (setq attr-list (cons (list this nil) attr-list))
- )
- )
+ (setq attr-list (cons (list this nil) attr-list))))
(setq index (1+ index))
(setq prev this)
(setq this next)
- (setq next (nth (1+ index) tmp-list))
- )
+ (setq next (nth (1+ index) tmp-list)))
- (if this
- (progn
- (if (not (string-match "=" this))
- (progn
- (if (not (string= (substring prev -1) "="))
- (setq attr-list (cons (list this nil) attr-list))
- )
- )
- )
- )
- )
- attr-list ;; return - value
- )
- )
+ (when this
+ (unless (string-match "=" this)
+ (unless (string= (substring prev -1) "=")
+ (setq attr-list (cons (list this nil) attr-list)))))
+ attr-list)) ;; return - value
+
;;
;; </Functions related to attributes>
(let ((has-br-line)
(refill-start)
(refill-stop))
- (if (re-search-forward "<br>$" p2 t)
- (setq has-br-line t)
- )
- (if has-br-line
- (progn
- (goto-char p1)
- (if (re-search-forward ".+[^<][^b][^r][^>]$" p2 t)
- (progn
- (beginning-of-line)
- (setq refill-start (point))
- (goto-char p2)
- (re-search-backward ".+[^<][^b][^r][^>]$" refill-start t)
- (next-line 1)
- (end-of-line)
- ;; refill-stop should ideally be adjusted to
- ;; accomodate the "<br>" strings which are removed
- ;; between refill-start and refill-stop. Can simply
- ;; be returned from my-replace-string
- (setq refill-stop (+ (point)
- (html2text-replace-string
- "<br>" ""
- refill-start (point))))
- ;; (message "Point = %s refill-stop = %s" (point) refill-stop)
- ;; (sleep-for 4)
- (fill-region refill-start refill-stop)
- )
- )
- )
- )
- )
- (html2text-replace-string "<br>" "" p1 p2)
- )
+ (when (re-search-forward "<br>$" p2 t)
+ (setq has-br-line t))
+ (when has-br-line
+ (goto-char p1)
+ (when (re-search-forward ".+[^<][^b][^r][^>]$" p2 t)
+ (beginning-of-line)
+ (setq refill-start (point))
+ (goto-char p2)
+ (re-search-backward ".+[^<][^b][^r][^>]$" refill-start t)
+ (next-line 1)
+ (end-of-line)
+ ;; refill-stop should ideally be adjusted to
+ ;; accomodate the "<br>" strings which are removed
+ ;; between refill-start and refill-stop. Can simply
+ ;; be returned from my-replace-string
+ (setq refill-stop (+ (point)
+ (html2text-replace-string
+ "<br>" ""
+ refill-start (point))))
+ ;; (message "Point = %s refill-stop = %s" (point) refill-stop)
+ ;; (sleep-for 4)
+ (fill-region refill-start refill-stop))))
+ (html2text-replace-string "<br>" "" p1 p2))
;;
;; This one is interactive ...
(nth 2 e))))
(insert "\n\n--" boundary "\nContent-Type: text/plain\n\n")
(let ((point (point)))
- (if text
- (progn (insert text)
- (goto-char point)
- (while (re-search-forward "\n" nil t)
- (replace-match " "))
- (goto-char (point-max))
- (insert "\n\n")))
- (if link
- (insert link)))
+ (when text
+ (insert text)
+ (goto-char point)
+ (while (re-search-forward "\n" nil t)
+ (replace-match " "))
+ (goto-char (point-max))
+ (insert "\n\n"))
+ (when link
+ (insert link)))
(insert "\n\n--" boundary "\nContent-Type: text/html\n\n")
(let ((point (point)))
- (if text
- (progn (insert "<html><head></head><body>\n" text "\n</body></html>")
- (goto-char point)
- (while (re-search-forward "\n" nil t)
- (replace-match " "))
- (goto-char (point-max))
- (insert "\n\n")))
- (if link
- (insert "<p><a href=\"" link "\">link</a></p>\n"))))
- (if nnrss-content-function
- (funcall nnrss-content-function e group article)))))
+ (when text
+ (insert "<html><head></head><body>\n" text "\n</body></html>")
+ (goto-char point)
+ (while (re-search-forward "\n" nil t)
+ (replace-match " "))
+ (goto-char (point-max))
+ (insert "\n\n"))
+ (when link
+ (insert "<p><a href=\"" link "\">link</a></p>\n"))))
+ (when nnrss-content-function
+ (funcall nnrss-content-function e group article)))))
(cond
(err
(nnheader-report 'nnrss err))
large documents!"
(if (listp data)
(mapcar (lambda (bit)
- (if (car-safe bit)
- (progn (if (equal tag (car bit))
- (setq found-list
- (append found-list
- (list bit))))
- (if (and (listp (car-safe (caddr bit)))
- (not (stringp (caddr bit))))
- (setq found-list
- (append found-list
- (nnrss-find-el
- tag (caddr bit))))
- (setq found-list
- (append found-list
- (nnrss-find-el
- tag (cddr bit))))))))
- data))
+ (when (car-safe bit)
+ (when (equal tag (car bit))
+ (setq found-list
+ (append found-list
+ (list bit))))
+ (if (and (listp (car-safe (caddr bit)))
+ (not (stringp (caddr bit))))
+ (setq found-list
+ (append found-list
+ (nnrss-find-el
+ tag (caddr bit))))
+ (setq found-list
+ (append found-list
+ (nnrss-find-el
+ tag (cddr bit)))))))
+ data))
found-list)
(defun nnrss-rsslink-p (el)