From fe594e071388508aa408f975b8d40c955cc3dbbd Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 28 Sep 2009 12:10:56 +0000 Subject: [PATCH] Synch with Emacs trunk. 2009-09-24 Juanma Barranquero * dig.el (dig-invoke): Fix typo in docstring. (query-dig): Reflow docstring. 2009-09-23 Juanma Barranquero * gnus-art.el (gnus-article-encrypt-body): * message.el (message-check-recipients): * mm-util.el (mm-codepage-setup): * nnir.el (gnus-summary-nnir-goto-thread, nnir-run-waissearch) (nnir-run-swish++, nnir-run-swish-e): Fix typos in error messages. 2009-09-21 Kevin Ryde * dig.el: Add "Keywords: comm", as per net-utils.el. 2009-09-21 Stefan Monnier * dig.el (dig-mode): Use define-derived-mode. 2009-09-19 Glenn Morris * pgg-pgp.el (pgg-pgp-encrypt-region): Add missing mapconcat separator. 2009-09-18 Glenn Morris * gnus-diary.el (gnus-diary-check-message): * message.el (message-insert-formatted-citation-line): * nnbabyl.el (top-level): * nndiary.el (nndiary-schedule): Fix typos in condition-case handlers. --- lisp/ChangeLog | 33 +++++++++++++++++++++++++++++++-- lisp/dig.el | 29 +++++++++++------------------ lisp/gnus-art.el | 2 +- lisp/gnus-diary.el | 8 ++++---- lisp/message.el | 7 +++---- lisp/mm-util.el | 4 ++-- lisp/nnbabyl.el | 2 +- lisp/nndiary.el | 6 +++--- lisp/nnir.el | 12 ++++++------ lisp/pgg-pgp.el | 7 +++---- 10 files changed, 65 insertions(+), 45 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6f540bd6..e968c071b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,15 @@ -2009-09-23 Katsumi Yamaoka +2009-09-24 Juanma Barranquero - * pgg-pgp.el (pgg-pgp-encrypt-region): Add 3rd arg to mapconcat. + * dig.el (dig-invoke): Fix typo in docstring. + (query-dig): Reflow docstring. + +2009-09-23 Juanma Barranquero + + * gnus-art.el (gnus-article-encrypt-body): + * message.el (message-check-recipients): + * mm-util.el (mm-codepage-setup): + * nnir.el (gnus-summary-nnir-goto-thread, nnir-run-waissearch) + (nnir-run-swish++, nnir-run-swish-e): Fix typos in error messages. 2009-09-22 Daiki Ueno @@ -10,6 +19,26 @@ * mml-smime.el (mml-smime-epg-sign, mml-smime-epg-encrypt): Ditto. * mml1991.el (mml1991-epg-sign, mml1991-epg-encrypt): Ditto. +2009-09-21 Kevin Ryde + + * dig.el: Add "Keywords: comm", as per net-utils.el. + +2009-09-21 Stefan Monnier + + * dig.el (dig-mode): Use define-derived-mode. + +2009-09-19 Glenn Morris + + * pgg-pgp.el (pgg-pgp-encrypt-region): Add missing mapconcat separator. + +2009-09-18 Glenn Morris + + * gnus-diary.el (gnus-diary-check-message): + * message.el (message-insert-formatted-citation-line): + * nnbabyl.el (top-level): + * nndiary.el (nndiary-schedule): + Fix typos in condition-case handlers. + 2009-09-15 Katsumi Yamaoka * gnus-art.el (gnus-article-edit-part): Work for the buffer diff --git a/lisp/dig.el b/lisp/dig.el index ecf66c61f..c3b5db19a 100644 --- a/lisp/dig.el +++ b/lisp/dig.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Author: Simon Josefsson -;; Keywords: DNS BIND dig +;; Keywords: DNS BIND dig comm ;; This file is part of GNU Emacs. @@ -68,10 +68,10 @@ If nil, use system defaults." query-type query-class query-option dig-option server) "Call dig with given arguments and return buffer containing output. -DOMAIN is a string with a DNS domain. QUERY-TYPE is an optional string -with a DNS type. QUERY-CLASS is an optional string with a DNS class. -QUERY-OPTION is an optional string with dig \"query options\". -DIG-OPTIONS is an optional string with parameters for the dig program. +DOMAIN is a string with a DNS domain. QUERY-TYPE is an optional +string with a DNS type. QUERY-CLASS is an optional string with a DNS +class. QUERY-OPTION is an optional string with dig \"query options\". +DIG-OPTION is an optional string with parameters for the dig program. SERVER is an optional string with a domain name server to query. Dig is an external program found in the BIND name server distribution, @@ -136,23 +136,16 @@ Buffer should contain output generated by `dig-invoke'." (define-key dig-mode-map "q" 'dig-exit)) -(defun dig-mode () +(define-derived-mode dig-mode nil "Dig" "Major mode for displaying dig output." - (interactive) - (kill-all-local-variables) - (setq mode-name "dig") - (setq major-mode 'dig-mode) - (use-local-map dig-mode-map) (buffer-disable-undo) (unless (featurep 'xemacs) (set (make-local-variable 'font-lock-defaults) '(dig-font-lock-keywords t))) (when (featurep 'font-lock) + ;; FIXME: what is this for?? --Stef (font-lock-set-defaults)) - (save-current-buffer - (if (fboundp 'run-mode-hooks) - (run-mode-hooks 'dig-mode-hook) - (run-hooks 'dig-mode-hook)))) + ) (defun dig-exit () "Quit dig output buffer." @@ -178,9 +171,9 @@ Optional arguments are passed to `dig-invoke'." (defun query-dig (domain &optional query-type query-class query-option dig-option server) "Query addresses of a DOMAIN using dig. -It works by calling `dig-invoke' and `dig-extract-rr'. Optional -arguments are passed to `dig-invoke' and `dig-extract-rr'. Returns -nil for domain/class/type queries that results in no data." +It works by calling `dig-invoke' and `dig-extract-rr'. +Optional arguments are passed to `dig-invoke' and `dig-extract-rr'. +Returns nil for domain/class/type queries that result in no data." (let ((buffer (dig-invoke domain query-type query-class query-option dig-option server))) (when buffer diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 826d5dc4c..fa13947d7 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -8316,7 +8316,7 @@ For example: (when (and gnus-article-encrypt-protocol gnus-novice-user) (unless (gnus-y-or-n-p "Really encrypt article(s)? ") - (error "Encrypt aborted."))) + (error "Encrypt aborted"))) (let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist)))) (unless func (error "Can't find the encrypt protocol %s" protocol)) diff --git a/lisp/gnus-diary.el b/lisp/gnus-diary.el index 630066afa..7ec4c6735 100644 --- a/lisp/gnus-diary.el +++ b/lisp/gnus-diary.el @@ -1,7 +1,7 @@ ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009 Free Software Foundation, Inc. ;; Author: Didier Verna ;; Maintainer: Didier Verna @@ -351,7 +351,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields." (condition-case () (nndiary-parse-schedule-value value (nth 1 head) (nth 2 head)) - (t + (error (setq invalid t))) ;; #### NOTE: this (along with the `gnus-diary-add-header' ;; function) could be rewritten in a better way, in particular @@ -378,7 +378,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields." (condition-case () (nndiary-parse-schedule-value value (nth 1 head) (nth 2 head)) - (t + (error (setq invalid t)))) (gnus-diary-add-header (concat header ": " value)) )) diff --git a/lisp/message.el b/lisp/message.el index 3c465b1a8..d6feaa0b3 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3822,9 +3822,8 @@ See `message-citation-line-format'." (>= i ?a))) (push i lst) (push (condition-case nil - (progn (format-time-string (format "%%%c" i) - replydate)) - (format ">%c<" i)) + (format-time-string (format "%%%c" i) replydate) + (error (format ">%c<" i))) lst)) (setq i (1+ i))) (reverse lst))) @@ -4248,7 +4247,7 @@ This function could be useful in `message-setup-hook'." (not (y-or-n-p (format "Address `%s' might be bogus. Continue? " bog))) - (error "Bogus address.")))))))) + (error "Bogus address")))))))) (custom-add-option 'message-setup-hook 'message-check-recipients) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index c423448d2..c6104462d 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -315,7 +315,7 @@ the alias. Else windows-NUMBER is used." (candidates (if (fboundp 'cp-supported-codepages) (cp-supported-codepages) ;; Removed in Emacs 23 (unicode), so signal an error: - (error "`codepage-setup' not present in this Emacs version.")))) + (error "`codepage-setup' not present in this Emacs version")))) (list (completing-read "Setup DOS Codepage: (default 437) " candidates nil t nil nil "437")))) (when alias @@ -326,7 +326,7 @@ the alias. Else windows-NUMBER is used." (unless (mm-coding-system-p cp) (if (fboundp 'codepage-setup) ; silence compiler (codepage-setup number) - (error "`codepage-setup' not present in this Emacs version."))) + (error "`codepage-setup' not present in this Emacs version"))) (when (and alias ;; Don't add alias if setup of cp failed. (mm-coding-system-p cp)) diff --git a/lisp/nnbabyl.el b/lisp/nnbabyl.el index 2b9b1e5f3..408634545 100644 --- a/lisp/nnbabyl.el +++ b/lisp/nnbabyl.el @@ -32,7 +32,7 @@ (require 'nnheader) (condition-case nil (require 'rmail) - (t (nnheader-message + (error (nnheader-message 5 "Ignore rmail errors from this file, you don't have rmail"))) (require 'nnmail) (require 'nnoo) diff --git a/lisp/nndiary.el b/lisp/nndiary.el index 9ba8e3794..c6821b0f8 100644 --- a/lisp/nndiary.el +++ b/lisp/nndiary.el @@ -1,7 +1,7 @@ ;;; nndiary.el --- A diary back end for Gnus -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009 Free Software Foundation, Inc. ;; Author: Didier Verna ;; Maintainer: Didier Verna @@ -368,7 +368,7 @@ all. This may very well take some time.") (setq head (nth 0 elt)) (nndiary-parse-schedule (nth 0 elt) (nth 1 elt) (nth 2 elt))) nndiary-headers) - (t + (error (nnheader-report 'nndiary "X-Diary-%s header parse error: %s." head (cdr arg)) nil)) diff --git a/lisp/nnir.el b/lisp/nnir.el index 452e67caa..d72bb69d5 100644 --- a/lisp/nnir.el +++ b/lisp/nnir.el @@ -690,7 +690,7 @@ The returned format is as `gnus-server-to-method' needs it. See and show thread that contains this article." (interactive) (unless (eq 'nnir (car (gnus-find-method-for-group gnus-newsgroup-name))) - (error "Can't execute this command unless in nnir group.")) + (error "Can't execute this command unless in nnir group")) (let* ((cur (gnus-summary-article-number)) (group (nnir-artlist-artitem-group nnir-artlist cur)) (backend-number (nnir-artlist-artitem-number nnir-artlist cur)) @@ -889,7 +889,7 @@ ready to be added to the list of search results." "Run given query agains waissearch. Returns vector of (group name, file name) pairs (also vectors, actually)." (when group - (error "The freeWAIS-sf backend cannot search specific groups.")) + (error "The freeWAIS-sf backend cannot search specific groups")) (save-excursion (let ((qstring (cdr (assq 'query query))) (prefix (nnir-read-server-parm 'nnir-wais-remove-prefix server)) @@ -1162,7 +1162,7 @@ Tested with swish++ 4.7 on GNU/Linux and with swish++ 5.0b2 on Windows NT 4.0." (when group - (error "The swish++ backend cannot search specific groups.")) + (error "The swish++ backend cannot search specific groups")) (save-excursion (let ( (qstring (cdr (assq 'query query))) @@ -1179,7 +1179,7 @@ Windows NT 4.0." score artno dirnam filenam) (when (equal "" qstring) - (error "swish++: You didn't enter anything.")) + (error "swish++: You didn't enter anything")) (set-buffer (get-buffer-create nnir-tmp-buffer)) (erase-buffer) @@ -1251,7 +1251,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0." ;; swish-e crashes with empty parameter to "-w" on commandline... (when group - (error "The swish-e backend cannot search specific groups.")) + (error "The swish-e backend cannot search specific groups")) (save-excursion (let ((qstring (cdr (assq 'query query))) @@ -1261,7 +1261,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0." artlist score artno dirnam group ) (when (equal "" qstring) - (error "swish-e: You didn't enter anything.")) + (error "swish-e: You didn't enter anything")) (set-buffer (get-buffer-create nnir-tmp-buffer)) (erase-buffer) diff --git a/lisp/pgg-pgp.el b/lisp/pgg-pgp.el index d13b399de..19d9a0ba2 100644 --- a/lisp/pgg-pgp.el +++ b/lisp/pgg-pgp.el @@ -1,7 +1,7 @@ ;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG. -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009 Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Created: 1999/11/02 @@ -145,8 +145,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." (mapconcat 'shell-quote-argument (append recipients (if pgg-encrypt-for-me - (list pgg-pgp-user-id))) - " ")) + (list pgg-pgp-user-id))) " ")) (if sign (concat " -s -u " (shell-quote-argument pgg-pgp-user-id)))))) (pgg-pgp-process-region start end nil pgg-pgp-program args) (pgg-process-when-success nil))) -- 2.25.1