Function: consult--preview-append-local-pch
consult--preview-append-local-pch is a byte-compiled function defined
in consult.el.
Signature
(consult--preview-append-local-pch FUN)
Documentation
Append FUN to local post-command-hook list.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--preview-append-local-pch (fun)
"Append FUN to local `post-command-hook' list."
;; Symbol indirection because of bug#46407.
(let ((hook (make-symbol "consult--preview-post-command")))
(fset hook fun)
;; TODO Emacs 28 has a bug, where the hook--depth-alist is not cleaned up properly
;; Do not use the broken add-hook here.
;;(add-hook 'post-command-hook hook 'append 'local)
(setq-local post-command-hook
(append
(remove t post-command-hook)
(list hook)
(and (memq t post-command-hook) '(t))))))