From: yamaoka Date: Fri, 20 Nov 1998 05:36:32 +0000 (+0000) Subject: Importing Pterodactyl Gnus v0.52. X-Git-Tag: pgnus-0_52~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33bb7337c1d9482e730963cd66ea54d334d3a8c1;p=elisp%2Fgnus.git- Importing Pterodactyl Gnus v0.52. --- diff --git a/README b/README index 9d9d843..f845bbd 100644 --- a/README +++ b/README @@ -29,8 +29,8 @@ the same function and variable names. If you have been running GNUS in your Emacs, you should probably exit that Emacs and start a new one to fire up Gnus. -Gnus does absolutely not work with anything older than Emacs 19.33 or -XEmacs 19.14. So you definitely need a new Emacs. +Gnus does absolutely not work with anything older than Emacs 20.3 or +XEmacs 20.0. So you definitely need a new Emacs. Then you do a `M-x gnus', and everything should... uhm... it should work, but it might not. Set `debug-on-error' to t, and mail me the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c109e0..ecdb869 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,74 @@ +Fri Nov 20 05:30:26 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.52 is released. + +1998-11-20 04:32:23 Lars Magne Ingebrigtsen + + * rfc2047.el (rfc2047-encode-message-header): Encode the default + encoding. + + * gnus-art.el (gnus-mime-display-single): Insert buttons for + undisplayed text types. + + * mm-decode.el (mm-automatic-display-p): Only prefer inlinable + types. + +1998-11-19 Felix Lee + + * nntp.el (nntp-after-change-function-callback): recover from C-g. + +1998-11-19 Felix Lee + + * gnus-async.el (gnus-asynch-obarray): rename to + gnus-async-hashtb, and don't buffer-local it. + + (gnus-async-article-callback): new function. + (gnus-make-async-article-function): use it. + + (gnus-async-current-prefetch-group): new var. + (gnus-async-current-prefetch-article): new var. + (gnus-async-request-fetched-article): are we fetching it already? + + (gnus-async-delete-prefected-entry): s/prefected/prefetched/ + +1998-11-20 02:49:21 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-show-article): Require. + + * message.el: Provide before hooks. + (message-send-news): Do MIME before headers. + + * gnus-art.el (gnus-article-check-buffer): New function. + (gnus-article-read-summary-keys): Use it. + + * mm-decode.el (mm-user-automatic-display): Display all inline + images. + + * gnus-art.el (gnus-mime-display-single): Don't buttonize so + much. + (gnus-unbuttonized-mime-types): New variable. + +1998-11-19 06:29:03 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-inhibit-user-auto-expire): Changed to t. + + * mm-decode.el (mm-quote-arg): Quote semicolons. + + * gnus-art.el (gnus-mime-display-single): Don't display + attachments. + (gnus-mime-externalize-part): New command and keystroke. + + * mm-decode.el (mm-dissect-buffer): Pass on the description info. + (mm-alternative-precedence): Changed order. + +1998-11-07 17:41:47 Simon Josefsson + + * gnus.el (gnus-method-simplify): New function. + (gnus-native-method-p): New function. + (gnus-secondary-method-p): Use gnus-method-equal. + + * gnus-start.el (gnus-group-change-level): Shorten select method. + Thu Nov 19 04:48:42 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.51 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 9936748..6aaaa3e 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -541,7 +541,7 @@ displayed by the first non-nil matching CONTENT face." (defcustom gnus-display-mime-function 'gnus-display-mime "Function to display MIME articles." - :group 'gnus-article-headers + :group 'gnus-article-mime :type 'function) (defvar gnus-decode-header-function 'mail-decode-encoded-word-region @@ -570,7 +570,12 @@ displayed by the first non-nil matching CONTENT face." (defcustom gnus-ignored-mime-types nil "List of MIME types that should be ignored by Gnus." - :group 'gnus-mime + :group 'gnus-article-mime + :type '(repeat regexp)) + +(defcustom gnus-unbuttonized-mime-types '(".*/.*") + "List of MIME types that should not be given buttons when rendered." + :group 'gnus-article-mime :type '(repeat regexp)) (defcustom gnus-treat-body-highlight-signature t @@ -584,7 +589,7 @@ displayed by the first non-nil matching CONTENT face." (defcustom gnus-article-mime-part-function nil "Function called with a MIME handle as the argument." - :group 'gnus-article + :group 'gnus-article-mime :type 'function) ;;; Internal variables @@ -2231,6 +2236,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (gnus-mime-save-part "o" "Save...") (gnus-mime-copy-part "c" "View In Buffer") (gnus-mime-inline-part "i" "View Inline") + (gnus-mime-externalize-part "e" "View Externally") (gnus-mime-pipe-part "|" "Pipe To Command..."))) (defvar gnus-mime-button-map nil) @@ -2246,6 +2252,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-button-menu (event) "Construct a context-sensitive menu of MIME commands." (interactive "e") + (gnus-article-check-buffer) (let ((response (x-popup-menu t `("MIME Part" ("" ,@(mapcar (lambda (c) @@ -2260,6 +2267,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-view-all-parts () "View all the MIME parts." (interactive) + (gnus-article-check-buffer) (let ((handles gnus-article-mime-handles)) (while handles (mm-display-part (pop handles))))) @@ -2267,18 +2275,21 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-save-part () "Save the MIME part under point." (interactive) + (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data))) (mm-save-part data))) (defun gnus-mime-pipe-part () "Pipe the MIME part under point to a process." (interactive) + (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data))) (mm-pipe-part data))) (defun gnus-mime-view-part () "Interactively choose a view method for the MIME part under point." (interactive) + (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data)) (url-standalone-mode (not gnus-plugged))) (mm-interactively-view-part data))) @@ -2286,6 +2297,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-copy-part () "Put the the MIME part under point into a new buffer." (interactive) + (gnus-article-check-buffer) (let* ((handle (get-text-property (point) 'gnus-data)) (contents (mm-get-part handle)) (buffer (generate-new-buffer @@ -2303,6 +2315,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-inline-part () "Insert the MIME part under point into the current buffer." (interactive) + (gnus-article-check-buffer) (let* ((data (get-text-property (point) 'gnus-data)) (contents (mm-get-part data)) (url-standalone-mode (not gnus-plugged)) @@ -2314,6 +2327,17 @@ If ALL-HEADERS is non-nil, no headers are hidden." (mm-insert-inline data contents) (goto-char b)))) +(defun gnus-mime-externalize-part () + "Insert the MIME part under point into the current buffer." + (interactive) + (gnus-article-check-buffer) + (let* ((handle (get-text-property (point) 'gnus-data)) + (url-standalone-mode (not gnus-plugged)) + (mm-user-display-methods nil)) + (if (mm-handle-undisplayer handle) + (mm-remove-part handle) + (mm-display-part handle)))) + (defun gnus-article-view-part (n) "View MIME part N, which is the numerical prefix." (interactive "p") @@ -2442,6 +2466,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-mime-display-single (handle) (let ((type (car (mm-handle-type handle))) (ignored gnus-ignored-mime-types) + (not-attachment t) display text) (catch 'ignored (progn @@ -2449,24 +2474,33 @@ If ALL-HEADERS is non-nil, no headers are hidden." (when (string-match (pop ignored) type) (throw 'ignored nil))) (if (and (mm-automatic-display-p type) - (mm-inlinable-part-p type) - (or (not (mm-handle-disposition handle)) - (equal (car (mm-handle-disposition handle)) - "inline"))) + (mm-inlinable-part-p type) + (setq not-attachment + (or (not (mm-handle-disposition handle)) + (equal (car (mm-handle-disposition handle)) + "inline")))) (setq display t) (when (equal (car (split-string type "/")) "text") (setq text t))) (let ((id (1+ (length gnus-article-mime-handle-alist)))) (push (cons id handle) gnus-article-mime-handle-alist) - (gnus-insert-mime-button handle id (list (or display text)))) + (when (or (not display) + (not (catch 'found + (let ((types gnus-unbuttonized-mime-types)) + (while types + (when (string-match (pop types) type) + (throw 'found t))))))) + (gnus-insert-mime-button + handle id (list (or display + (and (not not-attachment) text)))))) (insert "\n\n") (cond (display (forward-line -2) (mm-display-part handle t) (goto-char (point-max))) - (text + ((and text not-attachment) (forward-line -2) (insert "\n") (mm-insert-inline handle (mm-get-part handle)) @@ -2493,9 +2527,11 @@ If ALL-HEADERS is non-nil, no headers are hidden." (point)) `(gnus-callback (lambda (handles) + (unless ,(not ibegend) + (setq gnus-article-mime-handle-alist + ',gnus-article-mime-handle-alist)) (gnus-mime-display-alternative - ',ihandles ',not-pref - ',begend ,id)) + ',ihandles ',not-pref ',begend ,id)) local-map ,gnus-mime-button-map ,gnus-mouse-face-prop ,gnus-article-mouse-face face ,gnus-article-button-face @@ -2518,9 +2554,10 @@ If ALL-HEADERS is non-nil, no headers are hidden." (point)) `(gnus-callback (lambda (handles) - (gnus-mime-display-alternative - ',ihandles ',handle - ',begend ,id)) + (unless ,(not ibegend) + (setq gnus-article-mime-handle-alist + ',gnus-article-mime-handle-alist)) + (gnus-mime-display-alternative ',ihandles ',handle ',begend ,id)) local-map ,gnus-mime-button-map ,gnus-mouse-face-prop ,gnus-article-mouse-face face ,gnus-article-button-face @@ -2536,7 +2573,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (if (stringp (car preferred)) (gnus-display-mime preferred) (mm-display-part preferred) - (goto-char (point-max))) + (goto-char (point-max))) (setcdr begend (point-marker)))) (when ibegend (goto-char point)))) @@ -2733,9 +2770,15 @@ Argument LINES specifies lines to be scrolled down." (setq func (lookup-key (current-local-map) (this-command-keys))) (call-interactively func))) +(defun gnus-article-check-buffer () + "Beep if not in an article buffer." + (unless (equal major-mode 'gnus-article-mode) + (error "Command invoked outside of a Gnus article buffer"))) + (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) "Read a summary buffer key sequence and execute it from the article buffer." (interactive "P") + (gnus-article-check-buffer) (let ((nosaves '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F" "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" diff --git a/lisp/gnus-async.el b/lisp/gnus-async.el index 870192f..e880fa4 100644 --- a/lisp/gnus-async.el +++ b/lisp/gnus-async.el @@ -77,7 +77,9 @@ It should return non-nil if the article is to be prefetched." (defvar gnus-async-article-alist nil) (defvar gnus-async-article-semaphore '(nil)) (defvar gnus-async-fetch-list nil) -(defvar gnus-asynch-obarray nil) +(defvar gnus-async-hashtb nil) +(defvar gnus-async-current-prefetch-group nil) +(defvar gnus-async-current-prefetch-article nil) (defvar gnus-async-prefetch-headers-buffer " *Async Prefetch Headers*") (defvar gnus-async-header-prefetched nil) @@ -117,14 +119,14 @@ It should return non-nil if the article is to be prefetched." (defun gnus-async-close () (gnus-kill-buffer gnus-async-prefetch-article-buffer) (gnus-kill-buffer gnus-async-prefetch-headers-buffer) - (setq gnus-async-article-alist nil + (setq gnus-async-hashtb nil + gnus-async-article-alist nil gnus-async-header-prefetched nil)) (defun gnus-async-set-buffer () (nnheader-set-temp-buffer gnus-async-prefetch-article-buffer t) - (unless gnus-asynch-obarray - (set (make-local-variable 'gnus-asynch-obarray) - (gnus-make-hashtable 1023)))) + (unless gnus-async-hashtb + (setq gnus-async-hashtb (gnus-make-hashtable 1023)))) (defun gnus-async-halt-prefetch () "Stop prefetching." @@ -204,26 +206,33 @@ It should return non-nil if the article is to be prefetched." (when do-message (gnus-message 9 "Prefetching article %d in group %s" article group)) + (setq gnus-async-current-prefetch-group group) + (setq gnus-async-current-prefetch-article article) (gnus-request-article article group)))))))))) (defun gnus-make-async-article-function (group article mark summary next) "Return a callback function." `(lambda (arg) - (save-excursion - (when arg - (gnus-async-set-buffer) - (gnus-async-with-semaphore - (setq - gnus-async-article-alist - (cons (list ',(intern (format "%s-%d" group article) - gnus-asynch-obarray) - ,mark (set-marker (make-marker) (point-max)) - ,group ,article) - gnus-async-article-alist)))) - (if (not (gnus-buffer-live-p ,summary)) - (gnus-async-with-semaphore - (setq gnus-async-fetch-list nil)) - (gnus-async-prefetch-article ,group ,next ,summary t))))) + (gnus-async-article-callback arg ,group ,article ,mark ,summary ,next))) + +(defun gnus-async-article-callback (arg group article mark summary next) + "Function called when an async article is done being fetched." + (save-excursion + (setq gnus-async-current-prefetch-article nil) + (when arg + (gnus-async-set-buffer) + (gnus-async-with-semaphore + (setq + gnus-async-article-alist + (cons (list (intern (format "%s-%d" group article) + gnus-async-hashtb) + mark (set-marker (make-marker) (point-max)) + group article) + gnus-async-article-alist)))) + (if (not (gnus-buffer-live-p summary)) + (gnus-async-with-semaphore + (setq gnus-async-fetch-list nil)) + (gnus-async-prefetch-article group next summary t)))) (defun gnus-async-unread-p (data) "Return non-nil if DATA represents an unread article." @@ -232,6 +241,18 @@ It should return non-nil if the article is to be prefetched." (defun gnus-async-request-fetched-article (group article buffer) "See whether we have ARTICLE from GROUP and put it in BUFFER." (when (numberp article) + (when (and gnus-async-current-prefetch-group + (string= group gnus-async-current-prefetch-group) + (eq article gnus-async-current-prefetch-article)) + (save-excursion + (gnus-async-set-buffer) + (gnus-message 5 "Waiting for async article...") + (let ((proc (nntp-find-connection (current-buffer))) + (nntp-server-buffer (current-buffer)) + (nntp-have-messaged nil)) + (while (eq article (car gnus-async-fetch-list)) + (nntp-accept-process-output proc))) + (gnus-message 5 "Waiting for async article...done"))) (let ((entry (gnus-async-prefetched-article-entry group article))) (when entry (save-excursion @@ -239,10 +260,10 @@ It should return non-nil if the article is to be prefetched." (copy-to-buffer buffer (cadr entry) (caddr entry)) ;; Remove the read article from the prefetch buffer. (when (memq 'read gnus-prefetched-article-deletion-strategy) - (gnus-async-delete-prefected-entry entry)) + (gnus-async-delete-prefetched-entry entry)) t))))) -(defun gnus-async-delete-prefected-entry (entry) +(defun gnus-async-delete-prefetched-entry (entry) "Delete ENTRY from buffer and alist." (ignore-errors (delete-region (cadr entry) (caddr entry)) @@ -261,7 +282,7 @@ It should return non-nil if the article is to be prefetched." (gnus-async-set-buffer) (while alist (when (equal group (nth 3 (car alist))) - (gnus-async-delete-prefected-entry (car alist))) + (gnus-async-delete-prefetched-entry (car alist))) (pop alist)))))) (defun gnus-async-prefetched-article-entry (group article) @@ -269,7 +290,7 @@ It should return non-nil if the article is to be prefetched." (let ((entry (save-excursion (gnus-async-set-buffer) (assq (intern (format "%s-%d" group article) - gnus-asynch-obarray) + gnus-async-hashtb) gnus-async-article-alist)))) ;; Perhaps something has emptied the buffer? (if (and entry diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index c7f1f8e..3b09944 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1248,14 +1248,14 @@ for new groups, and subscribe the new groups as zombies." (setq active (gnus-active group)) (setq num (if active (- (1+ (cdr active)) (car active)) t)) - ;; Check whether the group is foreign. If so, the - ;; foreign select method has to be entered into the - ;; info. - (let ((method (or gnus-override-subscribe-method - (gnus-group-method group)))) - (if (eq method gnus-select-method) - (setq info (list group level nil)) - (setq info (list group level nil nil method))))) + ;; Shorten the select method if possible, if we need to + ;; store it at all (native groups). + (let ((method (gnus-method-simplify + (or gnus-override-subscribe-method + (gnus-group-method group))))) + (if method + (setq info (list group level nil nil method)) + (setq info (list group level nil))))) (unless previous (setq previous (let ((p gnus-newsrc-alist)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 829bc3f..075cf44 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -483,7 +483,7 @@ It uses the same syntax as the `gnus-split-methods' variable." :group 'gnus-summary :type '(repeat character)) -(defcustom gnus-inhibit-user-auto-expire nil +(defcustom gnus-inhibit-user-auto-expire t "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on." :group 'gnus-summary :type 'boolean) @@ -6932,6 +6932,10 @@ article massaging functions being run." (if (not arg) ;; Select the article the normal way. (gnus-summary-select-article nil 'force) + ;; We have to require this here to make sure that the following + ;; dynamic binding isn't shadowed by autoloading. + (require 'gnus-async) + (require 'gnus-art) ;; Bind the article treatment functions to nil. (let ((gnus-have-all-headers t) gnus-article-display-hook diff --git a/lisp/gnus.el b/lisp/gnus.el index 426f8ec..db1b1ab 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -254,7 +254,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.51" +(defconst gnus-version-number "0.52" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) @@ -2460,16 +2460,30 @@ You should probably use `gnus-find-method-for-group' instead." possible (list backend server)))))) +(defsubst gnus-native-method-p (method) + "Return whether METHOD is the native select method." + (gnus-method-equal method gnus-select-method)) + (defsubst gnus-secondary-method-p (method) "Return whether METHOD is a secondary select method." (let ((methods gnus-secondary-select-methods) (gmethod (gnus-server-get-method nil method))) (while (and methods - (not (equal (gnus-server-get-method nil (car methods)) - gmethod))) + (not (gnus-method-equal + (gnus-server-get-method nil (car methods)) + gmethod))) (setq methods (cdr methods))) methods)) +(defun gnus-method-simplify (method) + "Return the shortest uniquely identifying string or method for METHOD." + (cond ((gnus-native-method-p method) + nil) + ((gnus-secondary-method-p method) + (format "%s:%s" (nth 0 method) (nth 1 method))) + (t + method))) + (defun gnus-groups-from-server (server) "Return a list of all groups that are fetched from SERVER." (let ((alist (cdr gnus-newsrc-alist)) diff --git a/lisp/message.el b/lisp/message.el index 0ca380b..7f9aa57 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2079,6 +2079,7 @@ the user from the mailer." (case-fold-search nil) (news (message-news-p)) (mailbuf (current-buffer))) + (message-encode-message-body) (save-restriction (message-narrow-to-headers) ;; Insert some headers. @@ -2088,7 +2089,6 @@ the user from the mailer." (mail-encode-encoded-word-buffer) ;; Let the user do all of the above. (run-hooks 'message-header-hook)) - (message-encode-message-body) (unwind-protect (save-excursion (set-buffer tembuf) @@ -2253,6 +2253,7 @@ to find out how to use this." message-syntax-checks) message-syntax-checks)) result) + (message-encode-message-body) (save-restriction (message-narrow-to-headers) ;; Insert some headers. @@ -2263,7 +2264,6 @@ to find out how to use this." (message-cleanup-headers) (if (not (message-check-news-syntax)) nil - (message-encode-message-body) (unwind-protect (save-excursion (set-buffer tembuf) @@ -4144,8 +4144,8 @@ regexp varstr." (insert "This is a MIME multipart message. If you are reading\n") (insert "this, you shouldn't.\n")))) -(run-hooks 'message-load-hook) - (provide 'message) +(run-hooks 'message-load-hook) + ;;; message.el ends here diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 6a2b789..a6de665 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -73,11 +73,11 @@ ("message/delivery-status" . inline))) (defvar mm-user-automatic-display - '("text/plain" "text/enriched" "text/richtext" "text/html" "image/gif" - "image/jpeg" "message/delivery-status" "multipart/.*")) + '("text/plain" "text/enriched" "text/richtext" "text/html" + "image/.*" "message/delivery-status" "multipart/.*")) (defvar mm-alternative-precedence - '("text/plain" "text/enriched" "text/richtext" "text/html") + '("text/html" "text/enriched" "text/richtext" "text/plain") "List that describes the precedence of alternative parts.") (defvar mm-tmp-directory "/tmp/" @@ -107,7 +107,8 @@ description (mail-fetch-field "content-description") id (mail-fetch-field "content-id")))) (if (not ctl) - (mm-dissect-singlepart '("text/plain") nil no-strict-mime nil nil) + (mm-dissect-singlepart + '("text/plain") nil no-strict-mime nil description) (setq type (split-string (car ctl) "/")) (setq subtype (cadr type) type (pop type)) @@ -125,7 +126,8 @@ no-strict-mime (and cd (condition-case () (mail-header-parse-content-disposition cd) - (error nil))))))) + (error nil))) + description)))) (when id (push (cons id result) mm-content-id-alist)) result)))) @@ -369,7 +371,8 @@ external if displayed external." (let ((methods mm-user-automatic-display) method result) (while (setq method (pop methods)) - (when (string-match method type) + (when (and (string-match method type) + (mm-inlinable-p type)) (setq result t methods nil))) result)) @@ -394,7 +397,7 @@ This overrides entries in the mailcap file." "Return a version of ARG that is safe to evaluate in a shell." (let ((pos 0) new-pos accum) ;; *** bug: we don't handle newline characters properly - (while (setq new-pos (string-match "[!`\"$\\& \t{} ]" arg pos)) + (while (setq new-pos (string-match "[;!`\"$\\& \t{} ]" arg pos)) (push (substring arg pos new-pos) accum) (push "\\" accum) (push (list (aref arg new-pos)) accum) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index bea8c6f..3433a68 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -43,9 +43,9 @@ (setq image (make-image-specifier (vector (intern type) :data (buffer-string))))) (let ((annot (make-annotation image nil 'text))) + (mm-insert-inline handle ".\n") (set-extent-property annot 'mm t) - (set-extent-property annot 'duplicable t) - (mm-insert-inline handle " \n")))) + (set-extent-property annot 'duplicable t)))) (defun mm-inline-text (handle) (let ((type (cadr (split-string (car (mm-handle-type handle)) "/"))) diff --git a/lisp/nntp.el b/lisp/nntp.el index 3012b25..40319c1 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -905,39 +905,46 @@ password contained in '~/.nntp-authinfo'." (funcall (cadr entry))))))) (defun nntp-after-change-function-callback (beg end len) - (when nntp-process-callback - (save-match-data - (if (and (= beg (point-min)) - (memq (char-after beg) '(?4 ?5))) - ;; Report back error messages. - (save-excursion - (goto-char beg) - (if (looking-at "480") - (nntp-handle-authinfo nntp-process-to-buffer) - (nntp-snarf-error-message) - (funcall nntp-process-callback nil))) - (goto-char end) - (when (and (> (point) nntp-process-start-point) - (re-search-backward nntp-process-wait-for - nntp-process-start-point t)) - (when (gnus-buffer-exists-p nntp-process-to-buffer) - (let ((cur (current-buffer)) - (start nntp-process-start-point)) + (unwind-protect + (when nntp-process-callback + (save-match-data + (if (and (= beg (point-min)) + (memq (char-after beg) '(?4 ?5))) + ;; Report back error messages. (save-excursion - (set-buffer nntp-process-to-buffer) - (goto-char (point-max)) - (let ((b (point))) - (insert-buffer-substring cur start) - (narrow-to-region b (point-max)) - (nntp-decode-text) - (widen))))) - (goto-char end) - (let ((callback nntp-process-callback) - (nntp-inside-change-function t)) - (setq nntp-process-callback nil) - (save-excursion - (funcall callback (buffer-name - (get-buffer nntp-process-to-buffer)))))))))) + (goto-char beg) + (if (looking-at "480") + (nntp-handle-authinfo nntp-process-to-buffer) + (nntp-snarf-error-message) + (funcall nntp-process-callback nil))) + (goto-char end) + (when (and (> (point) nntp-process-start-point) + (re-search-backward nntp-process-wait-for + nntp-process-start-point t)) + (when (gnus-buffer-exists-p nntp-process-to-buffer) + (let ((cur (current-buffer)) + (start nntp-process-start-point)) + (save-excursion + (set-buffer nntp-process-to-buffer) + (goto-char (point-max)) + (let ((b (point))) + (insert-buffer-substring cur start) + (narrow-to-region b (point-max)) + (nntp-decode-text) + (widen))))) + (goto-char end) + (let ((callback nntp-process-callback) + (nntp-inside-change-function t)) + (setq nntp-process-callback nil) + (save-excursion + (funcall callback (buffer-name + (get-buffer nntp-process-to-buffer))))))))) + + ;; any throw from after-change-functions will leave it + ;; set to nil. so we reset it here, if necessary. + (when quit-flag + (setq after-change-functions + (list 'nntp-after-change-function-callback))))) (defun nntp-snarf-error-message () "Save the error message in the current buffer." diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 4c2a8d1..d3eb033 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -129,7 +129,10 @@ Should be called narrowed to the head of the message." (rfc2047-encode-region (point-min) (point-max))) ;; Hm. (t)))) - (goto-char (point-max)))))))) + (goto-char (point-max))))) + (when rfc2047-default-charset + (encode-coding-region (point-min) (point-max) + rfc2047-default-charset))))) (defun rfc2047-encodable-p () "Say whether the current (narrowed) buffer contains characters that need encoding." diff --git a/make.bat b/make.bat index 4a6b8a0..b203277 100755 --- a/make.bat +++ b/make.bat @@ -22,6 +22,10 @@ rem rem which will allow the batch file to accept an unlimited number of rem parameters. +rem Clear PWD so emacs doesn't get confused +set GNUS_PWD_SAVE=%PWD% +set PWD= + if "%1" == "" goto usage cd lisp @@ -54,4 +58,7 @@ echo eg. d:\emacs\19.34 echo copy indicates that the compiled files should be copied to your echo emacs lisp, info, and etc directories +rem Restore PWD so whoever called this batch file doesn't get confused +set PWD=%GNUS_PWD_SAVE% +set GNUS_PWD_SAVE= :end diff --git a/texi/gnus.texi b/texi/gnus.texi index 2b91688..23d1cd4 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.51 Manual +@settitle Pterodactyl Gnus 0.52 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.51 Manual +@title Pterodactyl Gnus 0.52 Manual @author by Lars Magne Ingebrigtsen @page @@ -354,7 +354,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -This manual corresponds to Pterodactyl Gnus 0.51. +This manual corresponds to Pterodactyl Gnus 0.52. @end ifinfo @@ -481,11 +481,15 @@ If @code{gnus-nntp-server} is set, this variable will override @code{gnus-nntp-server} to @code{nil}, which is what it is by default. @vindex gnus-secondary-servers +@vindex gnus-nntp-server You can also make Gnus prompt you interactively for the name of an @sc{nntp} server. If you give a non-numerical prefix to @code{gnus} (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers in the @code{gnus-secondary-servers} list (if any). You can also just -type in the name of any server you feel like visiting. +type in the name of any server you feel like visiting. (Note that this +will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x +gnus} later in the same Emacs session, Gnus will contact the same +server.) @findex gnus-group-browse-foreign-server @kindex B (Group) @@ -6941,6 +6945,12 @@ To have all Vcards be ignored, you'd say something like this: '("text/x-vcard")) @end lisp +@item gnus-unbuttonized-mime-types +@vindex gnus-unbuttonized-mime-types +This is a list of regexps. @sc{mime} types that match a regexp from +this list won't have @sc{mime} buttons inserted unless they aren't +displayed. The default value is @code{(".*/.*")}. + @item gnus-article-mime-part-function @vindex gnus-article-mime-part-function For each @sc{mime} part, this function will be called with the @sc{mime} diff --git a/texi/message.texi b/texi/message.texi index cc8e4e6..51ee7c4 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.51 Manual +@settitle Pterodactyl Message 0.52 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.51 Manual +@title Pterodactyl Message 0.52 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.51. Message is +This manual corresponds to Pterodactyl Message 0.52. Message is distributed with the Gnus distribution bearing the same version number as this manual.