@@ -1099,8 +1099,8 @@ The message is logged to a buffer described by
1099
1099
(re-search-forward " ^(" nil t )
1100
1100
(delete-region (point-min ) (- (point ) 1 )))
1101
1101
(goto-char (point-max ))
1102
- (nrepl--pp (nrepl-decorate-msg msg type)
1103
- (nrepl--message-color (lax-plist-get (cdr msg) " id" ))
1102
+ (nrepl-log -pp-object (nrepl-decorate-msg msg type)
1103
+ (nrepl-log- -message-color (lax-plist-get (cdr msg) " id" ))
1104
1104
t )
1105
1105
(when-let ((win (get-buffer-window )))
1106
1106
(set-window-point win (point-max )))
@@ -1135,7 +1135,7 @@ BUTTON defaults the button at point."
1135
1135
(goto-char start)
1136
1136
(delete-overlay button )
1137
1137
(delete-region start end)
1138
- (nrepl--pp obj)
1138
+ (nrepl-log -pp-object obj)
1139
1139
(delete-char -1 )))
1140
1140
(error " No button at point " )))
1141
1141
@@ -1152,7 +1152,7 @@ BUTTON defaults the button at point."
1152
1152
(nrepl-log-expand-button button )
1153
1153
(setq button (next-button pos)))))))
1154
1154
1155
- (defun nrepl--expand-button-mouse (event )
1155
+ (defun nrepl-log- -expand-button-mouse (event )
1156
1156
" Expand the text hidden under overlay button.
1157
1157
EVENT gives the button position on window."
1158
1158
(interactive " e" )
@@ -1169,20 +1169,20 @@ EVENT gives the button position on window."
1169
1169
'face 'link
1170
1170
'help-echo " RET: Expand object."
1171
1171
; ; Workaround for bug#1568.
1172
- 'local-map '(keymap (mouse-1 . nrepl--expand-button-mouse)))
1172
+ 'local-map '(keymap (mouse-1 . nrepl-log- -expand-button-mouse)))
1173
1173
(insert " \n " ))
1174
1174
1175
- (defun nrepl--message-color (id )
1175
+ (defun nrepl-log- -message-color (id )
1176
1176
" Return the color to use when pretty-printing the nREPL message with ID.
1177
1177
If ID is nil, return nil."
1178
1178
(when id
1179
1179
(thread-first (string-to-number id)
1180
1180
(mod (length nrepl-message-colors))
1181
1181
(nth nrepl-message-colors))))
1182
1182
1183
- (defun nrepl--pp-listlike (object &optional foreground button )
1183
+ (defun nrepl-log- -pp-listlike (object &optional foreground button )
1184
1184
" Pretty print nREPL list like OBJECT.
1185
- FOREGROUND and BUTTON are as in `nrepl--pp' ."
1185
+ FOREGROUND and BUTTON are as in `nrepl-log -pp-object ' ."
1186
1186
(cl-flet ((color (str)
1187
1187
(propertize str 'face
1188
1188
(append '(:weight ultra-bold)
@@ -1201,12 +1201,12 @@ FOREGROUND and BUTTON are as in `nrepl--pp'."
1201
1201
(unless (eq (car object) 'dict )
1202
1202
'font-lock-keyword-face )))))
1203
1203
(insert str)
1204
- (nrepl--pp (cadr l) nil button )))
1204
+ (nrepl-log -pp-object (cadr l) nil button )))
1205
1205
(when (eq (car object) 'dict )
1206
1206
(delete-char -1 ))
1207
1207
(insert (color " )\n " )))))))
1208
1208
1209
- (defun nrepl--pp (object &optional foreground button )
1209
+ (defun nrepl-log -pp-object (object &optional foreground button )
1210
1210
" Pretty print nREPL OBJECT, delimited using FOREGROUND.
1211
1211
If BUTTON is non-nil, try making a button from OBJECT instead of inserting
1212
1212
it into the buffer."
@@ -1218,12 +1218,12 @@ it into the buffer."
1218
1218
(cond
1219
1219
; ; top level dicts (always expanded)
1220
1220
((memq head '(<-- --> ))
1221
- (nrepl--pp-listlike object foreground button ))
1221
+ (nrepl-log- -pp-listlike object foreground button ))
1222
1222
; ; inner dicts
1223
1223
((eq head 'dict )
1224
1224
(if (and button (> (length object) min-dict-fold-size))
1225
1225
(nrepl-log-insert-button " (dict ...)" object)
1226
- (nrepl--pp-listlike object foreground button )))
1226
+ (nrepl-log- -pp-listlike object foreground button )))
1227
1227
; ; lists
1228
1228
(t
1229
1229
(if (and button (> (length object) min-list-fold-size))
0 commit comments