Function: term-dynamic-list-input-ring

term-dynamic-list-input-ring is an interactive and byte-compiled function defined in term.el.gz.

Signature

(term-dynamic-list-input-ring)

Documentation

List in help buffer the buffer's input history.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-dynamic-list-input-ring ()
  "List in help buffer the buffer's input history."
  (interactive)
  (if (or (not (ring-p term-input-ring))
	  (ring-empty-p term-input-ring))
      (message "No history")
    (let ((history nil)
	  (history-buffer " *Input History*")
	  (index (1- (ring-length term-input-ring)))
	  (conf (current-window-configuration)))
      ;; We have to build up a list ourselves from the ring vector.
      (while (>= index 0)
	(setq history (cons (ring-ref term-input-ring index) history)
	      index (1- index)))
      ;; Change "completion" to "history reference"
      ;; to make the display accurate.
      (with-output-to-temp-buffer history-buffer
	(display-completion-list history)
	(set-buffer history-buffer)
	(forward-line 3)
	(while (search-backward "completion" nil 'move)
	  (replace-match "history reference")))
      (sit-for 0)
      (message "Hit space to flush")
      (let ((ch (read-event)))
	(if (eq ch ?\s)
	    (set-window-configuration conf)
	  (push ch unread-command-events))))))