*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 5 Dec 1998 18:36:13 +0000 (18:36 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 5 Dec 1998 18:36:13 +0000 (18:36 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-msg.el
lisp/gnus-picon.el
lisp/gnus.el
lisp/mailcap.el
lisp/message.el
lisp/mm-util.el
lisp/mm-view.el
texi/gnus.texi
texi/message.texi

index a679896..81df6b5 100644 (file)
@@ -1,3 +1,62 @@
+Sat Dec  5 18:35:42 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: Pterodactyl Gnus v0.64 is released.
+
+1998-12-05 18:51:13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * mm-view.el (mm-setup-w3): Don't load.
+
+       * gnus-msg.el (gnus-setup-message): Set group name.
+       (gnus-group-mail): Avoid leaking local vars.
+
+       * message.el (message-attach-file): Renamed.
+       (message-mime-attach-file): Renamed again.
+
+1998-12-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * gnus-art.el (article-decode-encoded-words): Bind
+       rfc2047-default-charset here.
+
+       * gnus-art.el (gnus-insert-mime-button): Nix slashes in file name.
+
+1998-12-05 18:33:27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-picon.el (gnus-picons-setup-buffer): Run picons hook.
+       (gnus-picons-setup-hook): New hook.     
+
+1998-12-05  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * mailcap.el (mailcap-mime-data): Remove "*" from documentation
+       string. 
+       (mailcap-mime-extensions): Ditto.  Made first sentense fit a
+       line. 
+
+1998-12-05 17:11:04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-art.el (gnus-article-prepare-display): Setup w3.
+       (gnus-mime-view-part): Ditto.
+       (gnus-mime-inline-part): Dotii.
+       (gnus-mime-externalize-part): Daddo.
+       (gnus-mime-internalize-part): Tutti frutti.
+       (gnus-widget-press-button): Da da do.
+
+       * mm-view.el (mm-setup-w3): Require url-vars.
+
+Fri Dec  4 12:13:12 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * message.el (message-draft-coding-system): Fix for XEmacs-NT.
+       * mm-util.el (mm-find-charset-region): Ditto.
+
+1998-12-05 16:30:01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * message.el (message-send): Don't encode here.
+       (message-send-mail): But here.
+       (message-send-news): And here.
+
+1998-12-04 15:29:02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-msg.el (gnus-message-insert-stylings): Don't insert twice. 
+
 Fri Dec  4 04:09:15 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Pterodactyl Gnus v0.63 is released.
index d0a1fc8..4e60965 100644 (file)
@@ -921,7 +921,9 @@ always hide."
          (forward-line 1))))))
 
 (defun article-treat-dumbquotes ()
-  "Translate M******** sm*rtq**t*s into proper text."
+  "Translate M******** sm*rtq**t*s into proper text.
+Note that this function guesses whether a character is a sm*rtq**t* or
+not, so it should only be used interactively."
   (interactive)
   (article-translate-strings gnus-article-dumbquotes-map))
 
