From 92682b02f8e92f91565e2f7caccec9e4a5826b53 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 23 Nov 2000 23:04:43 +0000 Subject: [PATCH] Synch with Gnus. --- contrib/ChangeLog | 12 ++++++++++++ contrib/gpg.el | 11 +++++------ lisp/ChangeLog | 28 +++++++++++++++++++++++++++- lisp/gnus-cite.el | 15 ++++++++------- lisp/gnus-ml.el | 24 +++++++++++++++++++++++- lisp/gnus-setup.el | 4 ++-- lisp/gnus-sum.el | 7 ++++--- lisp/gnus-xmas.el | 2 +- lisp/lpath.el | 1 + lisp/message.el | 16 +++++++++------- 10 files changed, 92 insertions(+), 28 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index b5b3458..f512ae6 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,4 +1,16 @@ +2000-11-08 Bj,Av(Brn Torkelsson + + * gpg.el: In Xemacs it is called point-at-eol, not + line-end-position + + * gpg.el (gpg-key-lessp): use string-lessp instead of + compare-strings (not available on XEmacs) + 2000-11-16 Simon Josefsson * gpg.el (gpg-command-verify-cleartext): New variable. (gpg-verify-cleartext): New function. + +;; Local Variables: +;; coding: iso-2022-7bit +;; End: diff --git a/contrib/gpg.el b/contrib/gpg.el index 1632364..fff73c3 100644 --- a/contrib/gpg.el +++ b/contrib/gpg.el @@ -110,6 +110,10 @@ (eval-when-compile (require 'cl)) + +(if (featurep 'xemacs) + (defalias 'line-end-position 'point-at-eol)) + ;;;; Customization: ;;; Customization: Groups: @@ -1077,12 +1081,7 @@ documentation for details)." (defun gpg-key-lessp (a b) "Returns t if primary user ID of A is less than B." - (let ((res (compare-strings (gpg-key-primary-user-id a) 0 nil - (gpg-key-primary-user-id b) 0 nil - t))) - (if (eq res t) - nil - (< res 0)))) + (string-lessp (gpg-key-primary-user-id a) (gpg-key-primary-user-id b) )) ;;; Accessing the key database: diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f178bc..85207b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,30 @@ -2000-11-22 dme@dme.org +2000-11-22 17:00:00 ShengHuo ZHU + + * message.el (message-setup): Discourage using mc-install-*-mode. + + * gnus-setup.el (gnus-use-mailcrypt): Don't hook mail-crypt. + +2000-11-22 16:00:00 ShengHuo ZHU + + * gnus-cite.el (gnus-cite-parse): Guess citation length. + +2000-11-22 14:00:00 ShengHuo ZHU + + * gnus-ml.el (gnus-mailing-list-insinuate): New function. + +2000-11-22 13:00:00 ShengHuo ZHU + + * gnus-ml.el (gnus-mailing-list-archive): Find the real url. + +2000-11-22 11:00:00 ShengHuo ZHU + + * gnus-xmas.el (gnus-xmas-article-display-xface): Use + insert-buffer-substring. + + * message.el (message-send-mail): Use buffer-substring-no-properties. + (message-send-news): Ditto. + +2000-11-22 David Edmondson * imap.el (imap-wait-for-tag): Message read info. diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index 3cc0a47..f110927 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -22,14 +22,13 @@ ;;; Code: (eval-when-compile (require 'cl)) +(eval-when-compile (require 'static)) (require 'gnus) (require 'gnus-art) (require 'gnus-range) (require 'message) ; for message-cite-prefix-regexp -(eval-when-compile (require 'static)) - ;;; Customization: (defgroup gnus-cite nil @@ -661,22 +660,24 @@ See also the documentation for `gnus-article-highlight-citation'." (gnus-article-search-signature) (point))) (prefix-regexp (concat "^\\(" message-cite-prefix-regexp "\\)")) - alist entry start begin end numbers prefix mc-flag) + alist entry start begin end numbers prefix guess-limit mc-flag) ;; Get all potential prefixes in `alist'. (while (< (point) max) ;; Each line. (setq begin (point) + guess-limit (progn (skip-chars-forward "^> \t\r\n") (point)) end (progn (beginning-of-line 2) (point)) start end) (goto-char begin) ;; Ignore standard Supercite attribution prefix. - (when (looking-at gnus-supercite-regexp) + (when (and (< guess-limit (+ begin gnus-cite-max-prefix)) + (looking-at gnus-supercite-regexp)) (if (match-end 1) (setq end (1+ (match-end 1))) (setq end (1+ begin)))) ;; Ignore very long prefixes. - (when (> end (+ (point) gnus-cite-max-prefix)) - (setq end (+ (point) gnus-cite-max-prefix))) + (when (> end (+ begin gnus-cite-max-prefix)) + (setq end (+ begin gnus-cite-max-prefix))) (while (re-search-forward prefix-regexp (1- end) t) ;; Each prefix. (setq end (match-end 0) @@ -909,7 +910,7 @@ See also the documentation for `gnus-article-highlight-citation'." (static-if (or (featurep 'xemacs) (and (eq emacs-major-version 20) (>= emacs-minor-version 3)) - (> emacs-major-version 20));-) + (>= emacs-major-version 21)) (forward-char (length prefix)) (move-to-column (string-width prefix))) (skip-chars-forward " \t") diff --git a/lisp/gnus-ml.el b/lisp/gnus-ml.el index 52c4442..7938fec 100644 --- a/lisp/gnus-ml.el +++ b/lisp/gnus-ml.el @@ -72,6 +72,25 @@ (gnus-mailing-list-mode 1))) ;;;###autoload +(defun gnus-mailing-list-insinuate (&optional force) + "Setup group parameters from List-Post header. +If FORCE is non-nil, replace the old ones." + (interactive "P") + (let ((list-post + (with-current-buffer gnus-original-article-buffer + (gnus-fetch-field "list-post")))) + (if list-post + (if (and (not force) + (gnus-group-get-parameter gnus-newsgroup-name 'to-list)) + (gnus-message 1 "to-list is non-nil.") + (if (string-match "]*\\)>" list-post) + (setq list-post (match-string 1 list-post))) + (gnus-group-add-parameter gnus-newsgroup-name + (cons 'to-list list-post)) + (gnus-mailing-list-mode 1)) + (gnus-message 1 "no list-post in this message.")))) + +;;;###autoload (defun gnus-mailing-list-mode (&optional arg) "Minor mode for providing mailing-list commands. @@ -141,7 +160,10 @@ (let ((list-archive (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-archive")))) - (cond (list-archive (browse-url list-archive)) + (cond (list-archive + (if (string-match "<\\(http:[^>]*\\)>" list-archive) + (browse-url (match-string 1 list-archive)) + (browse-url list-archive))) (t (gnus-message 1 "no list-archive in this group"))))) ;;; Utility functions diff --git a/lisp/gnus-setup.el b/lisp/gnus-setup.el index c98ef72..5bc7656 100644 --- a/lisp/gnus-setup.el +++ b/lisp/gnus-setup.el @@ -97,8 +97,8 @@ (setq load-path (cons gnus-mailcrypt-lisp-directory load-path))) (autoload 'mc-install-write-mode "mailcrypt" nil t) (autoload 'mc-install-read-mode "mailcrypt" nil t) - (add-hook 'message-mode-hook 'mc-install-write-mode) - (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) +;;; (add-hook 'message-mode-hook 'mc-install-write-mode) +;;; (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) (when gnus-use-mhe (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 0d885fb..525e41d 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -51,6 +51,7 @@ (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t) (autoload 'gnus-cache-write-active "gnus-cache") (autoload 'gnus-set-summary-default-charset "gnus-i18n" nil t) +(autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t) (defcustom gnus-kill-summary-on-exit t "*If non-nil, kill the summary buffer when you exit from it. @@ -1569,9 +1570,8 @@ increase the score of each group you read." "g" gnus-summary-show-article "s" gnus-summary-isearch-article "P" gnus-summary-print-article - "t" gnus-article-babel - "d" gnus-summary-decrypt-article - "v" gnus-summary-verify-article) + "M" gnus-mailing-list-insinuate + "t" gnus-article-babel) (gnus-define-keys (gnus-summary-wash-map "W" gnus-summary-mode-map) "b" gnus-article-add-buttons @@ -1816,6 +1816,7 @@ increase the score of each group you read." ["Fetch referenced articles" gnus-summary-refer-references t] ["Fetch current thread" gnus-summary-refer-thread t] ["Fetch article with id..." gnus-summary-refer-article t] + ["Setup Mailing List Params" gnus-mailing-list-insinuate t] ["Redisplay" gnus-summary-show-article t]))) (easy-menu-define gnus-summary-article-menu gnus-summary-mode-map "" diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index c179dbd..d21cfa7 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -809,7 +809,7 @@ XEmacs compatibility workaround." (let ((cur (current-buffer))) (save-excursion (gnus-set-work-buffer) - (insert (format "%s" (buffer-substring beg end cur))) + (insert-buffer-substring cur beg end) (gnus-xmas-call-region "uncompface") (goto-char (point-min)) (insert "/* Width=48, Height=48 */\n") diff --git a/lisp/lpath.el b/lisp/lpath.el index 4670442..6aa44a8 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -30,6 +30,7 @@ adaptive-fill-regexp babel-history babel-translations display-time-mail-function imap-password mail-mode-hook mc-pgp-always-sign + nnoo-definition-alist url-current-callback-func url-be-asynchronous url-current-callback-data url-working-buffer url-current-mime-headers w3-meta-charset-content-type-regexp diff --git a/lisp/message.el b/lisp/message.el index ace7718..102a635 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2745,7 +2745,9 @@ It should typically alter the sending method in some way or other." (save-excursion (set-buffer message-encoding-buffer) (erase-buffer) - (insert-buffer message-edit-buffer) + ;; Avoid copying text props. + (insert (with-current-buffer message-edit-buffer + (buffer-substring-no-properties (point-min) (point-max)))) (funcall message-encode-function) (while (and success (setq elem (pop alist))) @@ -4400,13 +4402,13 @@ than 988 characters long, and if they are not, trim them until they are." (setq message-buffer-list (nconc message-buffer-list (list (current-buffer)))))) -(defvar mc-modes-alist) +;;;(defvar mc-modes-alist) (defun message-setup (headers &optional replybuffer actions) - (when (and (boundp 'mc-modes-alist) - (not (assq 'message-mode mc-modes-alist))) - (push '(message-mode (encrypt . mc-encrypt-message) - (sign . mc-sign-message)) - mc-modes-alist)) +;;; (when (and (boundp 'mc-modes-alist) +;;; (not (assq 'message-mode mc-modes-alist))) +;;; (push '(message-mode (encrypt . mc-encrypt-message) +;;; (sign . mc-sign-message)) +;;; mc-modes-alist)) (when actions (setq message-send-actions actions)) (setq message-reply-buffer -- 1.7.10.4