Function: hhist:add

hhist:add is a byte-compiled function defined in hhist.el.

Signature

(hhist:add ELT)

Documentation

Add ELT to hyper-history list.

Do not add if the same as current or prior location (frame configuration). ELT must have been created via a call to hhist:element prior to changing the current frame configuration somehow.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hhist.el
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************

(defun hhist:add (elt)
  "Add ELT to hyper-history list.
Do not add if the same as current or prior location (frame configuration).
ELT must have been created via a call to `hhist:element' prior to
changing the current frame configuration somehow."
  ;; Even though this next line looks useless, it cures a problem with
  ;; window buffer correspondences on startup, so don't remove it.
  (set-buffer (window-buffer (selected-window)))
  (when (not (frame-configuration-p elt))
    (error "(hhist:add): 'elt' must be a frame configuration, not %s" elt))
  (unless (or (equal elt (car *hhist*))
	      (equal elt (current-frame-configuration)))
    (setq *hhist* (cons elt *hhist*))))