aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-09-10 11:30:10 -0400
committerStefan Monnier2013-09-10 11:30:10 -0400
commit8c27f5ff1df300aa313b1385442bc2374979f862 (patch)
tree754505334854d6a6dcf18e62e69edf7da71f9775
parentc2a918ae6ed054c4c09483619f1599605cc140b4 (diff)
downloademacs-8c27f5ff1df300aa313b1385442bc2374979f862.tar.gz
emacs-8c27f5ff1df300aa313b1385442bc2374979f862.zip
* lisp/subr.el (with-demoted-errors): Add `format' argument.
* src/eval.c (Feval): Document the new use of `lexical'.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog44
-rw-r--r--lisp/subr.el18
-rw-r--r--src/ChangeLog8
-rw-r--r--src/eval.c4
5 files changed, 48 insertions, 29 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 7da67efeadd..9914da31859 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -617,6 +617,9 @@ in the presence of files with negative time stamps.
617 617
618* Lisp Changes in Emacs 24.4 618* Lisp Changes in Emacs 24.4
619 619
620** The second argument of `eval' can now be a lexical-environment.
621
622** `with-demoted-errors' takes an additional argument `format'.
620+++ 623+++
621** New function `define-error'. 624** New function `define-error'.
622 625
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fc73e563883..ff6ec4755b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * subr.el (with-demoted-errors): Add `format' argument.
4
12013-09-10 Michael Albinus <michael.albinus@gmx.de> 52013-09-10 Michael Albinus <michael.albinus@gmx.de>
2 6
3 * net/tramp.el (tramp-cleanup): Remove. Functionality added to 7 * net/tramp.el (tramp-cleanup): Remove. Functionality added to
@@ -10,11 +14,11 @@
10 * net/tramp-adb.el (tramp-adb-maybe-open-connection): 14 * net/tramp-adb.el (tramp-adb-maybe-open-connection):
11 * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell) 15 * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell)
12 (tramp-maybe-open-connection): 16 (tramp-maybe-open-connection):
13 * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use 17 * net/tramp-smb.el (tramp-smb-maybe-open-connection):
14 `tramp-cleanup-connection'. 18 Use `tramp-cleanup-connection'.
15 19
16 * net/tramp-sh.el (tramp-maybe-open-connection): Catch 20 * net/tramp-sh.el (tramp-maybe-open-connection):
17 'uname-changed inside the progress reporter. 21 Catch 'uname-changed inside the progress reporter.
18 22
192013-09-10 Glenn Morris <rgm@gnu.org> 232013-09-10 Glenn Morris <rgm@gnu.org>
20 24
@@ -34,15 +38,15 @@
34 38
35 * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize' 39 * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
36 only if it is bound. It isn't for XEmacs. 40 only if it is bound. It isn't for XEmacs.
37 (with-tramp-progress-reporter): Do not let-bind `result'. This 41 (with-tramp-progress-reporter): Do not let-bind `result'.
38 yields to scoping errors in XEmacs. 42 This yields to scoping errors in XEmacs.
39 (tramp-handle-make-auto-save-file-name): New function, moved from 43 (tramp-handle-make-auto-save-file-name): New function, moved from
40 tramp-sh.el. 44 tramp-sh.el.
41 45
42 * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler 46 * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
43 for `make-auto-save-file-name'. 47 for `make-auto-save-file-name'.
44 (tramp-adb--gnu-switches-to-ash): Use 48 (tramp-adb--gnu-switches-to-ash):
45 `tramp-compat-replace-regexp-in-string'. 49 Use `tramp-compat-replace-regexp-in-string'.
46 50
47 * net/tramp-cache.el (tramp-cache-print): Call 51 * net/tramp-cache.el (tramp-cache-print): Call
48 `substring-no-properties' only if it is bound. It isn't for XEmacs. 52 `substring-no-properties' only if it is bound. It isn't for XEmacs.
@@ -50,8 +54,8 @@
50 * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is 54 * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
51 bound. It isn't for XEmacs. 55 bound. It isn't for XEmacs.
52 56
53 * net/tramp-compat.el (tramp-compat-copy-file): Catch 57 * net/tramp-compat.el (tramp-compat-copy-file):
54 `wrong-number-of-arguments' error. 58 Catch `wrong-number-of-arguments' error.
55 (tramp-compat-replace-regexp-in-string): New defun. 59 (tramp-compat-replace-regexp-in-string): New defun.
56 60
57 * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler 61 * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
@@ -62,21 +66,21 @@
62 (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'. 66 (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
63 (tramp-synce-list-devices): Use `push' instead of `pushnew'. 67 (tramp-synce-list-devices): Use `push' instead of `pushnew'.
64 68
65 * net/tramp-gw.el (tramp-gw-open-network-stream): Use 69 * net/tramp-gw.el (tramp-gw-open-network-stream):
66 `tramp-compat-replace-regexp-in-string'. 70 Use `tramp-compat-replace-regexp-in-string'.
67 71
68 * net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call 72 * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
69 `tramp-handle-make-auto-save-file-name'. 73 Call `tramp-handle-make-auto-save-file-name'.
70 (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el. 74 (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
71 (tramp-sh-file-gvfs-monitor-dir-process-filter) 75 (tramp-sh-file-gvfs-monitor-dir-process-filter)
72 (tramp-sh-file-inotifywait-process-filter): Use 76 (tramp-sh-file-inotifywait-process-filter):
73 `tramp-compat-replace-regexp-in-string'. 77 Use `tramp-compat-replace-regexp-in-string'.
74 (tramp-compute-multi-hops): Use `push' instead of `pushnew'. 78 (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
75 79
76 * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler 80 * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
77 for `make-auto-save-file-name'. 81 for `make-auto-save-file-name'.
78 (tramp-smb-handle-copy-directory): Call 82 (tramp-smb-handle-copy-directory):
79 `tramp-compat-replace-regexp-in-string'. 83 Call `tramp-compat-replace-regexp-in-string'.
80 (tramp-smb-get-file-entries): Use `push' instead of `pushnew'. 84 (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
81 (tramp-smb-handle-copy-file): Improve error message. 85 (tramp-smb-handle-copy-file): Improve error message.
82 (tramp-smb-handle-rename-file): Rename directly only in case 86 (tramp-smb-handle-rename-file): Rename directly only in case
@@ -95,8 +99,8 @@
95 * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")" 99 * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")"
96 in Java Mode. 100 in Java Mode.
97 (c-recognize-typeless-decls): Set the Java value to t. 101 (c-recognize-typeless-decls): Set the Java value to t.
98 * progmodes/cc-engine.el (c-forward-decl-or-cast-1): While 102 * progmodes/cc-engine.el (c-forward-decl-or-cast-1):
99 handling a "(", add a check for, effectively, Java, and handle a 103 While handling a "(", add a check for, effectively, Java, and handle a
100 "typeless" declaration there. 104 "typeless" declaration there.
101 105
1022013-09-07 Roland Winkler <winkler@gnu.org> 1062013-09-07 Roland Winkler <winkler@gnu.org>
diff --git a/lisp/subr.el b/lisp/subr.el
index 0a28d4778d4..de7c629b208 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3350,16 +3350,22 @@ even if this catches the signal."
3350(define-obsolete-function-alias 'condition-case-no-debug 3350(define-obsolete-function-alias 'condition-case-no-debug
3351 'condition-case-unless-debug "24.1") 3351 'condition-case-unless-debug "24.1")
3352 3352
3353(defmacro with-demoted-errors (&rest body) 3353(defmacro with-demoted-errors (format &rest body)
3354 "Run BODY and demote any errors to simple messages. 3354 "Run BODY and demote any errors to simple messages.
3355If `debug-on-error' is non-nil, run BODY without catching its errors. 3355If `debug-on-error' is non-nil, run BODY without catching its errors.
3356This is to be used around code which is not expected to signal an error 3356This is to be used around code which is not expected to signal an error
3357but which should be robust in the unexpected case that an error is signaled." 3357but which should be robust in the unexpected case that an error is signaled.
3358 (declare (debug t) (indent 0)) 3358For backward compatibility, if FORMAT is not a constant string, it
3359 (let ((err (make-symbol "err"))) 3359is assumed to be part of BODY, in which case the message format
3360used is \"Error: %S\"."
3361 (declare (debug t) (indent 1))
3362 (let ((err (make-symbol "err"))
3363 (format (if (and (stringp format) body) format
3364 (prog1 "Error: %S"
3365 (if format (push format body))))))
3360 `(condition-case-unless-debug ,err 3366 `(condition-case-unless-debug ,err
3361 (progn ,@body) 3367 ,(macroexp-progn body)
3362 (error (message "Error: %S" ,err) nil)))) 3368 (error (message ,format ,err) nil))))
3363 3369
3364(defmacro combine-after-change-calls (&rest body) 3370(defmacro combine-after-change-calls (&rest body)
3365 "Execute BODY, but don't call the after-change functions till the end. 3371 "Execute BODY, but don't call the after-change functions till the end.
diff --git a/src/ChangeLog b/src/ChangeLog
index 4b688e43430..4e08178989e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * eval.c (Feval): Document the new use of `lexical'.
4
12013-09-09 Dmitry Antipov <dmantipov@yandex.ru> 52013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
2 6
3 Review and drop old frame resize hack. 7 Review and drop old frame resize hack.
@@ -20,8 +24,8 @@
202013-09-09 Dmitry Antipov <dmantipov@yandex.ru> 242013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
21 25
22 Cleanup frame flushing. 26 Cleanup frame flushing.
23 * dispextern.h (struct redisplay_interface): Drop 27 * dispextern.h (struct redisplay_interface):
24 flush_display_optional because flush_display is enough 28 Drop flush_display_optional because flush_display is enough
25 for X and flushing via RIF is just a no-op for others. 29 for X and flushing via RIF is just a no-op for others.
26 * frame.h (flush_frame): New function. 30 * frame.h (flush_frame): New function.
27 * dispnew.c (update_frame): 31 * dispnew.c (update_frame):
diff --git a/src/eval.c b/src/eval.c
index 9db4d1fd81b..6e964f6604b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2033,7 +2033,9 @@ it is defines a macro. */)
2033 2033
2034DEFUN ("eval", Feval, Seval, 1, 2, 0, 2034DEFUN ("eval", Feval, Seval, 1, 2, 0,
2035 doc: /* Evaluate FORM and return its value. 2035 doc: /* Evaluate FORM and return its value.
2036If LEXICAL is t, evaluate using lexical scoping. */) 2036If LEXICAL is t, evaluate using lexical scoping.
2037LEXICAL can also be an actual lexical environment, in the form of an
2038alist mapping symbols to their value. */)
2037 (Lisp_Object form, Lisp_Object lexical) 2039 (Lisp_Object form, Lisp_Object lexical)
2038{ 2040{
2039 ptrdiff_t count = SPECPDL_INDEX (); 2041 ptrdiff_t count = SPECPDL_INDEX ();