From: yamaoka Date: Wed, 16 Jan 2002 03:39:31 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_5-02-quimby~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a52ed1838e6d72399c3cf85fbb48862129e4dd30;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1347f46..d1d6510 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2002-01-16 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-initial-limit): Inline + gnus-summary-limit-children. + (gnus-summary-initial-limit): Don't limit if + gnus-newsgroup-display is nil. + (gnus-summary-initial-limit): No, don't. + + * gnus-util.el + (gnus-put-text-property-excluding-characters-with-faces): Inline + gnus-put-text-property. + + * gnus-spec.el (gnus-default-format-specs): New variable. + + * gnus-start.el (gnus-read-newsrc-file): Don't clear + gnus-format-specs. + (gnus-read-newsrc-el-file): Default to gnus-default-format-specs. + + * gnus-spec.el (gnus-update-format-specifications): Really check + the Gnus version of the .newsrc.eld file. + (gnus-format-specs): Save the new default summary format. + + * gnus-util.el (gnus-parent-id): Check whether references is empty + before splitting. + + * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Inline some + functions. + (gnus-gather-threads-by-references): Inline + `gnus-split-references'. + + * gnus-spec.el (gnus-summary-line-format-spec): New, optimized + default value of gnus-summary-line-format-spec. + 2002-01-15 ShengHuo ZHU * nnslashdot.el (nnslashdot-retrieve-headers-1): A better error diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 5b32a8c..600ebf8 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -190,6 +190,42 @@ colors of the displayed X-Faces." pbm 'pbm t :ascent 'center :face 'gnus-x-face)))) (gnus-add-wash-type 'xface)))))) +(defun gnus-grab-cam-x-face () + "Grab a picture off the camera and make it into an X-Face." + (interactive) + (shell-command "xawtv-remote snap ppm") + (let ((file nil)) + (while (null (setq file (directory-files "/tftpboot/sparky/tmp" + t "snap.*ppm"))) + (sleep-for 1)) + (setq file (car file)) + (with-temp-buffer + (shell-command + (format "pnmcut -left 110 -top 60 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm | pbmtoxbm | compface" + file) + (current-buffer)) + ;;(sleep-for 3) + (delete-file file) + (buffer-string)))) + +(defun gnus-grab-gray-x-face () + "Grab a picture off the camera and make it into an X-Face." + (interactive) + (shell-command "xawtv-remote snap ppm") + (let ((file nil)) + (while (null (setq file (directory-files "/tftpboot/sparky/tmp" + t "snap.*ppm"))) + (sleep-for 1)) + (setq file (car file)) + (with-temp-buffer + (shell-command + (format "pnmcut -left 70 -top 100 -width 144 -height 144 '%s' | ppmquant 256 2>/dev/null | ppmtogif > '%s.gif'" + file file) + (current-buffer)) + (delete-file file)) + (gnus-convert-image-to-gray-x-face (concat file ".gif") 3) + (delete-file (concat file ".gif")))) + (provide 'gnus-fun) ;;; gnus-fun.el ends here diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 0e71016..646cf12 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -76,6 +76,8 @@ (defvar gnus-tmp-article-number) (defvar gnus-mouse-face) (defvar gnus-mouse-face-prop) +(defvar gnus-tmp-header) +(defvar gnus-tmp-from) (defun gnus-summary-line-format-spec () (insert gnus-tmp-unread gnus-tmp-replied @@ -84,13 +86,15 @@ (point) (progn (insert - gnus-tmp-opening-bracket - (format "%4d: %-20s" - gnus-tmp-lines - (if (> (length gnus-tmp-name) 20) - (substring gnus-tmp-name 0 20) - gnus-tmp-name)) - gnus-tmp-closing-bracket) + (format "%c%4s: %-23s%c" gnus-tmp-opening-bracket gnus-tmp-lines + (let ((val + (inline + (gnus-summary-from-or-to-or-newsgroups + gnus-tmp-header gnus-tmp-from)))) + (if (> (length val) 23) + (substring val 0 23) + val)) + gnus-tmp-closing-bracket)) (point)) gnus-mouse-face-prop gnus-mouse-face) (insert " " gnus-tmp-subject-or-nil "\n")) @@ -129,10 +133,12 @@ `((group ("%M\%S\%p\%P\%5y: %(%g%)%l\n" ,gnus-group-line-format-spec)) (summary-dummy ("* %(: :%) %S\n" ,gnus-summary-dummy-line-format-spec)) - (summary ("%U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n" + (summary ("%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n" ,gnus-summary-line-format-spec))) "Alist of format specs.") +(defvar gnus-default-format-specs gnus-format-specs) + (defvar gnus-format-specs-compiled nil "Alist of compiled format specs. Each element should be the form: \(TYPE (FORMAT-STRING-1 . COMPILED-FUNCTION-1) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 772492e..705b9ce 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2095,6 +2095,14 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-yes-or-no-p (format "Error in %s; continue? " ding-file)) (error "Error in %s" ding-file)))))) +;; ;; Older versions of `gnus-format-specs' are no longer valid +;; ;; in Oort Gnus 0.01. +;; (let ((version +;; (and gnus-newsrc-file-version +;; (gnus-continuum-version gnus-newsrc-file-version)))) +;; (when (or (not version) +;; (< version 5.090009)) +;; (setq gnus-format-specs gnus-default-format-specs))) (when gnus-newsrc-assoc (setq gnus-newsrc-alist gnus-newsrc-assoc)))) (gnus-make-hashtable-from-newsrc-alist) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index cb97f8a..eca4251 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2990,11 +2990,12 @@ buffer that was in action when the last article was fetched." (cond ((setq to (cdr (assq 'To extra-headers))) (concat "-> " - (gnus-summary-extract-address-component - (funcall gnus-decode-encoded-word-function to)))) + (inline + (gnus-summary-extract-address-component + (funcall gnus-decode-encoded-word-function to))))) ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) (concat "=> " newsgroups))))) - (gnus-summary-extract-address-component gnus-tmp-from)))) + (inline (gnus-summary-extract-address-component gnus-tmp-from))))) (defun gnus-summary-insert-line (gnus-tmp-header gnus-tmp-level gnus-tmp-current @@ -3451,7 +3452,7 @@ If SHOW-ALL is non-nil, already read articles are also listed." (while threads (when (setq references (mail-header-references (caar threads))) (setq id (mail-header-id (caar threads)) - ids (gnus-split-references references) + ids (inline (gnus-split-references references)) entered nil) (while (setq ref (pop ids)) (setq ids (delete ref ids)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 9349426..6cbbfc1 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -503,7 +503,8 @@ jabbering all the time." (defsubst gnus-parent-id (references &optional n) "Return the last Message-ID in REFERENCES. If N, return the Nth ancestor instead." - (when references + (when (and references + (not (zerop (length references)))) (let ((ids (inline (gnus-split-references references)))) (while (nthcdr (or n 1) ids) (setq ids (cdr ids))) @@ -717,9 +718,10 @@ Bind `print-quoted' and `print-readably' to t while printing." (when (get-text-property b 'gnus-face) (setq b (next-single-property-change b 'gnus-face nil end))) (when (/= b end) - (gnus-put-text-property - b (setq b (next-single-property-change b 'gnus-face nil end)) - prop val))))) + (inline + (gnus-put-text-property + b (setq b (next-single-property-change b 'gnus-face nil end)) + prop val)))))) ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 ;;; The primary idea here is to try to protect internal datastructures