Function: claude-code-ide-mcp--setup-diff-hooks

claude-code-ide-mcp--setup-diff-hooks is a natively compiled function defined in claude-code-ide-mcp-handlers.el.

Signature

(claude-code-ide-mcp--setup-diff-hooks TAB-NAME SESSION SAVED-WINCONF)

Documentation

Set up ediff hooks for TAB-NAME with SESSION and SAVED-WINCONF.

Returns a cons cell (before-setup-hook-fn . startup-hook-fn).

Source Code

;; Defined in /nix/store/yjvbhwl7p6zrbw9xlnni7y4hra8sa3pl-emacs-packages-deps/share/emacs/site-lisp/claude-code-ide-mcp-handlers.el
(defun claude-code-ide-mcp--setup-diff-hooks (tab-name session saved-winconf)
  "Set up ediff hooks for TAB-NAME with SESSION and SAVED-WINCONF.
Returns a cons cell (before-setup-hook-fn . startup-hook-fn)."
  (let* ((captured-tab-name tab-name)
         (captured-session session)
         (captured-winconf saved-winconf)
         (before-setup-hook-fn nil)
         (startup-hook-fn nil))

    ;; Define the before-setup hook function
    (setq before-setup-hook-fn
          (lambda ()
            ;; Remove this hook after use
            (remove-hook 'ediff-before-setup-hook before-setup-hook-fn)))

    ;; Define the startup hook function with lexical closure
    (setq startup-hook-fn
          (lambda ()
            (claude-code-ide-mcp--handle-ediff-startup
             captured-tab-name captured-session captured-winconf startup-hook-fn)))

    (cons before-setup-hook-fn startup-hook-fn)))