diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/ert.el | 9 | ||||
-rw-r--r-- | lisp/server.el | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index c25ade22d6f..67cbe62538c 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -673,8 +673,11 @@ Bound dynamically. This is a list of (PREFIX . MESSAGE) pairs.") To be used within ERT tests. MESSAGE-FORM should evaluate to a string that will be displayed together with the test result if -the test fails. PREFIX-FORM should evaluate to a string as well -and is displayed in front of the value of MESSAGE-FORM." +the test fails. MESSAGE-FORM can also evaluate to a function; in +this case, it will be called when displaying the info. + +PREFIX-FORM should evaluate to a string as well and is displayed +in front of the value of MESSAGE-FORM." (declare (debug ((form &rest [sexp form]) body)) (indent 1)) `(let ((ert--infos (cons (cons ,prefix-form ,message-form) ert--infos))) @@ -1352,6 +1355,8 @@ RESULT must be an `ert-test-result-with-condition'." (end nil)) (unwind-protect (progn + (when (functionp message) + (setq message (funcall message))) (insert message "\n") (setq end (point-marker)) (goto-char begin) diff --git a/lisp/server.el b/lisp/server.el index beb46853b79..2102f8569b8 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -756,6 +756,7 @@ the `server-process' variable." :service server-file :plist '(:authenticated t))))) (unless server-process (error "Could not start server process")) + (server-log "Starting server") (process-put server-process :server-file server-file) (setq server-mode t) (push 'server-mode global-minor-modes) |