aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2012-02-10 23:59:29 +0800
committerLeo Liu2012-02-10 23:59:29 +0800
commit1be3ca5ad7173a1b1e2ca4065185c207a41883c9 (patch)
tree210644035309e3487fc729a5dd2bd2deda0bbbe2
parent25dec3650947892e638be48220024a7d1b1d8be8 (diff)
downloademacs-1be3ca5ad7173a1b1e2ca4065185c207a41883c9.tar.gz
emacs-1be3ca5ad7173a1b1e2ca4065185c207a41883c9.zip
Rename condition-case-no-debug to condition-case-unless-debug
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/control.texi10
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/desktop.el2
-rw-r--r--lisp/emacs-lisp/package.el4
-rw-r--r--lisp/font-lock.el2
-rw-r--r--lisp/nxml/rng-valid.el2
-rw-r--r--lisp/subr.el7
-rw-r--r--lisp/vc/diff-mode.el4
11 files changed, 44 insertions, 16 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 1e93d5dd737..d8e322790e7 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-02-10 Leo Liu <sdl.web@gmail.com>
2
3 * control.texi (Handling Errors): Change condition-case-no-debug
4 to condition-case-unless-debug.
5
12012-02-10 Chong Yidong <cyd@gnu.org> 62012-02-10 Chong Yidong <cyd@gnu.org>
2 7
3 * advice.texi (Defining Advice): Clarify ad-unadvise. 8 * advice.texi (Defining Advice): Clarify ad-unadvise.
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 3673f753a0a..c23c93300a6 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -948,8 +948,8 @@ The effect of @code{debug} here is only to prevent
948given error will invoke the debugger only if @code{debug-on-error} and 948given error will invoke the debugger only if @code{debug-on-error} and
949the other usual filtering mechanisms say it should. @xref{Error Debugging}. 949the other usual filtering mechanisms say it should. @xref{Error Debugging}.
950 950
951@defmac condition-case-no-debug var protected-form handlers@dots{} 951@defmac condition-case-unless-debug var protected-form handlers@dots{}
952The macro @code{condition-case-no-debug} provides another way to 952The macro @code{condition-case-unless-debug} provides another way to
953handle debugging of such forms. It behaves exactly like 953handle debugging of such forms. It behaves exactly like
954@code{condition-case}, unless the variable @code{debug-on-error} is 954@code{condition-case}, unless the variable @code{debug-on-error} is
955non-@code{nil}, in which case it does not handle any errors at all. 955non-@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
1131@defmac with-demoted-errors body@dots{} 1131@defmac with-demoted-errors body@dots{}
1132This macro is like a milder version of @code{ignore-errors}. Rather 1132This macro is like a milder version of @code{ignore-errors}. Rather
1133than suppressing errors altogether, it converts them into messages. 1133than suppressing errors altogether, it converts them into messages.
1134Use this form around code that is not expected to signal errors, 1134Use this form around code that is not expected to signal errors, but
1135but should be robust if one does occur. Note that this macro 1135should be robust if one does occur. Note that this macro uses
1136uses @code{condition-case-no-debug} rather than @code{condition-case}. 1136@code{condition-case-unless-debug} rather than @code{condition-case}.
1137@end defmac 1137@end defmac
1138 1138
1139@node Error Symbols 1139@node Error Symbols
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 93258d8c06c..1f1190b19d9 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
12012-02-10 Leo Liu <sdl.web@gmail.com>
2
3 * NEWS: Change condition-case-no-debug to
4 condition-case-unless-debug and split the entry in two.
5
12012-02-08 Alex Ott <alexott@gmail.com> 62012-02-08 Alex Ott <alexott@gmail.com>
2 7
3 * tutorials/TUTORIAL.ru: Updated; synchronize with TUTORIAL. 8 * tutorials/TUTORIAL.ru: Updated; synchronize with TUTORIAL.
diff --git a/etc/NEWS b/etc/NEWS
index df35fee46b9..944dd9b7a70 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1305,8 +1305,10 @@ set of "wrapping" filters, similar to around advice.
1305advertised at the time.) 1305advertised at the time.)
1306 1306
1307+++ 1307+++
1308** The macros `condition-case-no-debug' and `with-demoted-errors' were 1308** New macro `condition-case-unless-debug' (this was actually added in
1309added in Emacs 23.1, but not advertised. 1309Emacs 23.1 as condition-case-no-debug, but not advertised)
1310
1311** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised.
1310 1312
1311+++ 1313+++
1312** The new function `server-eval-at' allows evaluation of Lisp forms on 1314** The new function `server-eval-at' allows evaluation of Lisp forms on
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 69d32b4725a..52b9eb38374 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12012-02-10 Leo Liu <sdl.web@gmail.com>
2
3 * subr.el (condition-case-unless-debug): Rename from
4 condition-case-no-debug. All callers changed.
5 (with-demoted-errors): Fix caller.
6
7 * vc/diff-mode.el (diff-auto-refine-mode, diff-hunk):
8 * nxml/rng-valid.el (rng-do-some-validation):
9 * emacs-lisp/package.el (package-refresh-contents)
10 (package-menu-execute):
11 * desktop.el (desktop-create-buffer):
12 * font-lock.el (lisp-font-lock-keywords-2): caller changed.
13
12012-02-10 Glenn Morris <rgm@gnu.org> 142012-02-10 Glenn Morris <rgm@gnu.org>
2 15
3 * textmodes/bibtex.el: 16 * textmodes/bibtex.el:
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 2f79cc05e79..674ce72dba3 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1158,7 +1158,7 @@ directory DIRNAME."
1158 (desktop-load-file desktop-buffer-major-mode) 1158 (desktop-load-file desktop-buffer-major-mode)
1159 (let ((buffer-list (buffer-list)) 1159 (let ((buffer-list (buffer-list))
1160 (result 1160 (result
1161 (condition-case-no-debug err 1161 (condition-case-unless-debug err
1162 (funcall (or (cdr (assq desktop-buffer-major-mode 1162 (funcall (or (cdr (assq desktop-buffer-major-mode
1163 desktop-buffer-mode-handlers)) 1163 desktop-buffer-mode-handlers))
1164 'desktop-restore-file-buffer) 1164 'desktop-restore-file-buffer)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 317fa1fd23d..d80454ba269 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1103,7 +1103,7 @@ makes them available for download."
1103 (unless (file-exists-p package-user-dir) 1103 (unless (file-exists-p package-user-dir)
1104 (make-directory package-user-dir t)) 1104 (make-directory package-user-dir t))
1105 (dolist (archive package-archives) 1105 (dolist (archive package-archives)
1106 (condition-case-no-debug nil 1106 (condition-case-unless-debug nil
1107 (package--download-one-archive archive "archive-contents") 1107 (package--download-one-archive archive "archive-contents")
1108 (error (message "Failed to download `%s' archive." 1108 (error (message "Failed to download `%s' archive."
1109 (car archive))))) 1109 (car archive)))))
@@ -1608,7 +1608,7 @@ packages marked for deletion are removed."
1608 delete-list 1608 delete-list
1609 ", ")))) 1609 ", "))))
1610 (dolist (elt delete-list) 1610 (dolist (elt delete-list)
1611 (condition-case-no-debug err 1611 (condition-case-unless-debug err
1612 (package-delete (car elt) (cdr elt)) 1612 (package-delete (car elt) (cdr elt))
1613 (error (message (cadr err))))) 1613 (error (message (cadr err)))))
1614 (error "Aborted"))) 1614 (error "Aborted")))
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index befed33abba..9f9445bdea9 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2272,7 +2272,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
2272 "save-selected-window" "save-window-excursion" 2272 "save-selected-window" "save-window-excursion"
2273 "save-match-data" "save-current-buffer" 2273 "save-match-data" "save-current-buffer"
2274 "combine-after-change-calls" "unwind-protect" 2274 "combine-after-change-calls" "unwind-protect"
2275 "condition-case" "condition-case-no-debug" 2275 "condition-case" "condition-case-unless-debug"
2276 "track-mouse" "eval-after-load" "eval-and-compile" 2276 "track-mouse" "eval-after-load" "eval-and-compile"
2277 "eval-when-compile" "eval-when" "eval-next-after-load" 2277 "eval-when-compile" "eval-when" "eval-next-after-load"
2278 "with-case-table" "with-category-table" 2278 "with-case-table" "with-category-table"
diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index 6fc696361e8..61b583b56c2 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -475,7 +475,7 @@ The schema is set like `rng-auto-set-schema'."
475 (save-restriction 475 (save-restriction
476 (widen) 476 (widen)
477 (nxml-with-invisible-motion 477 (nxml-with-invisible-motion
478 (condition-case-no-debug err 478 (condition-case-unless-debug err
479 (and (rng-validate-prepare) 479 (and (rng-validate-prepare)
480 (let ((rng-dt-namespace-context-getter '(nxml-ns-get-context))) 480 (let ((rng-dt-namespace-context-getter '(nxml-ns-get-context)))
481 (nxml-with-unmodifying-text-property-changes 481 (nxml-with-unmodifying-text-property-changes
diff --git a/lisp/subr.el b/lisp/subr.el
index 6c79b3f88e2..00a030c744c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3219,7 +3219,7 @@ If BODY finishes, `while-no-input' returns whatever value BODY produced."
3219 (or (input-pending-p) 3219 (or (input-pending-p)
3220 (progn ,@body))))))) 3220 (progn ,@body)))))))
3221 3221
3222(defmacro condition-case-no-debug (var bodyform &rest handlers) 3222(defmacro condition-case-unless-debug (var bodyform &rest handlers)
3223 "Like `condition-case' except that it does not catch anything when debugging. 3223 "Like `condition-case' except that it does not catch anything when debugging.
3224More specifically if `debug-on-error' is set, then it does not catch any signal." 3224More specifically if `debug-on-error' is set, then it does not catch any signal."
3225 (declare (debug condition-case) (indent 2)) 3225 (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.
3231 (funcall ,bodysym) 3231 (funcall ,bodysym)
3232 ,@handlers))))) 3232 ,@handlers)))))
3233 3233
3234(define-obsolete-function-alias 'condition-case-no-debug
3235 'condition-case-unless-debug "24.1")
3236
3234(defmacro with-demoted-errors (&rest body) 3237(defmacro with-demoted-errors (&rest body)
3235 "Run BODY and demote any errors to simple messages. 3238 "Run BODY and demote any errors to simple messages.
3236If `debug-on-error' is non-nil, run BODY without catching its errors. 3239If `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
3238but which should be robust in the unexpected case that an error is signaled." 3241but which should be robust in the unexpected case that an error is signaled."
3239 (declare (debug t) (indent 0)) 3242 (declare (debug t) (indent 0))
3240 (let ((err (make-symbol "err"))) 3243 (let ((err (make-symbol "err")))
3241 `(condition-case-no-debug ,err 3244 `(condition-case-unless-debug ,err
3242 (progn ,@body) 3245 (progn ,@body)
3243 (error (message "Error: %S" ,err) nil)))) 3246 (error (message "Error: %S" ,err) nil))))
3244 3247
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 7de9d17e3f7..ba4a2766526 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -237,7 +237,7 @@ from disabled to enabled, it tries to refine the current hunk, as
237well." 237well."
238 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" 238 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
239 (when diff-auto-refine-mode 239 (when diff-auto-refine-mode
240 (condition-case-no-debug nil (diff-refine-hunk) (error nil)))) 240 (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
241 241
242;;;; 242;;;;
243;;;; font-lock support 243;;;; font-lock support
@@ -542,7 +542,7 @@ but in the file header instead, in which case move forward to the first hunk."
542(easy-mmode-define-navigation 542(easy-mmode-define-navigation
543 diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view 543 diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
544 (if diff-auto-refine-mode 544 (if diff-auto-refine-mode
545 (condition-case-no-debug nil (diff-refine-hunk) (error nil)))) 545 (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
546 546
547(easy-mmode-define-navigation 547(easy-mmode-define-navigation
548 diff-file diff-file-header-re "file" diff-end-of-hunk) 548 diff-file diff-file-header-re "file" diff-end-of-hunk)