changeset 87169:ac7eee19fc7e

Improves calls to `error', per mail from RMS.
author Deepak Goel <deego@gnufans.org>
date Sat, 08 Dec 2007 00:57:23 +0000
parents 6f2a76e2f476
children e50a2e215441
files lisp/ChangeLog lisp/mail/feedmail.el lisp/mail/uce.el lisp/progmodes/ada-xref.el lisp/progmodes/idlw-shell.el lisp/progmodes/vhdl-mode.el
diffstat 6 files changed, 22 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/ChangeLog	Sat Dec 08 00:57:23 2007 +0000
@@ -1,3 +1,13 @@
+2007-12-07  D. Goel  <deego3@gmail.com>
+
+	* progmodes/idlw-shell.el (idlwave-shell-display-line)
+	* progmodes/ada-xref.el (ada-find-file, ada-get-all-references)
+	(ada-xref-find-in-modified-ali, ada-find-in-src-path)
+	* mail/uce.el (uce-reply-to-uce)
+	* progmodes/vhdl-mode.el (vhdl-template-modify)
+	* mail/feedmail.el (feedmail-dump-message-to-queue): Improve calls
+	to `error' (as suggested by RMS.)
+
 2007-12-07  Glenn Morris  <rgm@gnu.org>
 
 	* allout.el (allout-write-file-hook-handler):
--- a/lisp/mail/feedmail.el	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/mail/feedmail.el	Sat Dec 08 00:57:23 2007 +0000
@@ -1922,7 +1922,7 @@
       ;; progn to get nil result no matter what
       (progn (make-directory queue-directory t) nil)
       (file-accessible-directory-p queue-directory)
-      (error "%s" (concat "FQM: Message not queued; trouble with directory " queue-directory)))
+      (error "FQM: Message not queued; trouble with directory %s" queue-directory))
   (let ((filename)
 	(is-fqm)
 	(is-in-this-dir)
--- a/lisp/mail/uce.el	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/mail/uce.el	Sat Dec 08 00:57:23 2007 +0000
@@ -239,7 +239,7 @@
 	(full-header-p (and (eq uce-mail-reader 'rmail)
 			    (not (rmail-msg-is-pruned)))))
     (or (get-buffer message-buffer)
-	(error "%s" (concat "No buffer " message-buffer ", cannot find UCE")))
+	(error "No buffer %s, cannot find UCE" message-buffer))
     (switch-to-buffer message-buffer)
     ;; We need the message with headers pruned.
     (if full-header-p
--- a/lisp/progmodes/ada-xref.el	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/progmodes/ada-xref.el	Sat Dec 08 00:57:23 2007 +0000
@@ -564,7 +564,7 @@
   (let ((file (ada-find-src-file-in-dir filename)))
     (if file
 	(find-file file)
-      (error "%s" (concat filename " not found in src_dir")))))
+      (error "%s not found in src_dir" filename))))
 
 
 ;; ----- Utilities -------------------------------------------------
@@ -1722,8 +1722,8 @@
 	  ;; No more idea to find the declaration.  Give up
 	  (progn
 	    (kill-buffer ali-buffer)
-	    (error "%s" (concat "No declaration of " (ada-name-of identlist)
-			   " found."))
+
+	    (error "No declaration of %s found." (ada-name-of identlist))
 	    )))
       )
 
@@ -1808,10 +1808,8 @@
 	   ;; none => error
 	   ((= len 0)
 	    (kill-buffer (current-buffer))
-	    (error "%s" (concat "No declaration of "
-			   (ada-name-of identlist)
-			   " recorded in .ali file")))
-
+	    (error "No declaration of %s recorded in .ali file"
+		   (ada-name-of identlist)))
 	   ;; one => should be the right one
 	   ((= len 1)
 	    (goto-line (caar declist)))
@@ -2011,7 +2009,7 @@
 				  (string-to-number (nth 2 (car list)))
 				  identlist
 				  other-frame)
-	(error "%s" (concat (caar list) " not found in src_dir")))
+	(error "%s not found in src_dir"  (caar list)))
       (message "This is only a (good) guess at the cross-reference.")
       )
 
--- a/lisp/progmodes/idlw-shell.el	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/progmodes/idlw-shell.el	Sat Dec 08 00:57:23 2007 +0000
@@ -2375,7 +2375,7 @@
     (if (not (idlwave-shell-valid-frame frame))
 	;; fixme: errors are dangerous in shell filters.  but i think i
 	;; have never encountered this one.
-        (error "%s" (concat "invalid frame - unable to access file: " (car frame)))
+        (error "invalid frame - unable to access file: %s" (car frame))
 ;;;
 ;;; buffer : the buffer to display a line in.
 ;;; select-shell: current buffer is the shell.
--- a/lisp/progmodes/vhdl-mode.el	Fri Dec 07 11:05:08 2007 +0000
+++ b/lisp/progmodes/vhdl-mode.el	Sat Dec 08 00:57:23 2007 +0000
@@ -9095,8 +9095,9 @@
 	 (progn (delete-region (point) (progn (end-of-line) (point)))
 		(vhdl-template-insert-date))
        (unless noerror
-	 (error "%s" (concat "ERROR:  Modification date prefix string \""
-			vhdl-modify-date-prefix-string "\" not found")))))))
+	 (error "ERROR:  Modification date prefix string \"%s\" not found"
+			vhdl-modify-date-prefix-string))))))
+
 
 (defun vhdl-template-modify-noerror ()
   "Call `vhdl-template-modify' with NOERROR non-nil."