Function: kmacro-step-edit-prompt
kmacro-step-edit-prompt is a byte-compiled function defined in
kmacro.el.gz.
Signature
(kmacro-step-edit-prompt MACRO INDEX)
Source Code
;; Defined in /usr/src/emacs/lisp/kmacro.el.gz
(defun kmacro-step-edit-prompt (macro index)
;; Show step-edit prompt
(let ((keys (and (not kmacro-step-edit-appending)
index (substring macro index executing-kbd-macro-index)))
(future (and (not kmacro-step-edit-appending)
(substring macro executing-kbd-macro-index)))
(message-log-max nil)
(curmsg (current-message)))
;; TODO: Scroll macro if max-mini-window-height is too small.
(message "%s"
(concat
(format "Macro: %s%s%s%s%s\n"
(format-kbd-macro kmacro-step-edit-new-macro 1)
(if (and kmacro-step-edit-new-macro (> (length kmacro-step-edit-new-macro) 0)) " " "")
(propertize (if keys (format-kbd-macro keys)
(if kmacro-step-edit-appending "<APPEND>" "<INSERT>")) 'face 'region)
(if future " " "")
(if future (format-kbd-macro future) ""))
(cond
((minibufferp)
(format "%s\n%s\n"
(propertize "\
minibuffer " 'face 'header-line)
(buffer-substring (point-min) (point-max))))
(curmsg
(format "%s\n%s\n"
(propertize "\
echo area " 'face 'header-line)
curmsg))
(t ""))
(if keys
(format "%s\n%s%s %S [yn iIaArR C-k kq!] "
(propertize "\
--------------Step Edit Keyboard Macro [?: help]---------------" 'face 'mode-line)
(if kmacro-step-edit-help "\
Step: y/SPC: execute next, d/n/DEL: skip next, f: skip but keep
TAB: execute while same, ?: toggle help
Edit: i: insert, r: replace, a: append, A: append at end,
I/R: insert/replace with one sequence,
End: !/c: execute rest, C-k: skip rest and save, q/C-g: quit
----------------------------------------------------------------
" "")
(propertize "Next command:" 'face 'bold)
this-command)
(propertize
(format "Type key sequence%s to insert and execute%s: "
(if (numberp kmacro-step-edit-inserting) "" "s")
(if (numberp kmacro-step-edit-inserting) "" " (end with C-j)"))
'face 'bold))))))