]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix buggy calls to `error'.
authorDeepak Goel <deego@gnufans.org>
Thu, 6 Dec 2007 17:56:42 +0000 (17:56 +0000)
committerDeepak Goel <deego@gnufans.org>
Thu, 6 Dec 2007 17:56:42 +0000 (17:56 +0000)
12 files changed:
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

index 4c1132d0184bc6c51b121aa4dddbad24c602ea2b..1f36c70890069f27315922556ffa7ed96d03de97 100644 (file)
@@ -1,3 +1,25 @@
+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>
 
index 8878c56735fb730fbd2435ac3bf2440e273b86f7..c0175032bd86af3206a9efa84b2826a78dfc23c4 100644 (file)
@@ -1501,7 +1501,7 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
             (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)
index ca9f03c4c7c9738bbba54a65dba48716fd0a3b27..435c935a69c1a1b1d92448ea73d9534a8be33fd3 100644 (file)
@@ -616,7 +616,7 @@ language you are using."
     (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
index ab56579e718a47bc26f81f7c57fbe27d0e04fa40..51067e46001bc70b678fe66556aabdb323eae7e3 100644 (file)
@@ -2009,7 +2009,7 @@ Return the position of the beginning of the filename, or nil if none found."
               (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")))
index b46562b5fdefc79cf7d6fcf2403c159f6a529a4b..91c8f41bb13717aab9e16d03e1db6a880932d11b 100644 (file)
@@ -1576,7 +1576,7 @@ This default should work without changes."
         )
        ((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 @@ This default should work without changes."
         )
        ((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
index b09a3e26979a7b6f66df01c97636a7f3494f86fc..7ee2c973cfe4d673ee5acc8a9a0dcd57b69dbecc 100644 (file)
@@ -1392,7 +1392,7 @@ If point is on a group name, this function operates on that group."
     (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))
 
index 41f1d37bb181ae9afcb9415b746cb91ebf7e58f8..c3621be1c97358240d903b077ec5f174d2aaa699 100644 (file)
@@ -1077,7 +1077,7 @@ manpage command."
            (Man-notify-when-ready Man-buffer))
 
        (if err-mess
-           (error err-mess))
+           (error "%s" err-mess))
        ))))
 
 \f
@@ -1338,7 +1338,7 @@ Returns t if section is found, nil otherwise."
 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 ()
index c9c50fceba2fb0e5a8b19967e7d6022826a89f56..6d57a329b0c26c28d4ecbe86ac121cfa3dfdd5a4 100644 (file)
@@ -351,7 +351,7 @@ its parents."
        ((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
index b5a81866eca4bc24ccd5496c6806bdfd3adc48b5..c3b68f8aeaf260cb6d51a3c5c3dd1a28648397cd 100644 (file)
@@ -294,7 +294,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
        ((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
index 622c9682fbc9703903dd186412ec73cfd271b31b..b54373a4e22cf62a124b16673934a663ce3c29ea 100644 (file)
@@ -2619,10 +2619,10 @@ changes from the current branch are merged into the working file."
        (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)))
index 39d27d578481a8eacb8208d6ae306a9b25b1e214..2ab9306da432281f9587525a8d2906b998c1841c 100644 (file)
@@ -492,7 +492,7 @@ Optional arguments are ignored."
   (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.
index f6c94534a00dc61315ec94f49ccb4724c5e034a9..896668fd569d962d35a0b9b286f205b97418f6e1 100644 (file)
@@ -789,8 +789,8 @@ This is meant to be added buffer-locally to `write-file-functions'."
        (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 ()