2001-07-15 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 15 Jul 2001 20:34:11 +0000 (20:34 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 15 Jul 2001 20:34:11 +0000 (20:34 +0000)
* gnus-art.el,...: Error convention changes.

2001-07-13 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* gnus-sum.el (gnus-rebuild-thread): Count hidden lines too.

2001-07-13 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* nnrss.el (nnrss-read-group-data): Nuke emacs-lisp-mode-hook.
(nnrss-read-server-data): Ditto.

18 files changed:
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-cus.el
lisp/gnus-sum.el
lisp/mail-source.el
lisp/message.el
lisp/mm-extern.el
lisp/mm-partial.el
lisp/mm-util.el
lisp/mml-sec.el
lisp/mml2015.el
lisp/nnimap.el
lisp/nnrss.el
lisp/pop3.el
lisp/rfc2047.el
lisp/smiley.el
lisp/smime.el

index 608bf16..2923e90 100644 (file)
@@ -1,3 +1,16 @@
+2001-07-15  Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
+
+       * gnus-art.el,...: Error convention changes.
+
+2001-07-13 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-rebuild-thread): Count hidden lines too.
+
+2001-07-13 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnrss.el (nnrss-read-group-data): Nuke emacs-lisp-mode-hook.
+       (nnrss-read-server-data): Ditto.
+
 2001-07-13 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        
        * gnus-setup.el (gnus-use-installed-gnus): Typo.
index 309f60b..f2ed2bb 100644 (file)
@@ -1106,12 +1106,12 @@ the actual number of articles toggled is returned."
          (error
           (unless (funcall gnus-agent-confirmation-function
                            (format "Error (%s).  Continue? " err))
-            (error "Cannot fetch articles into the Gnus agent.")))
+            (error "Cannot fetch articles into the Gnus agent")))
          (quit
           (unless (funcall gnus-agent-confirmation-function
                            (format "Quit fetching session (%s).  Continue? "
                                    err))
-            (signal 'quit "Cannot fetch articles into the Gnus agent."))))
+            (signal 'quit "Cannot fetch articles into the Gnus agent"))))
        (pop methods))
       (gnus-message 6 "Finished fetching articles into the Gnus agent"))))
 
index c1ea7f4..080a024 100644 (file)
@@ -2716,7 +2716,7 @@ The directory to save in defaults to `gnus-article-save-directory'."
   (when (string-equal command "")
     (if gnus-last-shell-command
        (setq command gnus-last-shell-command)
-      (error "A command is required.")))
+      (error "A command is required")))
   (gnus-eval-in-buffer-window gnus-article-buffer
     (save-restriction
       (widen)
@@ -3320,7 +3320,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   (let* ((data (get-text-property (point) 'gnus-data))
         file param)
     (if (mm-multiple-handles gnus-article-mime-handles)
-       (error "This function is not implemented."))
+       (error "This function is not implemented"))
     (setq file (and data (mm-save-part data)))
     (when file
       (with-current-buffer (mm-handle-buffer data)
@@ -5378,9 +5378,9 @@ For example:
     (unless func
       (error (format "Can't find the encrypt protocol %s" protocol)))
     (if (equal gnus-newsgroup-name "nndraft:drafts")
-       (error "Can't encrypt the article in group nndraft:drafts."))
+       (error "Can't encrypt the article in group nndraft:drafts"))
     (if (equal gnus-newsgroup-name "nndraft:queue")
-       (error "Don't encrypt the article in group nndraft:queue."))
+       (error "Don't encrypt the article in group nndraft:queue"))
     (gnus-summary-iterate n
       (save-excursion
        (set-buffer gnus-summary-buffer)
index c1ac599..b3b4246 100644 (file)
@@ -642,7 +642,7 @@ When called interactively, FILE defaults to the current score file.
 This can be changed using the `\\[gnus-score-change-score-file]' command."
   (interactive (list gnus-current-score-file))
   (unless file
-    (error (format "No score file for %s.
+    (error (format "No score file for %s" 
                   (gnus-group-decoded-name gnus-newsgroup-name))))
   (let ((scores (gnus-score-load file))
        (types (mapcar (lambda (entry)
index 19504da..5668513 100644 (file)
@@ -3716,7 +3716,7 @@ If LINE, insert the rebuilt thread starting on line LINE."
       (setq thread (gnus-remove-thread id)))
     (setq old-pos (gnus-point-at-bol))
     (setq current (save-excursion
-                   (and (zerop (forward-line -1))
+                   (and (re-search-backward "[\r\n]" nil t)
                         (gnus-summary-article-number))))
     ;; If this is a gathered thread, we have to go some re-gathering.
     (when (stringp (car thread))
@@ -8228,7 +8228,7 @@ groups."
                                  (setq gnus-article-mime-handles nil))))))
      (t (setq force t)))
     (if (and raw (not force) (equal gnus-newsgroup-name "nndraft:drafts"))
-       (error "Can't edit the raw article in group nndraft:drafts."))
+       (error "Can't edit the raw article in group nndraft:drafts"))
     (save-excursion
       (set-buffer gnus-summary-buffer)
       (let ((mail-parse-charset gnus-newsgroup-charset)
index 618d02e..84ecbce 100644 (file)
@@ -449,7 +449,7 @@ Return the number of files that were found."
                 (error
                  (unless (yes-or-no-p
                           (format "Mail source error (%s).  Continue? " err))
-                   (error "Cannot get new mail."))
+                   (error "Cannot get new mail"))
                  0))))))))
 
 (defun mail-source-make-complex-temp-name (prefix)
@@ -778,7 +778,7 @@ If ARGS, PROMPT is used as an argument to `format'."
 This only works when `display-time' is enabled."
   (interactive "P")
   (if (not mail-source-primary-source)
-      (error "Need to set `mail-source-primary-source' to check for new mail."))
+      (error "Need to set `mail-source-primary-source' to check for new mail"))
   (let ((on (if (null arg)
                (not mail-source-report-new-mail)
              (> (prefix-numeric-value arg) 0))))
index 88dfb9a..a57ecc9 100644 (file)
@@ -2351,7 +2351,7 @@ It should typically alter the sending method in some way or other."
                            (format
                             "Already sent message via %s; resend? "
                             (car elem)))
