changeset 87139:f358a2fd5895

Fix buggy calls to `error'.
author Deepak Goel <deego@gnufans.org>
date Thu, 06 Dec 2007 17:56:42 +0000
parents b63e2a5b45dd
children 9c91533a901a
files lisp/ChangeLog lisp/allout.el lisp/bindings.el lisp/dired.el lisp/ediff-init.el lisp/ibuffer.el lisp/man.el lisp/vc-cvs.el lisp/vc-mcvs.el lisp/vc.el lisp/wdired.el lisp/whitespace.el
diffstat 12 files changed, 38 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/ChangeLog	Thu Dec 06 17:56:42 2007 +0000
@@ -1,4 +1,26 @@
-
+2007-12-06  D. Goel  <deego3@gmail.com>
+
+	* whitespace.el (whitespace-write-file-hook): Ditto.
+
+	* wdired.el (wdired-check-kill-buffer): Ditto.
+
+	* vc.el (vc-update): Ditto.
+
+	* vc-mcvs.el (vc-mcvs-checkin): Ditto.
+
+	* vc-cvs.el (vc-cvs-checkin): Ditto.
+
+	* man.el (Man-bgproc-sentinel): Ditto.
+	(Man-goto-see-also-section): Ditto.
+
+	* ibuffer.el (ibuffer-current-buffer): Ditto.
+
+	* dired.el (dired-move-to-end-of-filename): Ditto.
+
+	* bindings.el (complete-symbol): Ditto.
+
+	* allout.el (allout-write-file-hook-handler): Fix buggy call(s) to `error'.
+
 2007-12-06  D. Goel  <deego3@gmail.com>
 
 
--- a/lisp/allout.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/allout.el	Thu Dec 06 17:56:42 2007 +0000
@@ -1501,7 +1501,7 @@
             (condition-case failure
                 (setq allout-after-save-decrypt
                       (allout-encrypt-decrypted except-mark))
-              (error (progn
+              (error "%s" (progn
                        (message
                         "allout-write-file-hook-handler suppressing error %s"
                         failure)
--- a/lisp/bindings.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/bindings.el	Thu Dec 06 17:56:42 2007 +0000
@@ -616,7 +616,7 @@
     (if (fboundp 'complete-tag)
 	(complete-tag)
       ;; Don't autoload etags if we have no tags table.
-      (error (substitute-command-keys
+      (error "%s" (substitute-command-keys
 	      "No tags table loaded; use \\[visit-tags-table] to load one")))))
 
 ;; Reduce total amount of space we must allocate during this function
--- a/lisp/dired.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/dired.el	Thu Dec 06 17:56:42 2007 +0000
@@ -2009,7 +2009,7 @@
 	       (forward-char -1))))
       (or no-error
 	  (not (eq opoint (point)))
-	  (error (if hidden
+	  (error "%s" (if hidden
 		     (substitute-command-keys
 		      "File line is hidden, type \\[dired-hide-subdir] to unhide")
 		   "No file on this line")))
--- a/lisp/ediff-init.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/ediff-init.el	Thu Dec 06 17:56:42 2007 +0000
@@ -1576,7 +1576,7 @@
 	 )
 	((ediff-key-press-event-p event)
 	 (point))
-	(t (error nil))))
+	(t (error "Error"))))
 
 (defun ediff-event-buffer (event)
   (cond ((ediff-mouse-event-p event)
@@ -1587,7 +1587,7 @@
 	 )
 	((ediff-key-press-event-p event)
 	 (current-buffer))
-	(t (error nil))))
+	(t (error "Error"))))
 
 (defun ediff-event-key (event-or-key)
   (ediff-cond-compile-for-xemacs-or-emacs
--- a/lisp/ibuffer.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/ibuffer.el	Thu Dec 06 17:56:42 2007 +0000
@@ -1392,7 +1392,7 @@
     (when must-be-live
       (if (bufferp buf)
 	  (unless (buffer-live-p buf)
-	    (error (substitute-command-keys "Buffer %s has been killed; use `\\[ibuffer-update]' to update") buf))
+	    (error "%s" (substitute-command-keys "Buffer %s has been killed; use `\\[ibuffer-update]' to update") buf))
 	(error "No buffer on this line")))
     buf))
 
--- a/lisp/man.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/man.el	Thu Dec 06 17:56:42 2007 +0000
@@ -1077,7 +1077,7 @@
 	    (Man-notify-when-ready Man-buffer))
 
 	(if err-mess
-	    (error err-mess))
+	    (error "%s" err-mess))
 	))))
 
 
@@ -1338,7 +1338,7 @@
 Actually the section moved to is described by `Man-see-also-regexp'."
   (interactive)
   (if (not (Man-find-section Man-see-also-regexp))
-      (error (concat "No " Man-see-also-regexp
+      (error "%s" (concat "No " Man-see-also-regexp
 		     " section found in the current manpage"))))
 
 (defun Man-possibly-hyphenated-word ()
--- a/lisp/vc-cvs.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/vc-cvs.el	Thu Dec 06 17:56:42 2007 +0000
@@ -351,7 +351,7 @@
        ((re-search-forward "Up-to-date check failed" nil t)
 	(mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge))
 	      files)
-        (error (substitute-command-keys
+        (error "%s" (substitute-command-keys
                 (concat "Up-to-date check failed: "
                         "type \\[vc-next-action] to merge in changes"))))
        (t
--- a/lisp/vc-mcvs.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/vc-mcvs.el	Thu Dec 06 17:56:42 2007 +0000
@@ -294,7 +294,7 @@
        ((re-search-forward "Up-to-date check failed" nil t)
 	(mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge))
 	      files)
-        (error (substitute-command-keys
+        (error "%s" (substitute-command-keys
                 (concat "Up-to-date check failed: "
                         "type \\[vc-next-action] to merge in changes"))))
        (t
--- a/lisp/vc.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/vc.el	Thu Dec 06 17:56:42 2007 +0000
@@ -2619,10 +2619,10 @@
 	(vc-checkout file nil "")
       (if (eq (vc-checkout-model file) 'locking)
 	  (if (eq (vc-state file) 'edited)
-	      (error
+	      (error "%s"
 	       (substitute-command-keys
 		"File is locked--type \\[vc-revert] to discard changes"))
-	    (error
+	    (error "%s"
 	     (substitute-command-keys
 	      "Unexpected file state (%s)--type \\[vc-next-action] to correct")
 	     (vc-state file)))
--- a/lisp/wdired.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/wdired.el	Thu Dec 06 17:56:42 2007 +0000
@@ -492,7 +492,7 @@
   (if (and
        (buffer-modified-p)
        (not (y-or-n-p "Buffer changed. Discard changes and kill buffer? ")))
-      (error nil)))
+      (error "Error.")))
 
 (defun wdired-next-line (arg)
   "Move down lines then position at filename or the current column.
--- a/lisp/whitespace.el	Thu Dec 06 17:25:03 2007 +0000
+++ b/lisp/whitespace.el	Thu Dec 06 17:56:42 2007 +0000
@@ -789,8 +789,8 @@
 	(whitespace-cleanup-internal)
       (setq werr (whitespace-buffer)))
     (if (and whitespace-abort-on-error werr)
-	(error (concat "Abort write due to whitespaces in "
-		       buffer-file-name))))
+	(error "Abort write due to whitespaces in %s"
+		       buffer-file-name)))
   nil)
 
 (defun whitespace-unload-function ()