| Server IP : 217.160.0.64 / Your IP : 216.73.216.137 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67269618 ( 67269618) PHP Version : 8.4.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/proc/self/root/kunden/proc/self/root/usr/share/emacs/30.1/lisp/progmodes/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 30.1
;;; with all optimizations.
#@39 Keymap used by bug reference buttons.
(byte-code "\300\301!\210\302\303\304\305\306\307%\207" [require thingatpt custom-declare-group bug-reference nil "Hyperlinking references to bug reports." :group comm] 6)
(defvar bug-reference-map (define-keymap "<mouse-2>" 'bug-reference-push-button "C-c RET" 'bug-reference-push-button) (#$ . 83))#@686 Format used to turn a bug number into a URL.
The bug number is supplied as a string, so this should have a single %s.
This can also be a function designator; it is called without arguments
and should return a string.
It can use `match-string' to get parts matched against
`bug-reference-bug-regexp', specifically:
1. issue kind (bug, patch, rfe &c)
2. issue number.
There is no default setting for this, it must be set per file.
If you set it to a symbol in the file Local Variables section,
you need to add a `bug-reference-url-format' property to it:
(put \='my-bug-reference-url-format \='bug-reference-url-format t)
so that it is considered safe, see `enable-local-variables'.
(defvar bug-reference-url-format nil (#$ . 428))#@10
(fn S)#@947 Regular expression matching bug references.
The first subexpression defines the region of the bug-reference
overlay, i.e., the region being fontified and made clickable in
order to browse the referenced bug in the corresponding project's
issue tracker.
If `bug-reference-url-format' is set to a format string with
single %s placeholder, the second subexpression must match
the (part of the) bug reference which needs to be injected in
place of the %s in order to form the bug's ticket URL.
If `bug-reference-url-format' is a function, the interpretation
of the subexpressions larger than 1 is up to the function.
However, it is checked that the bounds of all matching
subexpressions from 2 to 10 are within the bounds of the
subexpression 1 defining the overlay region. Larger
subexpressions may also be used by the function but may lay
outside the bounds of subexpressions 1 and then don't contribute
to the highlighted and clickable region.#@2 #@43 Set properties of bug reference overlays.
(byte-code "\300\301\302\303#\210\304\305\306\307\310DD\311\312\313\314\315&\210\300\305\302\316#\207" [put bug-reference-url-format safe-local-variable #[257 "\211;\206
\2119\205
\211\300N\207" [bug-reference-url-format] 3 (#$ . 1167)] custom-declare-variable bug-reference-bug-regexp funcall function #[0 "\300\207" ["\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"] 1 (#$ . 2132)] (#$ . 1182) :type regexp :version "28.1" stringp] 8)
(defalias 'bug-reference-set-overlay-properties #[0 "\301\302\303\304#\210\301\302\305\306#\210\301\302\307\310#\210\301\302\311\312#\210\301\302\313#\210\301\302\314\304#\207" [bug-reference-map put bug-reference evaporate t face link mouse-face highlight help-echo "mouse-1, C-c RET: visit this bug" keymap follow-link] 4 (#$ . 2138)])#@84 Return bug reference overlays in the region between START and END.
(fn START END)
(bug-reference-set-overlay-properties)
(defalias 'bug-reference--overlays-in #[514 "\300\301\"\211\203 \211@\302\303\"\304=\203 \211B\262\210A\202 \210\237\207" [nil overlays-in overlay-get category bug-reference] 8 (#$ . 3011)])#@86 Remove bug reference overlays from the region between START and END.
(fn START END)
(defalias 'bug-reference-unfontify #[514 "\300\301\302\"\"\207" [mapc delete-overlay bug-reference--overlays-in] 7 (#$ . 3337)])
(defvar bug-reference--nonconforming-regexps nil)
(defalias 'bug-reference--overlay-bounds #[0 "\302\224\302\225\203= \211\203= \30326 \304\211\305X\2033 \211\224\203/ \211\224W\204* \211\225V\203/ \306\303\307\"\210T\202 \210\3100\203= B\207 \235\204Q B\311\312\313\314\315 #\"\210\316\224\316\225B\207" [bug-reference-bug-regexp bug-reference--nonconforming-regexps 1 within-bounds 2 10 throw nil t display-warning bug-reference format-message "The value of `bug-reference-bug-regexp'\n\n %S\n\nin buffer %S doesn't conform to the contract specified by its\ndocstring. The subexpression 1 should define the region of the\nbug-reference overlay and cover all other subexpressions up to\nsubexpression 10." buffer-name 0] 8])#@83 Apply bug reference overlays to the region between START and END.
(fn START END)
(defalias 'bug-reference-fontify #[514 "\212b\210\303 b\210\304 \305\"b\210`W\203| \306\307#\203| \2035 \310\311 \312\313\"\216\314 )\2628\203 \315 \211A\262\242\211\205J \316@A#\210\211\262\206^ \317@A\320\321\320%\322\323\324#\210\n\203w \322\325\n;\203s \326\n\327\330!\"\202u \n #\210\266\202 \211\211\203\214 \211@\331!\266A\202} )\210\332BB\207" [bug-reference-bug-regexp bug-reference-prog-mode bug-reference-url-format line-beginning-position line-end-position bug-reference--overlays-in re-search-forward move 8 match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data t] 3] syntax-ppss bug-reference--overlay-bounds move-overlay make-overlay nil t overlay-put category bug-reference bug-reference-url format match-string-no-properties 2 delete-overlay jit-lock-bounds] 14 (#$ . 4297)])#@90 Open URL corresponding to the bug reference at POS.
(fn &optional POS USE-MOUSE-ACTION)
(defalias 'bug-reference-push-button #[512 "\204 \301\302!\210\250\204% \303!\203% \304!r\305@!q\210\306\307!\310\")\207\311!\211\205@ \211@\312\313\"\211\203: \314!\210\266A\202( \207" [bug-reference-url-format user-error "You must customize some bug-reference variables; see Emacs info node Bug Reference" eventp event-start window-buffer bug-reference-push-button posn-point t overlays-at overlay-get bug-reference-url browse-url] 7 (#$ . 5219) (byte-code "\250\203 `\202\n C\207" [last-command-event] 1)])#@38
(fn URL URL-RX BUG-RX BUG-URL-FMT)
(defalias 'bug-reference-maybe-setup-from-vc #[1028 "\302\"\2055 \303\300!\210\303\301!\210\304\305 G\306\245\307\211W\203+ \310\"B\262T\202 \266\237!\262\211\207" [bug-reference-bug-regexp bug-reference-url-format string-match make-local-variable nil match-data 2 0 match-string] 10 (#$ . 5837)])#@200 An alist for setting up `bug-reference-mode' based on VC URL.
This is like `bug-reference-setup-from-vc-alist' but generated
from a few default entries, and the value of
`bug-reference-forge-alist'.
(defvar bug-reference--setup-from-vc-alist nil (#$ . 6194))#@432 An alist of forge instances.
Each entry has the form (HOST-DOMAIN FORGE-TYPE PROTOCOL).
HOST-DOMAIN is the host- and domain name, e.g., gitlab.com,
salsa.debian.org, or sr.ht.
FORGE-TYPE is the type of the forge, e.g., gitlab, gitea,
sourcehut, or github.
PROTOCOL is the protocol for accessing the forge's issue tracker,
usually "https" but for self-hosted forge instances not
accessible via the internet it might also be "http".
(defvar bug-reference-forge-alist '(("github.com" github "https") ("gitea.com" gitea "https") ("codeberg.org" gitea "https") ("gitlab.com" gitlab "https") ("framagit.org" gitlab "https") ("salsa.debian.org" gitlab "https") ("sr.ht" sourcehut "https")) (#$ . 6459))#@419 Build an entry for `bug-reference--setup-from-vc-alist'.
HOST-DOMAIN is the host- and domain name, e.g., gitlab.com, or
sr.ht.
FORGE-TYPE is the type of the forge, e.g., gitlab, gitea,
sourcehut, or github.
PROTOCOL is the protocol for accessing the forge's issue tracker,
usually https but for self-hosted forge instances not accessible
via the internet it might also be http.
(fn HOST-DOMAIN FORGE-TYPE PROTOCOL)#@40
(fn HOST-DOMAIN FORGE-TYPE PROTOCOL)#@15
(fn GROUPS)#@255 Compute the `bug-reference--setup-from-vc-alist' value.
If REBUILD is non-nil, compute it again even if has been computed
already. The value contains a few default entries, and entries
generated from `bug-reference-forge-alist'.
(fn &optional REBUILD)#@10
(fn _)#@14
(fn ENTRY)
(byte-code "\300\301\302\301\303\304#\305#\210\306\301\304\307\304\310%\210\306\301\304\311\304\312%\210\306\301\304\313\304\314%\210\306\301\304\315\304\316%\207" [defalias bug-reference--build-forge-setup-entry cl-generic-define (host-domain forge-type protocol) nil "Build an entry for `bug-reference--setup-from-vc-alist'.\nHOST-DOMAIN is the host- and domain name, e.g., gitlab.com, or\nsr.ht.\n\nFORGE-TYPE is the type of the forge, e.g., gitlab, gitea,\nsourcehut, or github.\n\nPROTOCOL is the protocol for accessing the forge's issue tracker,\nusually https but for self-hosted forge instances not accessible\nvia the internet it might also be http.\n\n(fn HOST-DOMAIN FORGE-TYPE PROTOCOL)" cl-generic-define-method (host-domain (_forge-type (eql 'github)) protocol) #[771 "\300\301!\302Q\303\304\305#E\207" ["[/@]" regexp-quote "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git\\)?/?\\'" "\\(\\([.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>" make-closure #[257 "\211A@\302\303\300\301$\207" [V0 V1 make-closure #[0 "\303\304\301\302\305\306!\206 \300\305\307!%\207" [V0 V1 V2 format "%s://%s/%s/issues/%s" match-string-no-properties 2 3] 7]] 7 (#$ . 7628)]] 9 (#$ . 7584)] (host-domain (_forge-type (eql 'gitlab)) protocol) #[771 "\300\301!\302Q\303\304\305#E\207" ["[/@]" regexp-quote "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git\\)?/?\\'" "\\(\\([.A-Za-z0-9_/-]+\\)?\\([#!]\\)\\([0-9]+\\)\\)\\>" make-closure #[257 "\211A@\302\303\300\301$\207" [V0 V1 make-closure #[0 "\303\304\301\302\305\306!\206 \300\305\307!\310\230\203 \311\202 \312\305\313!&\207" [V0 V1 V2 format "%s://%s/%s/-/%s/%s" match-string-no-properties 2 3 "#" "issues/" "merge_requests/" 4] 8]] 7 (#$ . 7628)]] 9 (#$ . 7584)] (host-domain (_forge-type (eql 'gitea)) protocol) #[771 "\300\301!\302Q\303\304\305#E\207" ["[/@]" regexp-quote "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git\\)?/?\\'" "\\(\\([.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>" make-closure #[257 "\211A@\302\303\300\301$\207" [V0 V1 make-closure #[0 "\303\304\301\302\305\306!\206 \300\305\307!%\207" [V0 V1 V2 format "%s://%s/%s/issues/%s" match-string-no-properties 2 3] 7]] 7 (#$ . 7628)]] 9 (#$ . 7584)] (host-domain (_forge-type (eql 'sourcehut)) protocol) #[771 "\300\301!\302Q\303\304\305#E\207" ["[/@]\\(?:git\\|hg\\)." regexp-quote "[/:]\\(~[.A-Za-z0-9_/-]+\\)" "\\(\\(~[.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>" make-closure #[257 "\211A@\302\303\300\301$\207" [V0 V1 make-closure #[0 "\303\304\301\302\305\306!\206 \300\305\307!%\207" [V0 V1 V2 format "%s://todo.%s/%s/%s" match-string-no-properties 2 3] 7]] 7 (#$ . 7628)]] 9 (#$ . 7584)]] 6)
(defalias 'bug-reference--setup-from-vc-alist #[256 "\203\n \211\204\n \207\302\303\304E\305\306 \"B\211\207" [bug-reference--setup-from-vc-alist bug-reference-forge-alist "git\\.\\(?:sv\\|savannah\\)\\.gnu\\.org:" "\\(\\b\\(?:[Bb]ug ?#?\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)\\>" #[257 "\300\207" ["https://debbugs.gnu.org/%s"] 2 (#$ . 7907)] mapcar #[257 "\300\301\"\207" [apply bug-reference--build-forge-setup-entry] 4 (#$ . 7921)]] 5 (#$ . 7648)])#@472 An alist for setting up `bug-reference-mode' based on VC URL.
Each element has the form (URL-REGEXP BUG-REGEXP URL-FORMAT-FN).
URL-REGEXP is matched against the version control URL of the
current buffer's file. If it matches, BUG-REGEXP is set as
`bug-reference-bug-regexp'. URL-FORMAT-FN is a function of one
argument that receives a list of the groups 0 to N of matching
URL-REGEXP against the VCS URL and returns the value to be set as
`bug-reference-url-format'.
(defvar bug-reference-setup-from-vc-alist nil (#$ . 11014))#@194 Try setting up `bug-reference-mode' based on VC information.
Test each configuration in `bug-reference-setup-from-vc-alist'
and `bug-reference--setup-from-vc-alist' and apply it if
applicable.#@15
(fn REMOTE)#@15
(fn CONFIG)
(defalias 'bug-reference-try-setup-from-vc #[0 "\206 \211\205
\303\304\"\211\205 \305\306\307#\310\"\211\205( \305\306\311\"\312\n\313 \"\"\207" [buffer-file-name default-directory bug-reference-setup-from-vc-alist vc-responsible-backend t seq-some make-closure #[257 "\3021\f \303\300\304\301$0\207\305\207" [V0 V1 (error) vc-call-backend repository-url nil] 7 (#$ . 11749)] ("upstream" nil) #[257 "\301\302\300#\207" [V0 apply bug-reference-maybe-setup-from-vc] 5 (#$ . 11768)] append bug-reference--setup-from-vc-alist] 8 (#$ . 11551)])#@832 An alist for setting up `bug-reference-mode' in mail modes.
This takes action if `bug-reference-mode' is enabled in group and
message buffers of Emacs mail clients. Currently, Gnus and Rmail
are supported.
Each element has the form
(GROUP-REGEXP HEADER-REGEXP BUG-REGEXP URL-FORMAT)
GROUP-REGEXP is a regexp matched against the current mail folder
or newsgroup name. HEADER-REGEXP is a regexp matched against the
From, To, Cc, Newsgroup, and List-ID header values of the current
mail or newsgroup message. If any of those matches, BUG-REGEXP
is set as `bug-reference-bug-regexp' and URL-FORMAT is set as
`bug-reference-url-format'.
Note: In Gnus, if a summary buffer has been set up based on
GROUP-REGEXP, all article buffers opened from there will get the
same `bug-reference-url-format' and `bug-reference-url-format'.
(defvar bug-reference-setup-from-mail-alist (byte-code "\300\301\302BBC\207" ["\\<\\(auctex\\|emacs\\|gnus\\|orgmode\\|tramp\\)\\>" "\\(?:\\(?:-devel@gnu\\|@debbugs\\.gnu\\|ding\\.gnus\\)\\.org\\)" ("\\(\\b[Bb]ug ?#?\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)" "https://debbugs.gnu.org/%s")] 3) (#$ . 12339))#@398 Set up according to mail GROUP or HEADER-VALUES.
Group is a mail group/folder name and HEADER-VALUES is a list of
mail header values, e.g., the values of From, To, Cc, List-ID,
and Newsgroup.
If any GROUP-REGEXP or HEADER-REGEXP of
`bug-reference-setup-from-mail-alist' matches GROUP or any
element in HEADER-VALUES, the corresponding BUG-REGEXP and
URL-FORMAT are set.
(fn GROUP HEADER-VALUES)
(defalias 'bug-reference-maybe-setup-from-mail #[514 "\3032y \211\205v \211@\203# \211@\203# \211@\304\305\306$\266\203\204\\ \203q \211A@\203q \3072Y \211\205V \211@\211\203Q A@\304\305\306$\266\203\203Q \310\307\306\"\210\210A\2022 \2620\203q \311\301!\210\3128\311\302!\210\3138\310\303\306\"\210\210A\202 \2620\207" [bug-reference-setup-from-mail-alist bug-reference-bug-regexp bug-reference-url-format setup-done nil string-match t matching-header throw make-local-variable 2 3] 14 (#$ . 13473)])#@160 Try setting up `bug-reference-mode' based on Gnus group or article.
Test each configuration in `bug-reference-setup-from-mail-alist'
and set it if applicable.
(defalias 'bug-reference-try-setup-from-gnus #[0 "\301\302!\205 \303\300!\205 \205 \304\305\306\"\210\307\310\"\207" [gnus-newsgroup-name derived-mode-p gnus-summary-mode boundp add-hook gnus-article-prepare-hook bug-reference--try-setup-gnus-article bug-reference-maybe-setup-from-mail nil] 3 (#$ . 14398)])
(defalias 'bug-reference--try-setup-gnus-article #[0 "\205\203 \306\307!\205\203 \205\203 \n\205\203 \310\311 !!\205\203 \310\311\n!!\205\203 r q\210\3122\202 \203W \310!\203W \313\304!\210rq\210\f)\313\305!\210rq\210
)\f\203W
\203W \314\312\315\"\210\316r\nq\210\212eb\210\317\211\203y \211@\320!\211\203s \211B\262\266A\202a *\210\321\316\"\2620)\207" [bug-reference-mode gnus-article-buffer gnus-original-article-buffer gnus-summary-buffer bug-reference-bug-regexp bug-reference-url-format derived-mode-p (gnus-article-mode gnus-summary-mode) buffer-live-p get-buffer setup-done make-local-variable throw t nil ("list-id" "to" "from" "cc") mail-fetch-field bug-reference-maybe-setup-from-mail] 6])#@319 Try setting up `bug-reference-mode' from the current rmail mail.
Guesses suitable `bug-reference-bug-regexp' and
`bug-reference-url-format' values by matching the current Rmail
file's name against GROUP-REGEXP and the values of List-Id, To,
From, and Cc against HEADER-REGEXP in
`bug-reference-setup-from-mail-alist'.
(defalias 'bug-reference-try-setup-from-rmail #[0 "\2051 \301\302!\2051 \303\212eb\210\304\211\203( \211@\305!\211\203\"