Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: latex templates now work with auctex #55

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tempel-collection.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; tempel-collection.el --- Collection of templates for Tempel

Check warning on line 1 in tempel-collection.el

View workflow job for this annotation

GitHub Actions / check (snapshot, false)

file has no ‘lexical-binding’ directive on its first line

;; Copyright (C) 2022 Tempel collection contributors

Expand Down Expand Up @@ -87,7 +87,7 @@
(while (and mode (not (memq mode tempel-collection--loaded)))
(push mode tempel-collection--loaded)
(let ((file
(or (tempel-collection--mode-file (string-remove-suffix "-mode" (symbol-name mode)))
(or (tempel-collection--mode-file (downcase (string-remove-suffix "-mode" (symbol-name mode))))
(tempel-collection--mode-file (alist-get mode tempel-collection--aliases)))))
(when file
(setq tempel-collection--templates
Expand All @@ -102,7 +102,7 @@
append templates))

;;;###autoload
(with-eval-after-load 'tempel

Check warning on line 105 in tempel-collection.el

View workflow job for this annotation

GitHub Actions / check (snapshot, false)

`with-eval-after-load' is for use in configurations, and should rarely be used in packages.
(add-to-list 'tempel-template-sources 'tempel-collection 'append))

(provide 'tempel-collection)
Expand Down
2 changes: 1 addition & 1 deletion templates/latex.eld
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
latex-mode
latex-mode LaTeX-mode

;; taken from https://github.com/minad/tempel/blob/5b09f612cfd805dba5e90bf06580583cab045499/README.org#template-file-format
(abstract "\\begin{abstract}\n" r> n> "\\end{abstract}")
Expand Down
Loading