aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2025-01-06 09:26:20 +1100
committerYuchen Pei <id@ypei.org>2025-01-06 09:26:20 +1100
commit5ec3901c0ce21f4ff8860a31a7f40a4681443e85 (patch)
treef5af50ffe3d83ff82b500bc1679a03dd07c047a1 /emacs/.emacs.d/lisp
parentbb57c3e606d844000ceb725a4f15f7d92a1d5b67 (diff)
[emacs] browse-url calls gitlab infobox
Diffstat (limited to 'emacs/.emacs.d/lisp')
-rw-r--r--emacs/.emacs.d/lisp/my/my-gitlab.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-gitlab.el b/emacs/.emacs.d/lisp/my/my-gitlab.el
index 04d2ba0..ad7f0ed 100644
--- a/emacs/.emacs.d/lisp/my/my-gitlab.el
+++ b/emacs/.emacs.d/lisp/my/my-gitlab.el
@@ -67,6 +67,11 @@
(defun my-gitlab-format-time-string (t)
(format-time-string "%Y-%m-%d %M:%M:%S" (encode-time (parse-time-string t))))
+(defun my-gitlab-project-url-p (url)
+ (let ((urlobj (url-generic-parse-url url)))
+ (and (equal (url-host urlobj) "gitlab.com")
+ (string-match-p "^/[^/]+/[^/]+$" (url-filename urlobj)))))
+
(require 'my-buffer)
(defvar my-gitlab-project-info-specs