@@ -1123,7 +1125,9 @@ If PROMPT (the prefix), prompt for a coding system to use."
 
 (defun article-decode-encoded-words ()
   "Remove encoded-word encoding from headers."
-  (let ((inhibit-point-motion-hooks t) buffer-read-only)
+  (let ((inhibit-point-motion-hooks t)
+       (rfc2047-default-charset gnus-newsgroup-default-charset)
+       buffer-read-only)
     (save-restriction
       (message-narrow-to-head)
       (funcall gnus-decode-header-function (point-min) (point-max)))))
@@ -2283,6 +2287,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
     (gnus-run-hooks 'gnus-tmp-internal-hook)
     (gnus-run-hooks 'gnus-article-prepare-hook)
     (when gnus-display-mime-function
+      (mm-setup-w3)
       (let ((url-standalone-mode (not gnus-plugged)))
        (funcall gnus-display-mime-function)))
     ;; Perform the article display hooks.
@@ -2381,6 +2386,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "Interactively choose a view method for the MIME part under point."
   (interactive)
   (gnus-article-check-buffer)
+  (mm-setup-w3)
   (let ((data (get-text-property (point) 'gnus-data))
        (url-standalone-mode (not gnus-plugged)))
     (mm-interactively-view-part data)))
@@ -2412,6 +2418,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "Insert the MIME part under point into the current buffer."
   (interactive "P") ; For compatibility reasons we are not using "z".
   (gnus-article-check-buffer)
+  (mm-setup-w3)
   (let* ((data (get-text-property (point) 'gnus-data))
         contents
         (url-standalone-mode (not gnus-plugged))
@@ -2432,6 +2439,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "View the MIME part under point with an external viewer."
   (interactive)
   (gnus-article-check-buffer)
+  (mm-setup-w3)
   (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
         (url-standalone-mode (not gnus-plugged))
         (mm-user-display-methods nil)
@@ -2446,6 +2454,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "View the MIME part under point with an internal viewer."
   (interactive)
   (gnus-article-check-buffer)
+  (mm-setup-w3)
   (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
         (url-standalone-mode (not gnus-plugged))
         (mm-user-display-methods '((".*" . inline)))
@@ -2549,6 +2558,8 @@ If ALL-HEADERS is non-nil, no headers are hidden."
        (gnus-tmp-length (with-current-buffer (mm-handle-buffer handle)
                           (buffer-size)))
        gnus-tmp-type-long b e)
+    (when (string-match ".*/" gnus-tmp-name)
+      (setq gnus-tmp-name (replace-match "" t t gnus-tmp-name)))
     (setq gnus-tmp-type-long (concat gnus-tmp-type
                                     (and (not (equal gnus-tmp-name ""))
                                          (concat "; " gnus-tmp-name))))
@@ -2584,6 +2595,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
 
 (defun gnus-widget-press-button (elems el)
   (goto-char (widget-get elems :from))
+  (mm-setup-w3)
   (let ((url-standalone-mode (not gnus-plugged)))
     (gnus-article-press-button)))
 
index 2fed927..ebfa105 100644 (file)
@@ -200,7 +200,7 @@ Thank you for your help in stamping out bugs.
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
              (cons ,group ,article))
-        (make-local-variable 'gnus-newsgroup-name)
+        (set (make-local-variable 'gnus-newsgroup-name) ,group)
         (gnus-run-hooks 'gnus-message-setup-hook))
        (gnus-add-buffer)
        (gnus-configure-windows ,config t)
@@ -233,15 +233,24 @@ Thank you for your help in stamping out bugs.
 If ARG, use the group under the point to find a posting style.
 If ARG is 1, prompt for a group name to find the posting style."
   (interactive "P")
-  (let ((gnus-newsgroup-name
-        (if arg
-            (if (= 1 (prefix-numeric-value arg))
-                (completing-read "Use posting style of group: "
-                                 gnus-active-hashtb nil
-                                 (gnus-read-active-file-p))
-              (gnus-group-group-name))
-          "")))
-    (gnus-setup-message 'message (message-mail))))
+  ;; We can't `let' gnus-newsgroup-name here, since that leads
+  ;; to local variables leaking.
+  (let ((group gnus-newsgroup-name)
+       (buffer (current-buffer)))
+    (unwind-protect
+       (progn
+         (setq gnus-newsgroup-name
+               (if arg
+                   (if (= 1 (prefix-numeric-value arg))
+                       (completing-read "Use posting style of group: "
+                                        gnus-active-hashtb nil
+                                        (gnus-read-active-file-p))
+                     (gnus-group-group-name))
+                 ""))
+         (gnus-setup-message 'message (message-mail)))
+      (save-excursion
+       (set-buffer buffer)
+       (setq gnus-newsgroup-name group)))))
 
 (defun gnus-group-post-news (&optional arg)
   "Start composing a news message.
@@ -1061,30 +1070,31 @@ this is a reply."
       ;; If the group has a posting-style parameter, add it at the end with a
       ;; regexp matching everything, to be sure it takes precedence over all
       ;; the others.
-      (unless (eq 0 (length gnus-newsgroup-name))
-       (let ((tmp-style (gnus-group-find-parameter gnus-newsgroup-name 
-                                                   'posting-style t)))
-         (and tmp-style
-              (setq styles (append styles (list (cons ".*" tmp-style)))))
-         ))
+      (unless (zerop (length gnus-newsgroup-name))
+       (let ((tmp-style (gnus-group-find-parameter
+                         gnus-newsgroup-name 'posting-style t)))
+         (when tmp-style
+           (setq styles (append styles (list (cons ".*" tmp-style)))))))
       ;; Go through all styles and look for matches.
       (while styles
        (setq style (pop styles)
              match (pop style))
-       (when (cond ((stringp match)
-                    ;; Regexp string match on the group name.
-                    (string-match match gnus-newsgroup-name))
-                   ((or (symbolp match)
-                        (gnus-functionp match))
-                    (cond ((gnus-functionp match)
-                           ;; Function to be called.
-                           (funcall match))
-                          ((boundp match)
-                           ;; Variable to be checked.
-                           (symbol-value match))))
-                   ((listp match)
-                    ;; This is a form to be evaled.
-                    (eval match)))
+       (when (cond
+              ((stringp match)
+               ;; Regexp string match on the group name.
+               (string-match match gnus-newsgroup-name))
+              ((or (symbolp match)
+                   (gnus-functionp match))
+               (cond
+                ((gnus-functionp match)
+                 ;; Function to be called.
+                 (funcall match))
+                ((boundp match)
+                 ;; Variable to be checked.
+                 (symbol-value match))))
+              ((listp match)
+               ;; This is a form to be evaled.
+               (eval match)))
          ;; We have a match, so we set the variables.
          (while style
            (setq attribute (pop style)
@@ -1099,16 +1109,17 @@ this is a reply."
                (message "Couldn't find attribute %s" (car attribute))
              ;; We get the value.
              (setq value-value
-                   (cond ((stringp value)
-                          value)
-                         ((or (symbolp value)
-                              (gnus-functionp value))
-                          (cond ((gnus-functionp value)
-                                 (funcall value))
-                                ((boundp value)
-                                 (symbol-value value))))
-                         ((listp value)
-                          (eval value))))
+                   (cond
+                    ((stringp value)
+                     value)
+                    ((or (symbolp value)
+                         (gnus-functionp value))
+                     (cond ((gnus-functionp value)
+                            (funcall value))
+                           ((boundp value)
+                            (symbol-value value))))
+                    ((listp value)
+                     (eval value))))
              (if variable
                  ;; This is an ordinary variable.
                  (set (make-local-variable variable) value-value)
@@ -1137,7 +1148,7 @@ this is a reply."
       (while (setq val (pop gnus-message-style-insertions))
        (when (cdr val)
          (insert (car val) ": " (cdr val) "\n"))
-       (gnus-pull (car val) gnus-message-style-insertions)))))
+       (gnus-pull (car val) gnus-message-style-insertions t)))))
 
 ;;; Allow redefinition of functions.
 
index 6db18cb..e67198c 100644 (file)
@@ -148,6 +148,11 @@ please tell me so that we can list it."
   "Face to show xbm picons in."
   :group 'picons)
 
+(defcustom gnus-picons-setup-hook nil
+  "Hook run in Picons buffers."
+  :group 'picons
+  :type 'hook)
+
 ;;; Internal variables:
 
 (defvar gnus-picons-processes-alist nil
@@ -184,9 +189,9 @@ arguments necessary for the job.")
 
 (defun gnus-get-buffer-name (variable)
   "Returns the buffer name associated with the contents of a variable."
-  (let ((buf (gnus-get-buffer-create (gnus-window-to-buffer-helper
-                                (cdr 
-                                 (assq variable gnus-window-to-buffer))))))
+  (let ((buf (gnus-get-buffer-create
+             (gnus-window-to-buffer-helper
+              (cdr (assq variable gnus-window-to-buffer))))))
     (and buf
         (buffer-name buf))))
 
@@ -203,8 +208,8 @@ arguments necessary for the job.")
 
 (defun gnus-picons-kill-buffer ()
   (let ((buf (get-buffer (gnus-picons-buffer-name))))
-    (if (buffer-live-p buf)
-       (kill-buffer buf))))
+    (when (buffer-live-p buf)
+      (kill-buffer buf))))
 
 (defun gnus-picons-setup-buffer ()
   (let ((name (gnus-picons-buffer-name)))
@@ -214,6 +219,7 @@ arguments necessary for the job.")
        (set-buffer (gnus-get-buffer-create name))
        (buffer-disable-undo)
        (setq buffer-read-only t)
+       (run-hooks 'gnus-picons-setup-hook)
        (add-hook 'gnus-summary-prepare-exit-hook 'gnus-picons-kill-buffer))
       (current-buffer))))
 
index c382937..d9fd938 100644 (file)
@@ -254,7 +254,7 @@ is restarted, and sometimes reloaded."
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "0.63"
+(defconst gnus-version-number "0.64"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
index 1145c64..a352f5b 100644 (file)
       (viewer . tar-mode)
       (type . "archive/tar")
       (test . (fboundp 'tar-mode)))))
-     "*The mailcap structure is an assoc list of assoc lists.
+     "The mailcap structure is an assoc list of assoc lists.
 1st assoc list is keyed on the major content-type
 2nd assoc list is keyed on the minor content-type (which can be a regexp)
 
@@ -755,8 +755,7 @@ this type is returned."
     (".ai"       . "application/postscript")
     (".jpe"      . "image/jpeg")
     (".jpeg"     . "image/jpeg"))
-  "*An assoc list of file extensions and the MIME content-types they
-correspond to.")
+  "An assoc list of file extensions and corresponding MIME content-types.")
 
 (defun mailcap-parse-mimetypes (&optional path)
   ;; Parse out all the mimetypes specified in a unix-style path string PATH
index 32d909f..cb578a9 100644 (file)
@@ -879,8 +879,12 @@ The cdr of ech entry is a function for applying the face to a region.")
   "Coding system to encode outgoing mail.")
 
 (defvar message-draft-coding-system 
-  (if (string-match "XEmacs\\|Lucid" emacs-version)
-      'escape-quoted 'emacs-mule)
+  (cond 
+   ((not (fboundp 'coding-system-p)) nil)
+   ((coding-system-p 'emacs-mule) 'emacs-mule)
+   ((coding-system-p 'escape-quoted) 'escape-quoted)
+   ((coding-system-p 'no-conversion) 'no-conversion)
+   (t nil))
   "Coding system to compose mail.")
 
 (defvar message-default-charset 'iso-8859-1
@@ -1317,8 +1321,8 @@ Point is left at the beginning of the narrowed-to region."
   (define-key message-mode-map "\C-c\C-z" 'message-kill-to-signature)
   (define-key message-mode-map "\M-\r" 'message-newline-and-reformat)
 
-  (define-key message-mode-map "\C-c\C-a" 'message-insert-mime-part)
-  (define-key message-mode-map "\C-c\C-m\C-a" 'message-insert-mime-part)
+  (define-key message-mode-map "\C-c\C-a" 'message-mime-attach-file)
+  (define-key message-mode-map "\C-c\C-m\C-a" 'message-mime-attach-file)
   (define-key message-mode-map "\C-c\C-m\C-e" 'message-mime-insert-external)
   (define-key message-mode-map "\C-c\C-m\C-q" 'mml-quote-region)
   
@@ -2011,7 +2015,6 @@ the user from the mailer."
   (let ((inhibit-read-only t))
     (put-text-property (point-min) (point-max) 'read-only nil))
   (message-fix-before-sending)
-  (message-encode-message-body)
   (run-hooks 'message-send-hook)
   (message "Sending...")
   (let ((alist message-send-method-alist)
@@ -2032,7 +2035,8 @@ the user from the mailer."
       (message-do-fcc)
       ;;(when (fboundp 'mail-hist-put-headers-into-history)
       ;; (mail-hist-put-headers-into-history))
-      (run-hooks 'message-sent-hook)
+      (save-excursion
+       (run-hooks 'message-sent-hook))
       (message "Sending...done")
       ;; Mark the buffer as unmodified and delete auto-save.
       (set-buffer-modified-p nil)
@@ -2110,6 +2114,7 @@ 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)
@@ -2283,6 +2288,7 @@ to find out how to use this."
        (mail-encode-encoded-word-buffer)
        ;; Let the user do all of the above.
        (run-hooks 'message-header-hook))
+      (message-encode-message-body)
       (message-cleanup-headers)
       (if (not (message-check-news-syntax))
          nil
@@ -4127,7 +4133,7 @@ regexp varstr."
 ;; I really think this function should be renamed.  It is only useful
 ;; for inserting file attachments.
 
-(defun message-insert-mime-part (file type description)
+(defun message-mime-attach-file (file type description)
   "Attach a file to the outgoing MIME message.
 The file is not inserted or encoded until you send the message with
 `\\[message-send-and-exit]' or `\\[message-send]'.
index b7811b2..13b5fdd 100644 (file)
@@ -249,7 +249,8 @@ See also `with-temp-file' and `with-output-to-string'."
   "Return a list of charsets in the region."
   (cond
    ((and (boundp 'enable-multibyte-characters)
-        enable-multibyte-characters)
+        enable-multibyte-characters
+        (fboundp 'find-charset-region))
     (find-charset-region b e))
    ((not (boundp 'current-language-environment))
     (save-excursion
index ccc513c..75cb51b 100644 (file)
@@ -45,9 +45,7 @@
     (w3-do-setup)
     (require 'url)
     (require 'w3-vars)
-    (condition-case ()
-       (load "url-misc.el")
-      (error nil))
+    (require 'url-vars)
     (setq mm-w3-setup t)))
 
 (defun mm-inline-text (handle)
index b5e5192..c04ee53 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Pterodactyl Gnus 0.63 Manual
+@settitle Pterodactyl Gnus 0.64 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.63 Manual
+@title Pterodactyl Gnus 0.64 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.63.
+This manual corresponds to Pterodactyl Gnus 0.64.
 
 @end ifinfo
 
@@ -6599,7 +6599,9 @@ Treat overstrike (@code{gnus-article-treat-overstrike}).
 @cindex Latin 1
 Treat M******** sm*rtq**t*s according to
 @code{gnus-article-dumbquotes-map}
-(@code{gnus-article-treat-dumbquotes}).
+(@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
+whether a character is a sm*rtq**t* or not, so it should only be used
+interactively.
 
 @item W w
 @kindex W w (Summary)
@@ -15593,6 +15595,10 @@ Defaults to @code{t}.
 Ordered list of suffixes on picon file names to try.  Defaults to
 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
 
+@item gnus-picons-setup-hook
+@vindex gnus-picons-setup-hook
+Hook run in the picon buffer, if that is displayed.
+
 @item gnus-picons-display-article-move-p
 @vindex gnus-picons-display-article-move-p
 Whether to move point to first empty line when displaying picons.  This
index 42b0c3b..ad1fa1f 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Pterodactyl Message 0.63 Manual
+@settitle Pterodactyl Message 0.64 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.63 Manual
+@title Pterodactyl Message 0.64 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.63.  Message is
+This manual corresponds to Pterodactyl Message 0.64.  Message is
 distributed with the Gnus distribution bearing the same version number
 as this manual.