Variable: robot-mode-imenu-generic-expression

robot-mode-imenu-generic-expression is a variable defined in robot-mode.el.

Value

((nil
  (lambda nil
    (let
	((section
	  (save-excursion
	    (goto-char (point-min))
	    (let ((case-fold-search t))
	      (if
		  (re-search-forward
		   "^\\*[* -]*\\(Keywords\\|Test Cases\\)" nil t)
		  (point)
		-1)))))
      (message "Section here %d match-data %s" section (match-data))
      (when (> section -1)
	(if
	    (and (re-search-backward "^\\([[:alnum:]]+.*\\)" nil t)
		 (< section (point)))
	    t
	  (set-match-data nil)))))
  1))

Documentation

Imenu matchers for Robot mode.

Source Code

;; Defined in /nix/store/2wci9ylra7w4lc4cczbdr19c98f107vr-emacs-packages-deps/share/emacs/site-lisp/elpa/robot-mode-20240721.1023/robot-mode.el
(defvar robot-mode-imenu-generic-expression
  ;; Keywords or test cases are any string beginning from the first column in
  ;; the keywords or test cases sections.
  '((nil  (lambda ()
	    (let ((section
		   (save-excursion
		     (goto-char (point-min))
		     (let ((case-fold-search t))
		       (if (re-search-forward "^\\*[*\s-]*\\(Keywords\\|Test Cases\\)" nil t)
			   (point)
			 -1)))))

	      ;; When a section is found
	      (message "Section here %d match-data %s" section (match-data))
	      (when (> section -1)
		;; Check that the keywords are after the section marker
		(if (and (re-search-backward "^\\([[:alnum:]]+.*\\)" nil t)
			 (< section (point)))
		    t
		  (set-match-data nil)))))
	  1))
  "Imenu matchers for Robot mode.")