-                        (error "Denied posting -- multiple copies.")))
+                        (error "Denied posting -- multiple copies")))
                   (setq success (funcall (caddr elem) arg)))
          (setq sent t))))
     (unless (or sent (not success))
index 26c5773..4579a55 100644 (file)
   (let ((name (cdr (assq 'name (cdr (mm-handle-type handle)))))
        (coding-system-for-read mm-binary-coding-system))
     (unless name
-      (error "The filename is not specified."))
+      (error "The filename is not specified"))
     (mm-disable-multibyte-mule4)
     (if (file-exists-p name)
        (mm-insert-file-contents name nil nil nil nil t)
-      (error (format "File %s is gone." name)))))
+      (error (format "File %s is gone" name)))))
 
 (defun mm-extern-url (handle)
   (erase-buffer)
@@ -60,7 +60,7 @@
        (name buffer-file-name)
        (coding-system-for-read mm-binary-coding-system))
     (unless url
-      (error "URL is not specified."))
+      (error "URL is not specified"))
     (mm-with-unibyte-current-buffer-mule4
       (url-insert-file-contents url))
     (mm-disable-multibyte-mule4)
@@ -78,7 +78,7 @@
                       "@" site ":" directory "/" name))
         (coding-system-for-read mm-binary-coding-system))
     (unless name
-      (error "The filename is not specified."))
+      (error "The filename is not specified"))
     (mm-disable-multibyte-mule4)
     (mm-insert-file-contents path nil nil nil nil t)))
 
