From ae63286fff338ce8c2f060126450b36574039ba5 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 4 Mar 1997 02:51:56 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 19 +++++++- lisp/gnus-cache.el | 5 +- lisp/gnus-ems.el | 17 ++++--- lisp/gnus-msg.el | 1 - lisp/gnus.el | 115 +++++++++++++++++++++++---------------------- lisp/nnfolder.el | 2 +- 6 files changed, 89 insertions(+), 70 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4942260ac..a27f90fb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,21 @@ -Tue Jul 18 11:04:02 1995 Lars Magne Ingebrigtsen +Tue Jul 18 13:38:27 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-thread-header): Define as a macro. + (gnus-all-windows-visible-p): Don't barf on horizontal specs. + (gnus-mouse-face-function, gnus-max-width-function): Separate into + functions to make it easier for XEmacs and Mule to redefine. + + * gnus-cache.el (gnus-cache-save-buffers): Make sure that the + directory exists. + + * gnus-msg.el (gnus-group-mail): Don't do configure. + + * gnus.el (gnus-all-windows-visible-p): Almost always reported + nil. + +Tue Jul 18 11:04:02 1995 Lars Magne Ingebrigtsen + + * gnus.el: 0.97.1 is released. * gnus.el (gnus-parse-format): Use macros instead of defuns. diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 9fe6b9ecd..cab32c35b 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -66,8 +66,8 @@ (defun gnus-cache-save-buffers () -;; save the overview buffer if it exists and has been modified -;; delete empty cache subdirectories + ;; save the overview buffer if it exists and has been modified + ;; delete empty cache subdirectories (if (null gnus-cache-buffer) () (let ((buffer (cdr gnus-cache-buffer)) @@ -79,6 +79,7 @@ (set-buffer buffer) (if (> (buffer-size) 0) ;; non-empty overview, write it out + (gnus-make-directory (file-name-directory overview-file)) (write-region (point-min) (point-max) overview-file nil 'quietly) ;; empty overview file, remove it diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 5501cd6f3..bee81e147 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -156,7 +156,7 @@ (cond ((string-match "XEmacs\\|Lucid" emacs-version) ;; XEmacs definitions. - (fset 'gnus-set-mouse-face 'identity) + (fset 'gnus-mouse-face-function 'identity) (fset 'gnus-summary-make-display-table (lambda () nil)) (fset 'gnus-visual-turn-off-edit-menu 'identity) @@ -448,14 +448,13 @@ call it with the value of the `gnus-data' text property." (if (< from to) (overlay-put (make-overlay from to) 'face face))))) - (fset - 'gnus-format-max-width - (lambda (form length) - (let* ((val (eval form)) - (valstr (if (numberp val) (int-to-string val) val))) - (if (> (length valstr) length) - (truncate-string valstr length) - valstr)))) + (defun gnus-max-width-function (form) + (` (let* ((val (eval (, el))) + (valstr (if (numberp val) + (int-to-string val) val))) + (if (> (length valstr) (, max-width)) + (truncate-string valstr (, max-width)) + valstr)))) (fset 'gnus-summary-make-display-table (lambda () nil)) ) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 72eb089bc..e4e0d2ba4 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -264,7 +264,6 @@ headers.") "Start composing a mail." (interactive) (funcall gnus-mail-other-window-method) - (gnus-configure-windows 'group-mail) (run-hooks 'gnus-mail-hook)) (defun gnus-group-post-news () diff --git a/lisp/gnus.el b/lisp/gnus.el index d67ebd4ca..072bbfa42 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1343,7 +1343,7 @@ variable (string, integer, character, etc).") (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") -(defconst gnus-version "(ding) Gnus v0.97.1" +(defconst gnus-version "(ding) Gnus v0.97.2" "Version number for this version of Gnus.") (defvar gnus-info-nodes @@ -1933,6 +1933,20 @@ Thank you for your help in stamping out bugs. (put-text-property 0 (length string) 'mouse-face gnus-mouse-face string) string) + +(defun gnus-mouse-face-function (form) + (` (let ((string (, form))) + (put-text-property 0 (length string) 'mouse-face gnus-mouse-face string) + string))) + +(defun gnus-max-width-function (el max-width) + (` (let* ((val (eval (, el))) + (valstr (if (numberp val) + (int-to-string val) val))) + (if (> (length valstr) (, max-width)) + (substring valstr 0 (, max-width)) + valstr)))) + (defun gnus-parse-format (format spec-alist) ;; This function parses the FORMAT string with the help of the ;; SPEC-ALIST and returns a list that can be eval'ed to return the @@ -1945,12 +1959,8 @@ Thank you for your help in stamping out bugs. (post (substring format (match-beginning 3) (match-end 3)))) (list 'concat (gnus-parse-simple-format pre spec-alist) - (` (let ((string (, (gnus-parse-simple-format - button spec-alist)))) - (put-text-property 0 (length string) - 'mouse-face gnus-mouse-face string) - string)) -; (gnus-parse-simple-format button spec-alist)) + (gnus-mouse-face-function + (gnus-parse-simple-format button spec-alist)) (gnus-parse-simple-format post spec-alist))) (gnus-parse-simple-format (concat (substring format (match-beginning 1) (match-end 1)) @@ -2003,15 +2013,8 @@ Thank you for your help in stamping out bugs. (setq el (list 'char-to-string el))) ((= (car (cdr elem)) ?d) (numberp el) (setq el (list 'int-to-string el)))) - (setq flist (cons - (` (let* ((val (eval (, el))) - (valstr (if (numberp val) - (int-to-string val) val))) - (if (> (length valstr) (, max-width)) - (substring valstr 0 (, max-width)) - valstr))) - ;(list 'gnus-format-max-width el max-width) - flist)) + (setq flist (cons (gnus-max-width-function el max-width) + flist)) (setq newspec ?s)) (setq flist (cons (car elem) flist)) (setq newspec (car (cdr elem)))) @@ -2553,16 +2556,18 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only." (setq hor (car rule) rule (cdr rule)) (while (and hor (not invisible)) - (if (setq val (if (vectorp (car hor)) (car hor) (eval (car hor)))) + (if (setq val (if (vectorp (car hor)) + (car hor) + (if (not (eq (car (car hor)) 'horizontal)) + (eval (car hor))))) (progn ;; Expand short buffer name. (setq buffer (or (cdr (assq (aref val 0) gnus-window-to-buffer)) (aref val 0))) (setq buffer (if (symbolp buffer) (symbol-value buffer) buffer)) - (setq jump-buffer (and (> (length val) 2) - (eq 'point (aref val 2)) - buffer)) + (and (> (length val) 2) (eq 'point (aref val 2)) + (setq jump-buffer buffer)) (setq invisible (not (and buffer (get-buffer-window buffer)))))) (setq hor (cdr hor)))) (and (not invisible) jump-buffer))) @@ -5562,8 +5567,9 @@ The following commands are available: (substring from (1+ (match-beginning 0)) (1- (match-end 0)))) ((string-match "<[^>]+> *$" from) (let ((beg (match-beginning 0))) - (or (and (string-match "^\"[^\"]\"" from) - (substring from (1+ (match-beginning 0)) (1- (match-end 0)))) + (or (and (string-match "^\"[^\"]*\"" from) + (substring from (1+ (match-beginning 0)) + (1- (match-end 0)))) (substring from 0 beg)))) (t from))) (subject (header-subject header)) @@ -6072,57 +6078,54 @@ If NO-ARTICLE is non-nil, no article is selected initially." fun (cdr fun)))) threads) -(defsubst gnus-thread-header (thread) +(defmacro gnus-thread-header (thread) ;; Return header of first article in THREAD. - (if (consp thread) - (if (stringp (car thread)) - (car (car (cdr thread))) - (car thread)) - thread)) + (` (if (consp (, thread)) + (if (stringp (car (, thread))) + (car (car (cdr (, thread)))) + (car (, thread))) + (, thread)))) (defun gnus-thread-sort-by-number (h1 h2) "Sort threads by root article number." - (let ((h1 (gnus-thread-header h1)) - (h2 (gnus-thread-header h2))) - (< (header-number h1) (header-number h2)))) + (< (header-number (gnus-thread-header h1)) + (header-number (gnus-thread-header h2)))) (defun gnus-thread-sort-by-author (h1 h2) "Sort threads by root author." - (let ((h1 (gnus-thread-header h1)) - (h2 (gnus-thread-header h2))) - (string-lessp - (let ((extract (funcall - gnus-extract-address-components (header-from h1)))) - (or (car extract) (cdr extract))) - (let ((extract (funcall - gnus-extract-address-components (header-from h2)))) - (or (car extract) (cdr extract)))))) + (string-lessp + (let ((extract (funcall + gnus-extract-address-components + (header-from (gnus-thread-header h1))))) + (or (car extract) (cdr extract))) + (let ((extract (funcall + gnus-extract-address-components + (header-from (gnus-thread-header h2))))) + (or (car extract) (cdr extract))))) (defun gnus-thread-sort-by-subject (h1 h2) "Sort threads by root subject." - (let ((h1 (gnus-thread-header h1)) - (h2 (gnus-thread-header h2))) - (string-lessp - (downcase (gnus-simplify-subject (header-subject h1))) - (downcase (gnus-simplify-subject (header-subject h2)))))) + (string-lessp + (downcase (gnus-simplify-subject + (header-subject (gnus-thread-header h1)))) + (downcase (gnus-simplify-subject + (header-subject (gnus-thread-header h2)))))) (defun gnus-thread-sort-by-date (h1 h2) "Sort threads by root article date." - (let ((h1 (gnus-thread-header h1)) - (h2 (gnus-thread-header h2))) - (string-lessp - (gnus-sortable-date (header-date h1)) - (gnus-sortable-date (header-date h2))))) + (string-lessp + (gnus-sortable-date (header-date (gnus-thread-header h1))) + (gnus-sortable-date (header-date (gnus-thread-header h2))))) (defun gnus-thread-sort-by-score (h1 h2) "Sort threads by root article score. Unscored articles will be counted as having a score of zero." - (let ((h1 (gnus-thread-header h1)) - (h2 (gnus-thread-header h2))) - (let ((s1 (assq (header-number h1) gnus-newsgroup-scored)) - (s2 (assq (header-number h2) gnus-newsgroup-scored))) - (> (or (cdr s1) gnus-summary-default-score 0) - (or (cdr s2) gnus-summary-default-score 0))))) + (let ((s1 (assq (header-number (gnus-thread-header h1)) + gnus-newsgroup-scored)) + (s2 (assq (header-number (gnus-thread-header h2)) + gnus-newsgroup-scored))) + (> (or (cdr s1) gnus-summary-default-score 0) + (or (cdr s2) gnus-summary-default-score 0)))) (defun gnus-thread-sort-by-total-score (h1 h2) "Sort threads by the sum of all scores in the thread. diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 51c3e3b16..2aee4d3ff 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -325,7 +325,7 @@ such things as moving mail. All buffers always get killed upon server close.") (save-excursion (set-buffer nnfolder-current-buffer) - (while articles + (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnfolder-article-string (car articles)) nil t) (if (or force -- 2.34.1