Morning.

I wrote this quickly, it works for me, YMMV and its as simple as it needs
to be, it mostly finds the start and end of the current verb definition.
The j-mode I have has
compile line
compile region
compile buffer

I offer 'jselverb' which I have bound to C-c C-v as that fits the pattern,
it's unpolished and care free.

;; Selects the current verb for C-c C-r to digest
(defun jselverb ()
  (interactive)
  (re-search-backward ": 0$")
  (beginning-of-line)
  (set-mark-command nil)
  (re-search-forward "^)$"))

(defun jeatverb ()
  (interactive)
  (save-excursion
    (jselverb)
    (j-console-execute-region (region-beginning) (region-end))))

(global-set-key (kbd "C-c C-v") 'jeatverb)

To use it, just be in the verb, hit C-c C-v C-c C-r
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to