Function: verb-ctrl-c-ctrl-c-context-behavior

verb-ctrl-c-ctrl-c-context-behavior is a natively compiled function defined in verb.el.

Signature

(verb-ctrl-c-ctrl-c-context-behavior)

Documentation

Contextual behavior in org-mode buffer for ctrl-c ctrl-c binding.

Source Code

;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb-ctrl-c-ctrl-c-context-behavior ()
  "Contextual behavior in `org-mode' buffer for ctrl-c ctrl-c binding."
  ;; Since this function is added to `org-ctrl-c-ctrl-c-final-hook', we
  ;; don't need to worry about accidentally intercepting C-c C-c when
  ;; used on a Babel source block.
  (when (and verb-mode
             ;; Only try sending a request if it is possible to actually
             ;; build a request spec. Otherwise, return nil and let other
             ;; hook functions run.
             ;; The only downside to this setup is that if users press
             ;; C-c C-c fully intending to send a request, but something
             ;; is not properly set up (e.g. :verb: tag is missing), then
             ;; Emacs will print "C-c C-c can do nothing useful here",
             ;; which is not very useful. However, this is how the hook
             ;; is designed to work.
             (ignore-errors
               (let ((verb--inhibit-code-tags-evaluation t))
                 (verb--request-spec-from-hierarchy))
               t))
    (call-interactively #'verb-send-request-on-point-display)))