*** pub/dgnus/lisp/gnus-cache.el Tue Jul 18 12:38:21 1995 --- dgnus/lisp/gnus-cache.el Tue Jul 18 13:59:38 1995 *************** *** 66,73 **** (defun gnus-cache-save-buffers () ! ;; 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)) --- 66,73 ---- (defun gnus-cache-save-buffers () ! ;; 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,84 **** --- 79,85 ---- (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 *** pub/dgnus/lisp/gnus-ems.el Tue Jul 18 12:38:21 1995 --- dgnus/lisp/gnus-ems.el Tue Jul 18 14:15:16 1995 *************** *** 156,162 **** (cond ((string-match "XEmacs\\|Lucid" emacs-version) ;; XEmacs definitions. ! (fset 'gnus-set-mouse-face 'identity) (fset 'gnus-summary-make-display-table (lambda () nil)) (fset 'gnus-visual-turn-off-edit-menu 'identity) --- 156,162 ---- (cond ((string-match "XEmacs\\|Lucid" emacs-version) ;; XEmacs definitions. ! (fset 'gnus-mouse-face-function 'identity) (fset 'gnus-summary-make-display-table (lambda () nil)) (fset 'gnus-visual-turn-off-edit-menu 'identity) *************** *** 448,461 **** (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)))) (fset 'gnus-summary-make-display-table (lambda () nil)) ) --- 448,460 ---- (if (< from to) (overlay-put (make-overlay from to) 'face face))))) ! (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)) ) *** pub/dgnus/lisp/gnus-msg.el Tue Jul 18 12:38:21 1995 --- dgnus/lisp/gnus-msg.el Tue Jul 18 13:59:39 1995 *************** *** 264,270 **** "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 () --- 264,269 ---- *** pub/dgnus/lisp/gnus.el Tue Jul 18 12:38:21 1995 --- dgnus/lisp/gnus.el Tue Jul 18 14:35:31 1995 *************** *** 1343,1349 **** (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" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1343,1349 ---- (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.2" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 1933,1938 **** --- 1933,1952 ---- (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,1956 **** (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-parse-simple-format post spec-alist))) (gnus-parse-simple-format (concat (substring format (match-beginning 1) (match-end 1)) --- 1959,1966 ---- (post (substring format (match-beginning 3) (match-end 3)))) (list 'concat (gnus-parse-simple-format pre 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,2017 **** (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 newspec ?s)) (setq flist (cons (car elem) flist)) (setq newspec (car (cdr elem)))) --- 2013,2020 ---- (setq el (list 'char-to-string el))) ((= (car (cdr elem)) ?d) (numberp el) (setq el (list 'int-to-string el)))) ! (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,2568 **** (setq hor (car rule) rule (cdr rule)) (while (and hor (not invisible)) ! (if (setq val (if (vectorp (car hor)) (car hor) (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)) (setq invisible (not (and buffer (get-buffer-window buffer)))))) (setq hor (cdr hor)))) (and (not invisible) jump-buffer))) --- 2556,2573 ---- (setq hor (car rule) rule (cdr rule)) (while (and hor (not invisible)) ! (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)) ! (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,5569 **** (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)))) (substring from 0 beg)))) (t from))) (subject (header-subject header)) --- 5567,5575 ---- (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)))) (substring from 0 beg)))) (t from))) (subject (header-subject header)) *************** *** 6072,6128 **** fun (cdr fun)))) threads) ! (defsubst 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)) (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)))) (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)))))) (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)))))) (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))))) (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))))) (defun gnus-thread-sort-by-total-score (h1 h2) "Sort threads by the sum of all scores in the thread. --- 6078,6131 ---- fun (cdr fun)))) threads) ! (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)))) (defun gnus-thread-sort-by-number (h1 h2) "Sort threads by root article number." ! (< (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." ! (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." ! (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." ! (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 ((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. *** pub/dgnus/lisp/nnfolder.el Tue Jul 18 12:38:21 1995 --- dgnus/lisp/nnfolder.el Tue Jul 18 13:59:47 1995 *************** *** 325,331 **** (save-excursion (set-buffer nnfolder-current-buffer) ! (while articles (goto-char (point-min)) (if (search-forward (nnfolder-article-string (car articles)) nil t) (if (or force --- 325,331 ---- (save-excursion (set-buffer nnfolder-current-buffer) ! (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnfolder-article-string (car articles)) nil t) (if (or force *** pub/dgnus/lisp/ChangeLog Tue Jul 18 12:38:24 1995 --- dgnus/lisp/ChangeLog Tue Jul 18 14:15:11 1995 *************** *** 1,4 **** ! Tue Jul 18 11:04:02 1995 Lars Magne Ingebrigtsen * gnus.el (gnus-parse-format): Use macros instead of defuns. --- 1,21 ---- ! 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.