Function: hhist:pop

hhist:pop is an interactive and byte-compiled function defined in hhist.el.

Signature

(hhist:pop &optional ARG)

Documentation

Return to ARGth saved frame config and remove optional prefix ARG entries.

The command is ignored with ARG < 1.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hhist.el
(defun hhist:pop (&optional arg)
  "Return to ARGth saved frame config and remove optional prefix ARG entries.
The command is ignored with ARG < 1."
  (interactive "p")
  (setq arg (cond ((or (null arg)
		       (and (listp arg) (not (integerp (car arg))))
		       (not (integerp arg)))
		   1)
		  ((and (listp arg) (integerp (car arg)))
		   (car arg))
		  ((listp arg) 1)
		  (t arg)))
  (let ((prev-config))
    (when *hhist*
      (when (< arg 1)
	(message "(hhist:pop): No previous location to which to return")
	(beep))
      (while (and (> arg 0) *hhist*)
	(setq prev-config (car *hhist*)
	      *hhist* (cdr *hhist*)
	      arg (1- arg)))
      (when (frame-configuration-p prev-config)
	;; Minify but keep any frames created after this frame configuration was saved.
	(set-frame-configuration prev-config t)))))