From f135e4116ad8c8e490d016afaa5964f06758db18 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 1 Mar 1999 01:21:41 +0000 Subject: [PATCH] * gnus.el (gnus-revision-number): Increment to 01. * message.el (messgage-inhibit-body-encoding): Default to t. (message-mode): Abolish `message-mime-attach-file' from doc string. (message-mode-map): Abolish `message-mime-attach-file' from `message-mode-menu'. * gnus-start.el (save-buffer-as-coding-system): Abolished. It is given in APEL 9.13 by now. * gnus-ems.el (gnus-decode-coding-string): Abolished. (gnus-encode-coding-string): Abolished. (gnus-mule-cite-add-face): Restored. (gnus-cite-add-face): Restored. --- lisp/gnus-ems.el | 30 ++++++++++++++++------ lisp/gnus-start.el | 6 ----- lisp/gnus-sum.el | 38 ++++++++++++++-------------- lisp/gnus.el | 2 +- lisp/mail-source.el | 4 +-- lisp/message.el | 69 +++++++++++++++++++++++++-------------------------- 6 files changed, 78 insertions(+), 71 deletions(-) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 12ee86e..4b3bc4c 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -53,6 +53,24 @@ ;;; Mule functions. +(defun gnus-mule-cite-add-face (number prefix face) + ;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line. + (when face + (let ((inhibit-point-motion-hooks t) + from to) + (goto-line number) + (unless (eobp) ; Sometimes things become confused (broken). + (forward-char (chars-in-string prefix)) + (skip-chars-forward " \t") + (setq from (point)) + (end-of-line 1) + (skip-chars-backward " \t") + (setq to (point)) + (when (< from to) + (push (setq overlay (gnus-make-overlay from to)) + gnus-cite-overlay-list) + (gnus-overlay-put (gnus-make-overlay from to) 'face face)))))) + (defvar gnus-mule-bitmap-image-file nil) (defun gnus-mule-group-startup-message (&optional x y) "Insert startup message in current buffer." @@ -103,12 +121,6 @@ (setq gnus-simple-splash t) (set-buffer-modified-p t)) -(defun gnus-encode-coding-string (string system) - string) - -(defun gnus-decode-coding-string (string system) - string) - (eval-and-compile (if (string-match "XEmacs\\|Lucid" emacs-version) nil @@ -194,8 +206,6 @@ (defvar gnus-summary-display-table nil "Display table used in summary mode buffers.") (fset 'gnus-summary-set-display-table (lambda ())) - (fset 'gnus-encode-coding-string 'encode-coding-string) - (fset 'gnus-decode-coding-string 'decode-coding-string) (if (fboundp 'truncate-string-to-width) (fset 'gnus-truncate-string 'truncate-string-to-width) @@ -251,6 +261,10 @@ (setq gnus-check-before-posting (delq 'long-lines (delq 'control-chars gnus-check-before-posting)))) + + (when (fboundp 'chars-in-string) + (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face)) + ))) (defun gnus-region-active-p () diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 731aa57..15b5603 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2254,12 +2254,6 @@ If FORCE is non-nil, the .newsrc file is read." (setq gnus-newsrc-options-n out)))) -;; The following four lines will be deleted in the future. -(require 'poe) -(defun-maybe save-buffer-as-coding-system (coding-system &optional args) - (let ((coding-system-for-write coding-system)) - (save-buffer args))) - (defun gnus-save-newsrc-file (&optional force) "Save .newsrc file." ;; Note: We cannot save .newsrc file if all newsgroups are removed diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 8f630ee..c082995 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6989,26 +6989,26 @@ If ARG is a negative number, hide the unwanted header lines." (set-buffer gnus-article-buffer) (save-restriction (let* ((buffer-read-only nil) - (inhibit-point-motion-hooks t) - (hidden (gnus-article-hidden-text-p 'headers)) - e) - (goto-char (point-min)) - (when (search-forward "\n\n" nil t) - (delete-region (point-min) (1- (point)))) + (inhibit-point-motion-hooks t) + (hidden (gnus-article-hidden-text-p 'headers)) + e) (goto-char (point-min)) - (save-excursion - (set-buffer gnus-original-article-buffer) - (goto-char (point-min)) - (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))) - (insert-buffer-substring gnus-original-article-buffer 1 e) - (save-restriction - (narrow-to-region (point-min) (point)) - (if (or hidden - (and (numberp arg) (< arg 0))) - (let ((gnus-treat-hide-headers nil) - (gnus-treat-hide-boring-headers nil)) - (gnus-treat-article 'head)) - (gnus-treat-article 'head))))))) + (when (search-forward "\n\n" nil t) + (delete-region (point-min) (1- (point)))) + (goto-char (point-min)) + (save-excursion + (set-buffer gnus-original-article-buffer) + (goto-char (point-min)) + (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))) + (insert-buffer-substring gnus-original-article-buffer 1 e) + (save-restriction + (narrow-to-region (point-min) (point)) + (if (or hidden + (and (numberp arg) (< arg 0))) + (let ((gnus-treat-hide-headers nil) + (gnus-treat-hide-boring-headers nil)) + (gnus-treat-article 'head)) + (gnus-treat-article 'head))))))) (defun gnus-summary-show-all-headers () "Make all header lines visible." diff --git a/lisp/gnus.el b/lisp/gnus.el index 86bd1fc..2823cc4 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.061" "Version number for this version of gnus.") -(defconst gnus-revision-number "00" +(defconst gnus-revision-number "01" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.79" diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 87c2b88..436d0ed 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -362,8 +362,8 @@ If ARGS, PROMPT is used as an argument to `format'." postscript (format-spec-make ?p password ?t mail-source-crash-box - ?s server ?P port ?u user))))) - 1) + ?s server ?P port ?u user))))) + 1) ;; We nix out the password in case the error ;; was because of a wrong password being given. (setq mail-source-password-cache diff --git a/lisp/message.el b/lisp/message.el index 1718c3e..e002f95 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1525,7 +1525,6 @@ Point is left at the beginning of the narrowed-to region." ["Newline and Reformat" message-newline-and-reformat t] ["Rename buffer" message-rename-buffer t] ["Spellcheck" ispell-message t] - ["Attach file as MIME" mml-attach-file t] "----" ["Send Message" message-send-and-exit t] ["Abort Message" message-dont-send t] @@ -1578,8 +1577,7 @@ C-c C-q message-fill-yanked-message (fill what was yanked). C-c C-e message-elide-region (elide the text between point and mark). C-c C-v message-delete-not-region (remove the text outside the region). C-c C-z message-kill-to-signature (kill the text up to the signature). -C-c C-r message-caesar-buffer-body (rot13 the message body). -C-c C-a mml-attach-file (attach a file as MIME)." +C-c C-r message-caesar-buffer-body (rot13 the message body)." (interactive) (kill-all-local-variables) (set (make-local-variable 'message-reply-buffer) nil) @@ -4851,51 +4849,52 @@ regexp varstr." ;;; ;;; MIME functions ;;; -(defvar messgage-inhibit-body-encoding nil) + +(defvar messgage-inhibit-body-encoding t) (defun message-encode-message-body () - (unless messgage-inhibit-body-encoding + (unless messgage-inhibit-body-encoding (let ((mail-parse-charset (or mail-parse-charset - message-default-charset - message-posting-charset)) - (case-fold-search t) - lines content-type-p) + message-default-charset + message-posting-charset)) + (case-fold-search t) + lines content-type-p) (message-goto-body) (save-restriction - (narrow-to-region (point) (point-max)) - (let ((new (mml-generate-mime))) - (when new - (delete-region (point-min) (point-max)) - (insert new) - (goto-char (point-min)) - (if (eq (aref new 0) ?\n) - (delete-char 1) - (search-forward "\n\n") - (setq lines (buffer-substring (point-min) (1- (point)))) - (delete-region (point-min) (point)))))) + (narrow-to-region (point) (point-max)) + (let ((new (mml-generate-mime))) + (when new + (delete-region (point-min) (point-max)) + (insert new) + (goto-char (point-min)) + (if (eq (aref new 0) ?\n) + (delete-char 1) + (search-forward "\n\n") + (setq lines (buffer-substring (point-min) (1- (point)))) + (delete-region (point-min) (point)))))) (save-restriction - (message-narrow-to-headers-or-head) - (message-remove-header "Mime-Version") - (goto-char (point-max)) - (insert "MIME-Version: 1.0\n") - (when lines - (insert lines)) - (setq content-type-p - (re-search-backward "^Content-Type:" nil t))) + (message-narrow-to-headers-or-head) + (message-remove-header "Mime-Version") + (goto-char (point-max)) + (insert "MIME-Version: 1.0\n") + (when lines + (insert lines)) + (setq content-type-p + (re-search-backward "^Content-Type:" nil t))) (save-restriction - (message-narrow-to-headers-or-head) - (message-remove-first-header "Content-Type") - (message-remove-first-header "Content-Transfer-Encoding")) + (message-narrow-to-headers-or-head) + (message-remove-first-header "Content-Type") + (message-remove-first-header "Content-Transfer-Encoding")) ;; We always make sure that the message has a Content-Type header. ;; This is because some broken MTAs and MUAs get awfully confused ;; when confronted with a message with a MIME-Version header and ;; without a Content-Type header. For instance, Solaris' ;; /usr/bin/mail. (unless content-type-p - (goto-char (point-min)) - (re-search-forward "^MIME-Version:") - (forward-line 1) - (insert "Content-Type: text/plain; charset=us-ascii\n"))))) + (goto-char (point-min)) + (re-search-forward "^MIME-Version:") + (forward-line 1) + (insert "Content-Type: text/plain; charset=us-ascii\n"))))) (defvar message-save-buffer " *encoding") (defun message-save-drafts () -- 1.7.10.4