# HG changeset patch # User Deepak Goel # Date 1196963802 0 # Node ID f358a2fd5895901dd077875c0998dbdbb3ca0ebf # Parent b63e2a5b45dd9cdfdac38ef6362416985dc848f3 Fix buggy calls to `error'. diff -r b63e2a5b45dd -r f358a2fd5895 lisp/ChangeLog --- 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 + + * 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 diff -r b63e2a5b45dd -r f358a2fd5895 lisp/allout.el --- 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) diff -r b63e2a5b45dd -r f358a2fd5895 lisp/bindings.el --- 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 diff -r b63e2a5b45dd -r f358a2fd5895 lisp/dired.el --- 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"))) diff -r b63e2a5b45dd -r f358a2fd5895 lisp/ediff-init.el --- 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 diff -r b63e2a5b45dd -r f358a2fd5895 lisp/ibuffer.el --- 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)) diff -r b63e2a5b45dd -r f358a2fd5895 lisp/man.el --- 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 () diff -r b63e2a5b45dd -r f358a2fd5895 lisp/vc-cvs.el --- 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 diff -r b63e2a5b45dd -r f358a2fd5895 lisp/vc-mcvs.el --- 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 diff -r b63e2a5b45dd -r f358a2fd5895 lisp/vc.el --- 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))) diff -r b63e2a5b45dd -r f358a2fd5895 lisp/wdired.el --- 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. diff -r b63e2a5b45dd -r f358a2fd5895 lisp/whitespace.el --- 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 ()