Function: zeroconf-service-remove-hook

zeroconf-service-remove-hook is a byte-compiled function defined in zeroconf.el.gz.

Signature

(zeroconf-service-remove-hook TYPE EVENT FUNCTION)

Documentation

Remove FUNCTION from the hook of service type TYPE.

EVENT must be either :new or :removed and has to match the event type used when registering FUNCTION.

Source Code

;; Defined in /usr/src/emacs/lisp/net/zeroconf.el.gz
(defun zeroconf-service-remove-hook (type event function)
  "Remove FUNCTION from the hook of service type TYPE.

EVENT must be either :new or :removed and has to match the event
type used when registering FUNCTION."
  (let* ((table (pcase event
                  (:new zeroconf-service-added-hooks-hash)
                  (:removed zeroconf-service-removed-hooks-hash)
                  (_ (error "EVENT must be either `:new' or `:removed'"))))
	 (functions (remove function (gethash type table))))
    (if functions
	(puthash type functions table)
      (remhash type table))))