Skip to content

Commit

Permalink
Forge requires at least Emacs-29.1
Browse files Browse the repository at this point in the history
Emacs-29.1 is required since forge-0.4.5, released on 2024-12-08, see:

magit/forge@35224e5
  • Loading branch information
pkryger committed Dec 9, 2024
1 parent b566158 commit 61db480
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
4 changes: 3 additions & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ after it's been byte compiled."
(exordium-require 'init-dired) ; enable dired+ and wdired permission editing
(exordium-require 'init-git) ; Magit and git gutter
(exordium-require 'init-git-visit-diffs) ; visit diffs in successive narrowed buffers
(exordium-require 'init-forge) ; Forge
(when (version< "29.1" emacs-version)
(exordium-require 'init-forge)) ; Forge

(exordium-require 'init-flb-mode) ; frame-local buffers

(update-progress-bar)
Expand Down
55 changes: 32 additions & 23 deletions modules/init-company.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
(unless (featurep 'init-require)
(load (file-name-concat (locate-user-emacs-file "modules") "init-require"))))
(exordium-require 'init-prefs)
(exordium-require 'init-forge)

(when (version< "29.1" emacs-version)
(exordium-require 'init-forge))

(eval-when-compile
(use-package rtags)) ; init-rtags
Expand All @@ -17,8 +19,34 @@
:diminish "CA"
:demand t
:commands (company-other-backend
company-begin-backend
company-abort)
:custom
(company-idle-delay nil)
(company-files-exclusions '(".git/" ".gitignore" ".gitmodules" ".DS_Store"
".vscode/" ".envrc" ".direnv/" ".clangd"
"venv/" ".venv/"))
(company-transformers '(delete-consecutive-dups))

:config
(setq rtags-completions-enabled t)
(add-to-list 'company-backends
'(company-capf company-yasnippet company-files
:with company-dabbrev-code))

;; Turn on company mode everywhere
(global-company-mode)

:bind
(("C-." . #'company-complete)
("C-c C-\\" . #'company-other-backend)
:map company-active-map
("ESC" . #'company-abort)))

(use-package company
:diminish "CA"
:if (version< "29.1" emacs-version)
:defer t
:commands (company-begin-backend)
:init
(use-package forge-core
:ensure forge
Expand Down Expand Up @@ -71,28 +99,9 @@
assignees))))
(annotation (when-let* ((assignee (get-text-property 0 'full-name arg)))
(format " [%s]" assignee)))))

:custom
(company-idle-delay nil)
(company-files-exclusions '(".git/" ".gitignore" ".gitmodules" ".DS_Store"
".vscode/" ".envrc" ".direnv/" ".clangd"
"venv/" ".venv/"))
(company-transformers '(delete-consecutive-dups))

:config
(setq rtags-completions-enabled t)
(add-to-list 'company-backends
'(company-capf company-yasnippet company-files
:with company-dabbrev-code))
(add-to-list 'company-backends 'exordium-company-assignees)
;; Turn on company mode everywhere
(global-company-mode)

:bind
(("C-." . #'company-complete)
("C-c C-\\" . #'company-other-backend)
:map company-active-map
("ESC" . #'company-abort)))
;; This is block is deferred , so this backed will end up first
(add-to-list 'company-backends 'exordium-company-assignees))

(use-package company-statistics
:after (company)
Expand Down
6 changes: 5 additions & 1 deletion modules/init-forge.t.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
;; M-x ert

;;; Code:

(when (version< "29.1" emacs-version)

(eval-when-compile
(unless (featurep 'init-require)
(load (file-name-concat (locate-user-emacs-file "modules") "init-require"))))
Expand Down Expand Up @@ -70,7 +71,10 @@
(should (string= (concat "owner-1/name-1 @host-1, "
"owner-2/name-2 @host-2")
(exordium-forge-cleanup-known-repositories--concat to-delete)))))


) ;; (version< "29.1" emacs-version)

(provide 'init-forge.t)

;;; init-forge.t.el ends here

0 comments on commit 61db480

Please sign in to comment.