]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename condition-case-no-debug to condition-case-unless-debug
authorLeo Liu <sdl.web@gmail.com>
Fri, 10 Feb 2012 15:59:29 +0000 (23:59 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 10 Feb 2012 15:59:29 +0000 (23:59 +0800)
doc/lispref/ChangeLog
doc/lispref/control.texi
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/desktop.el
lisp/emacs-lisp/package.el
lisp/font-lock.el
lisp/nxml/rng-valid.el
lisp/subr.el
lisp/vc/diff-mode.el

index 1e93d5dd737e6ba057a1ebe6358056452cb217e8..d8e322790e779c8182bf73365650155bb377d5c6 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-10  Leo Liu  <sdl.web@gmail.com>
+
+       * control.texi (Handling Errors): Change condition-case-no-debug
+       to condition-case-unless-debug.
+
 2012-02-10  Chong Yidong  <cyd@gnu.org>
 
        * advice.texi (Defining Advice): Clarify ad-unadvise.
index 3673f753a0af8394b3c14bff38bd955a2ea4d72f..c23c93300a6a03285c307229e778534e6afb530f 100644 (file)
@@ -948,8 +948,8 @@ The effect of @code{debug} here is only to prevent
 given error will invoke the debugger only if @code{debug-on-error} and
 the other usual filtering mechanisms say it should.  @xref{Error Debugging}.
 
-@defmac condition-case-no-debug var protected-form handlers@dots{}
-The macro @code{condition-case-no-debug} provides another way to
+@defmac condition-case-unless-debug var protected-form handlers@dots{}
+The macro @code{condition-case-unless-debug} provides another way to
 handle debugging of such forms.  It behaves exactly like
 @code{condition-case}, unless the variable @code{debug-on-error} is
 non-@code{nil}, in which case it does not handle any errors at all.
@@ -1131,9 +1131,9 @@ Here's the example at the beginning of this subsection rewritten using
 @defmac with-demoted-errors body@dots{}
 This macro is like a milder version of @code{ignore-errors}.  Rather
 than suppressing errors altogether, it converts them into messages.
-Use this form around code that is not expected to signal errors,
-but should be robust if one does occur.  Note that this macro
-uses @code{condition-case-no-debug} rather than @code{condition-case}.
+Use this form around code that is not expected to signal errors, but
+should be robust if one does occur.  Note that this macro uses
+@code{condition-case-unless-debug} rather than @code{condition-case}.
 @end defmac
 
 @node Error Symbols
index 93258d8c06c17e14933ca954c4799a6e1694ef78..1f1190b19d966dba325da1341cf147b3ff13ea85 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-10  Leo Liu  <sdl.web@gmail.com>
+
+       * NEWS: Change condition-case-no-debug to
+       condition-case-unless-debug and split the entry in two.
+
 2012-02-08  Alex Ott  <alexott@gmail.com>
 
        * tutorials/TUTORIAL.ru: Updated; synchronize with TUTORIAL.
index df35fee46b9b88e088f60de66532fb77735f6b5d..944dd9b7a7027f12be17820ed04dcb8719cc59b2 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1305,8 +1305,10 @@ set of "wrapping" filters, similar to around advice.
 advertised at the time.)
 
 +++
-** The macros `condition-case-no-debug' and `with-demoted-errors' were
-added in Emacs 23.1, but not advertised.
+** New macro `condition-case-unless-debug' (this was actually added in
+Emacs 23.1 as condition-case-no-debug, but not advertised)
+
+** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised.
 
 +++
 ** The new function `server-eval-at' allows evaluation of Lisp forms on
index 69d32b4725af50ddacf9b22f5cffe84e9d866bd2..52b9eb383744a96f6c1758073966661e9b270a56 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-10  Leo Liu  <sdl.web@gmail.com>
+
+       * subr.el (condition-case-unless-debug): Rename from
+       condition-case-no-debug.  All callers changed.
+       (with-demoted-errors): Fix caller.
+
+       * vc/diff-mode.el (diff-auto-refine-mode, diff-hunk):
+       * nxml/rng-valid.el (rng-do-some-validation):
+       * emacs-lisp/package.el (package-refresh-contents)
+       (package-menu-execute):
+       * desktop.el (desktop-create-buffer):
+       * font-lock.el (lisp-font-lock-keywords-2): caller changed.
+
 2012-02-10  Glenn Morris  <rgm@gnu.org>
 
        * textmodes/bibtex.el:
