From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r107126: Document yet more things that were never added to NEWS Date: Thu, 09 Feb 2012 15:47:28 +0800 Message-ID: References: <9c4nv0pmlf.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1328773678 22236 80.91.229.3 (9 Feb 2012 07:47:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2012 07:47:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 08:47:57 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvOjV-0001ZM-9H for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 08:47:57 +0100 Original-Received: from localhost ([::1]:58153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvOjU-0006Pz-Kz for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 02:47:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvOjQ-0006PW-Mv for emacs-devel@gnu.org; Thu, 09 Feb 2012 02:47:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvOjN-0006ry-4X for emacs-devel@gnu.org; Thu, 09 Feb 2012 02:47:52 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvOjM-0006rf-Gg for emacs-devel@gnu.org; Thu, 09 Feb 2012 02:47:49 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RvOjI-0001Tz-Eg for emacs-devel@gnu.org; Thu, 09 Feb 2012 08:47:44 +0100 Original-Received: from 119.255.41.67 ([119.255.41.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Feb 2012 08:47:44 +0100 Original-Received: from sdl.web by 119.255.41.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Feb 2012 08:47:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 182 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 119.255.41.67 Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (Mac OS X 10.6.8) Cancel-Lock: sha1:22HL7IvZnqtRFxTqyjAXmbcV6D0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148395 Archived-At: --=-=-= Content-Type: text/plain On 2012-02-09 14:54 +0800, Glenn Morris wrote: > Suggest: > > ** 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. Thanks. Newly generated patch attached. Leo --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=ccud2.diff Content-Description: ccud2.diff === modified file 'doc/lispref/control.texi' --- doc/lispref/control.texi 2012-02-06 00:48:02 +0000 +++ doc/lispref/control.texi 2012-02-09 03:25:47 +0000 @@ -948,8 +948,8 @@ 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 @@ @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 === modified file 'etc/NEWS' --- etc/NEWS 2012-02-09 07:28:32 +0000 +++ etc/NEWS 2012-02-09 07:43:49 +0000 @@ -1297,8 +1297,10 @@ 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 === modified file 'lisp/desktop.el' --- lisp/desktop.el 2012-01-19 07:21:25 +0000 +++ lisp/desktop.el 2012-02-09 03:26:20 +0000 @@ -1158,7 +1158,7 @@ (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) === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2012-01-28 09:49:29 +0000 +++ lisp/emacs-lisp/package.el 2012-02-09 03:26:33 +0000 @@ -1103,7 +1103,7 @@ (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 @@ 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"))) === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2012-02-05 02:27:35 +0000 +++ lisp/font-lock.el 2012-02-09 03:26:41 +0000 @@ -2272,7 +2272,7 @@ "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" === modified file 'lisp/nxml/rng-valid.el' --- lisp/nxml/rng-valid.el 2012-01-19 07:21:25 +0000 +++ lisp/nxml/rng-valid.el 2012-02-09 03:26:48 +0000 @@ -475,7 +475,7 @@ (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 === modified file 'lisp/subr.el' --- lisp/subr.el 2012-02-09 06:02:33 +0000 +++ lisp/subr.el 2012-02-09 06:49:29 +0000 @@ -3219,7 +3219,7 @@ (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 @@ (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 @@ 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)))) === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/vc/diff-mode.el 2012-02-09 03:29:04 +0000 @@ -237,7 +237,7 @@ 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 @@ (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) --=-=-=--