@@ -118,13 +118,13 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
         (func (cdr (assq (intern
                           (downcase
                            (or access-type
-                               (error "Couldn't find access type."))))
+                               (error "Couldn't find access type"))))
                          mm-extern-function-alist)))
         gnus-displaying-mime buf
         handles)
     (unless (mm-handle-cache handle)
       (unless func
-       (error (format "Access type (%s) is not supported." access-type)))
+       (error (format "Access type (%s) is not supported" access-type)))
       (with-temp-buffer
        (mm-insert-part handle)
        (goto-char (point-max))
@@ -132,7 +132,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
        (setq handles (mm-dissect-buffer t)))
       (unless (bufferp (car handles))
        (mm-destroy-parts handles)
-       (error "Multipart external body is not supported."))
+       (error "Multipart external body is not supported"))
       (save-excursion ;; single part
        (set-buffer (setq buf (mm-handle-buffer handles)))
        (let (good)
index d4cca04..706f52e 100644 (file)
@@ -65,7 +65,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
        gnus-displaying-mime handles buffer)
     (unless (mm-handle-cache handle)
       (unless id
-       (error "Can not find message/partial id."))
+       (error "Can not find message/partial id"))
       (setq phandles
            (sort (cons handle
                        (mm-partial-find-parts
@@ -95,7 +95,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
          (if ntotal
              (if total
                  (unless (eq total ntotal)
-                 (error "The numbers of total are different."))
+                 (error "The numbers of total are different"))
                (setq total ntotal)))
          (unless (< nn n)
            (unless (eq nn n)
index d0ff546..2a43a92 100644 (file)
@@ -312,7 +312,7 @@ If the charset is `composition', return the actual one."
 (defun mm-mime-charset (charset)
   "Return the MIME charset corresponding to the MULE CHARSET."
   (if (eq charset 'unknown)
-      (error "The message contains non-printable characters, please use attachment."))
+      (error "The message contains non-printable characters, please use attachment"))
   (if (and (fboundp 'coding-system-get) (fboundp 'get-charset-property))
       ;; This exists in Emacs 20.
       (or
index cc54995..9d64d57 100644 (file)
@@ -85,7 +85,7 @@
             (goto-char (match-end 0))
             (apply 'mml-insert-tag 'part (cons (if sign 'sign 'encrypt)
                                                (cons method tags))))
-           (t (error "The message is corrupted. No mail header separator."))))))
+           (t (error "The message is corrupted. No mail header separator"))))))
 
 (defun mml-secure-sign-pgpmime ()
   "Add MML tags to PGP/MIME sign this MML part."
index 3048c9a..57350b2 100644 (file)
        hash point)
     (goto-char (point-min))
     (unless (re-search-forward "^-----BEGIN PGP SIGNED MESSAGE-----\r?$" nil t)
-      (error "Cannot find signed begin line." ))
+      (error "Cannot find signed begin line"))
     (goto-char (match-beginning 0))
     (forward-line 1)
     (unless (looking-at "Hash:[ \t]*\\([a-zA-Z0-9]+\\)")
-      (error "Cannot not find PGP hash." ))
+      (error "Cannot not find PGP hash"))
     (setq hash (match-string 1))
     (unless (re-search-forward "^$" nil t)
-      (error "Cannot not find PGP message." ))
+      (error "Cannot not find PGP message"))
     (forward-line 1)
     (delete-region (point-min) (point))
     (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n"
     (setq point (point))
     (goto-char (point-max))
     (unless (re-search-backward "^-----END PGP SIGNATURE-----\r?$" nil t)
-      (error "Cannot find signature part." ))
+      (error "Cannot find signature part"))
     (replace-match "-----END PGP MESSAGE-----" t t)
     (goto-char (match-beginning 0))
     (unless (re-search-backward "^-----BEGIN PGP SIGNATURE-----\r?$"
                                nil t)
-      (error "Cannot find signature part." ))
+      (error "Cannot find signature part"))
     (replace-match "-----BEGIN PGP MESSAGE-----" t t)
     (goto-char (match-beginning 0))
     (save-restriction
        (message-options-get 'message-sender))))
   (goto-char (point-min))
   (unless (looking-at "-----BEGIN PGP MESSAGE-----")
-    (error "Fail to encrypt the message."))
+    (error "Fail to encrypt the message"))
   (let ((boundary
         (funcall mml-boundary-function (incf mml-multipart-number))))
     (insert (format "Content-Type: multipart/encrypted; boundary=\"%s\";\n"
                                 t t) ; armor & textmode
        (unless (> (point-max) (point-min))
          (pop-to-buffer mml2015-result-buffer)
-         (error "Sign error.")))
+         (error "Sign error")))
       (goto-char (point-min))
       (while (re-search-forward "\r+$" nil t)
        (replace-match "" t t))
                 t t) ; armor & textmode
          (unless (> (point-max) (point-min))
            (pop-to-buffer mml2015-result-buffer)
-           (error "Encrypt error.")))
+           (error "Encrypt error")))
        (goto-char (point-min))
        (while (re-search-forward "\r+$" nil t)
          (replace-match "" t t))
   (let ((func (nth 2 (assq mml2015-use mml2015-function-alist))))
     (if func
        (funcall func cont)
-      (error "Cannot find encrypt function."))))
+      (error "Cannot find encrypt function"))))
 
 ;;;###autoload
 (defun mml2015-sign (cont)
   (let ((func (nth 1 (assq mml2015-use mml2015-function-alist))))
     (if func
        (funcall func cont)
-      (error "Cannot find sign function."))))
+      (error "Cannot find sign function"))))
 
 ;;;###autoload
 (defun mml2015-self-encrypt ()
index 95cda05..74d8e4e 100644 (file)
@@ -404,7 +404,7 @@ If EXAMINE is non-nil the group is selected read-only."
                      "nnimap: Group %s is not uidvalid.  Continue? " group)))
                imap-current-mailbox
              (imap-mailbox-unselect)
-             (error "nnimap: Group %s is not uid-valid." group))
+             (error "nnimap: Group %s is not uid-valid" group))
          (nnheader-report 'nnimap (imap-error-text)))))))
 
 (defun nnimap-replace-whitespace (string)
index bc4bf58..636c2f1 100644 (file)
@@ -370,11 +370,12 @@ To use the description in headers, put this name into `nnmail-extra-headers'.")
               nnrss-directory)))
     (when (file-exists-p file)
       (with-temp-buffer
-       (let ((coding-system-for-read 'binary))
-         (insert-file-contents file))
-       (emacs-lisp-mode)
-       (goto-char (point-min))
-       (eval-buffer)))))
+       (let ((coding-system-for-read 'binary)
+              emacs-lisp-mode-hook)
+         (insert-file-contents file)
+          (emacs-lisp-mode)
+          (goto-char (point-min))
+          (eval-buffer))))))
 
 (defun nnrss-save-server-data (server)
   (gnus-make-directory nnrss-directory)
@@ -407,11 +408,12 @@ To use the description in headers, put this name into `nnmail-extra-headers'.")
               nnrss-directory)))
     (when (file-exists-p file)
       (with-temp-buffer
-       (let ((coding-system-for-read 'binary))
-         (insert-file-contents file))
-       (emacs-lisp-mode)
-       (goto-char (point-min))
-       (eval-buffer))
+       (let ((coding-system-for-read 'binary)
+              emacs-lisp-mode-hook)
+         (insert-file-contents file)
+          (emacs-lisp-mode)
+          (goto-char (point-min))
+          (eval-buffer)))
       (dolist (e nnrss-group-data)
        (gnus-sethash (nth 2 e) e nnrss-group-hashtb)
        (if (and (car e) (> nnrss-group-min (car e)))
index d12f861..9bbc569 100644 (file)
@@ -123,7 +123,7 @@ Used for APOP authentication.")
          ((equal 'pass pop3-authentication-scheme)
           (pop3-user process pop3-maildrop)
           (pop3-pass process))
-         (t (error "Invalid POP3 authentication scheme.")))
+         (t (error "Invalid POP3 authentication scheme")))
     (setq message-count (car (pop3-stat process)))
     (pop3-quit process)
     message-count))
@@ -293,7 +293,7 @@ If NOW, use that time instead."
   (pop3-send-command process (format "USER %s" user))
   (let ((response (pop3-read-response process t)))
     (if (not (and response (string-match "+OK" response)))
-       (error (format "USER %s not valid." user)))))
+       (error (format "USER %s not valid" user)))))
 
 (defun pop3-pass (process)
   "Send authentication information to the server."
index b6edfdf..4b8cff9 100644 (file)
@@ -176,7 +176,7 @@ Should be called narrowed to the head of the message."
                            (y-or-n-p
                             "Some texts are not encoded. Encode anyway?")))
                       (rfc2047-encode-region (point-min) (point-max))
-                    (error "Cannot send unencoded text."))))
+                    (error "Cannot send unencoded text"))))
             ((mm-coding-system-p method)
              (if (and (featurep 'mule)
                       (if (boundp 'default-enable-multibyte-characters)
index c0105cd..15f3ec9 100644 (file)
@@ -229,8 +229,7 @@ above them."
   "Toggle smiley at given point.
 Note -- this function hasn't been implemented yet."
   (interactive "e")
-  (error "This function hasn't been implemented yet.")
-)
+  (error "This function hasn't been implemented yet"))
 
 (defun smiley-toggle-extents (e)
   (interactive "e")
@@ -251,8 +250,7 @@ Note -- this function hasn't been implemented yet."
 ;; FIXME::
 (defun smiley-toggle-extents-ems (e)
   (interactive "e")
-  (error "This function hasn't been implemented yet.")
-)
+  (error "This function hasn't been implemented yet"))
 
 ;;;###autoload
 (defun smiley-buffer (&optional buffer st nd)
index 3bb9d9d..9b88f6c 100644 (file)
@@ -313,7 +313,7 @@ nil."
                     (if smime-CA-directory
                         (list "-CApath"
                               (expand-file-name smime-CA-directory))))))
-    (unless CAs (error "No CA configured."))
+    (unless CAs (error "No CA configured"))
     (with-current-buffer buffer
       (erase-buffer))
     (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify"