Function: debbugs-query:at-p

debbugs-query:at-p is a byte-compiled function defined in hib-debbugs.el.

Signature

(debbugs-query:at-p)

Documentation

Return t if point appears to be within a debbugs id.

Id number is (match-string 2). If this is a query with attributes, then (match-string 3) = "?" and (match-string 4) is the query attributes.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-debbugs.el
;; (let ((entries (cdar tabulated-list-entries)))
;;   (cond ((= (length entries) 1)
;;       (hact 'debbugs-gnu-query
;;             (string-to-number (aref (nth (1- (line-number-at-pos (point))) entries) 0))))))
;; Each listed entry can be retrieved as a list of dotted pair attributes with:
;;   (tabulated-list-get-id (point))

;;; ************************************************************************
;;; Private functions
;;; ************************************************************************

(defun debbugs-query:at-p ()
  "Return t if point appears to be within a debbugs id.
Id number is (match-string 2).  If this is a query with attributes,
then (match-string 3) = \"?\" and (match-string 4) is the query
attributes."
  ;; Point must be before one of the bug#222 characters to match.
  (let ((case-fold-search t))
    (when (string-match "[bugise#0-9]" (char-to-string (following-char)))
	(save-excursion
	  (skip-chars-backward "#0-9")
	  (skip-chars-backward " \t\n\r\f")
	  (skip-chars-backward "bugdiseBUGDISE#") ;; bug, debbugs or issue
	  ;; Allow for bug#222?package=hyperbole&severity=high as well as bug222, or bug#222.
	  (or (looking-at "\\<\\(bug#?\\|debbugs#?\\|issue#?\\)[ \t\n\r\f]*#?\\([1-9][0-9]*\\)?\\(\\?\\)\\([a-z=&0-9%;()]+\\)\\>")
	      (looking-at "\\<\\(bug#?\\|debbugs#?\\|issue#?\\)[ \t\n\r\f]*#?\\([1-9][0-9]*\\)\\>\\(\\)\\(\\)"))))))