Function: view-lossage

view-lossage is an interactive and byte-compiled function defined in help.el.gz.

Signature

(view-lossage)

Documentation

Display last few input keystrokes and the commands run.

For convenience this uses the same format as edit-last-kbd-macro. See lossage-size to update the number of recorded keystrokes.

To record all your input, use open-dribble-file.

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/help.el.gz
(defun view-lossage ()
  "Display last few input keystrokes and the commands run.
For convenience this uses the same format as
`edit-last-kbd-macro'.
See `lossage-size' to update the number of recorded keystrokes.

To record all your input, use `open-dribble-file'."
  (interactive)
  (help-setup-xref (list #'view-lossage)
		   (called-interactively-p 'interactive))
  (with-help-window (help-buffer)
    (princ " ")
    (princ (mapconcat (lambda (key)
			(cond
			 ((and (consp key) (null (car key)))
			  (format ";; %s\n" (if (symbolp (cdr key)) (cdr key)
					      "anonymous-command")))
			 ((or (integerp key) (symbolp key) (listp key))
			  (single-key-description key))
			 (t
			  (prin1-to-string key nil))))
		      (recent-keys 'include-cmds)
		      " "))
    (with-current-buffer standard-output
      (goto-char (point-min))
      (let ((comment-start ";; ")
            (comment-column 24))
        (while (not (eobp))
          (comment-indent)
	  (forward-line 1)))
      ;; Show point near the end of "lossage", as we did in Emacs 24.
      (set-marker help-window-point-marker (point)))))