index 2f79cc05e799f79bbe2d78ca1add51970b05b18d..674ce72dba364dc7062ec68e6c0f0517e1f9bd5d 100644 (file)
@@ -1158,7 +1158,7 @@ directory DIRNAME."
       (desktop-load-file desktop-buffer-major-mode)
       (let ((buffer-list (buffer-list))
            (result
-            (condition-case-no-debug err
+            (condition-case-unless-debug err
                 (funcall (or (cdr (assq desktop-buffer-major-mode
                                         desktop-buffer-mode-handlers))
                              'desktop-restore-file-buffer)
index 317fa1fd23dc5268e2c02f8b8703ac10cb576e44..d80454ba269caa53498136b7a881690eeb3a7d15 100644 (file)
@@ -1103,7 +1103,7 @@ makes them available for download."
   (unless (file-exists-p package-user-dir)
     (make-directory package-user-dir t))
   (dolist (archive package-archives)
-    (condition-case-no-debug nil
+    (condition-case-unless-debug nil
        (package--download-one-archive archive "archive-contents")
       (error (message "Failed to download `%s' archive."
                      (car archive)))))
@@ -1608,7 +1608,7 @@ packages marked for deletion are removed."
                                delete-list
                                ", "))))
          (dolist (elt delete-list)
-           (condition-case-no-debug err
+           (condition-case-unless-debug err
                (package-delete (car elt) (cdr elt))
              (error (message (cadr err)))))
        (error "Aborted")))
index befed33abba16c67e34a6462ffe5e559819bfd11..9f9445bdea96e01d42636d3b9fb24ffc72fffd51 100644 (file)
@@ -2272,7 +2272,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
                 "save-selected-window" "save-window-excursion"
                 "save-match-data" "save-current-buffer"
                 "combine-after-change-calls" "unwind-protect"
-                "condition-case" "condition-case-no-debug"
+                "condition-case" "condition-case-unless-debug"
                 "track-mouse" "eval-after-load" "eval-and-compile"
                 "eval-when-compile" "eval-when" "eval-next-after-load"
                 "with-case-table" "with-category-table"
index 6fc696361e8890a2ea2156d87b824e5bd8955c43..61b583b56c2e7e6704517a82b2b1130ba0754447 100644 (file)
@@ -475,7 +475,7 @@ The schema is set like `rng-auto-set-schema'."
     (save-restriction
       (widen)
       (nxml-with-invisible-motion
-       (condition-case-no-debug err
+       (condition-case-unless-debug err
            (and (rng-validate-prepare)
                 (let ((rng-dt-namespace-context-getter '(nxml-ns-get-context)))
                   (nxml-with-unmodifying-text-property-changes
index 6c79b3f88e2c7c0492cb686e94c8ee600626e043..00a030c744ced791dc76e4d239f863d7b4d10c76 100644 (file)
@@ -3219,7 +3219,7 @@ If BODY finishes, `while-no-input' returns whatever value BODY produced."
           (or (input-pending-p)
               (progn ,@body)))))))
 
-(defmacro condition-case-no-debug (var bodyform &rest handlers)
+(defmacro condition-case-unless-debug (var bodyform &rest handlers)
   "Like `condition-case' except that it does not catch anything when debugging.
 More specifically if `debug-on-error' is set, then it does not catch any signal."
   (declare (debug condition-case) (indent 2))
@@ -3231,6 +3231,9 @@ More specifically if `debug-on-error' is set, then it does not catch any signal.
              (funcall ,bodysym)
            ,@handlers)))))
 
+(define-obsolete-function-alias 'condition-case-no-debug
+  'condition-case-unless-debug "24.1")
+
 (defmacro with-demoted-errors (&rest body)
   "Run BODY and demote any errors to simple messages.
 If `debug-on-error' is non-nil, run BODY without catching its errors.
@@ -3238,7 +3241,7 @@ This is to be used around code which is not expected to signal an error
 but which should be robust in the unexpected case that an error is signaled."
   (declare (debug t) (indent 0))
   (let ((err (make-symbol "err")))
-    `(condition-case-no-debug ,err
+    `(condition-case-unless-debug ,err
          (progn ,@body)
        (error (message "Error: %S" ,err) nil))))
 
index 7de9d17e3f77bffbc0e67be03c975d04b171be30..ba4a276652637f05ed21c9261fd96281650c3f31 100644 (file)
@@ -237,7 +237,7 @@ from disabled to enabled, it tries to refine the current hunk, as
 well."
   :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
   (when diff-auto-refine-mode
-    (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
+    (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
 
 ;;;;
 ;;;; font-lock support
@@ -542,7 +542,7 @@ but in the file header instead, in which case move forward to the first hunk."
 (easy-mmode-define-navigation
  diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
  (if diff-auto-refine-mode
-     (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
+     (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
 
 (easy-mmode-define-navigation
  diff-file diff-file-header-re "file" diff-end-of-hunk)