diff options
author | Maciej Barć <xgqt@gentoo.org> | 2022-04-08 18:09:23 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2022-04-08 18:10:12 +0200 |
commit | dd486c071062789d2c715380150b04591912c085 (patch) | |
tree | 86377afa9e117c183f74c5638ca8e5e10c9f9b60 /app-emacs/yasnippet-snippets/files | |
parent | net-mail/automx2: drop 2021.5 (diff) | |
download | gentoo-dd486c071062789d2c715380150b04591912c085.tar.gz gentoo-dd486c071062789d2c715380150b04591912c085.tar.bz2 gentoo-dd486c071062789d2c715380150b04591912c085.zip |
app-emacs/yasnippet-snippets: install el library files
some libraries want to acess "yasnippet-snippets--fixed-indent" or
"yasnippet-snippets-initialize", so let's install the missing
"yasnippet-snippets.el" files providing those functions, also change
how site-gentoo autoloads are handled - call
"yasnippet-snippets-initialize"
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emacs/yasnippet-snippets/files')
-rw-r--r-- | app-emacs/yasnippet-snippets/files/50yasnippet-snippets-gentoo.el | 9 | ||||
-rw-r--r-- | app-emacs/yasnippet-snippets/files/yasnippet-snippets-dir.patch | 18 |
2 files changed, 23 insertions, 4 deletions
diff --git a/app-emacs/yasnippet-snippets/files/50yasnippet-snippets-gentoo.el b/app-emacs/yasnippet-snippets/files/50yasnippet-snippets-gentoo.el index 2db51796990b..4c85ffac5510 100644 --- a/app-emacs/yasnippet-snippets/files/50yasnippet-snippets-gentoo.el +++ b/app-emacs/yasnippet-snippets/files/50yasnippet-snippets-gentoo.el @@ -1,4 +1,5 @@ -(eval-after-load "yasnippet" - '(let ((snippets-dir "@SITEETC@")) - (add-to-list 'yas-snippet-dirs snippets-dir t) - (yas-load-directory snippets-dir t))) +(add-to-list 'load-path "@SITELISP@") +(autoload 'yasnippet-snippets-initialize "yasnippet-snippets" + "Load the `yasnippet-snippets' snippets directory." t) +(eval-after-load 'yasnippet + '(yasnippet-snippets-initialize)) diff --git a/app-emacs/yasnippet-snippets/files/yasnippet-snippets-dir.patch b/app-emacs/yasnippet-snippets/files/yasnippet-snippets-dir.patch new file mode 100644 index 000000000000..2d5c8f2e483b --- /dev/null +++ b/app-emacs/yasnippet-snippets/files/yasnippet-snippets-dir.patch @@ -0,0 +1,18 @@ +index 078ac04..1c84318 100644 +--- a/yasnippet-snippets.el ++++ b/yasnippet-snippets.el +@@ -35,13 +35,7 @@ + (defconst yasnippet-snippets-dir + (expand-file-name + "snippets" +- (file-name-directory +- ;; Copied from ‘f-this-file’ from f.el. +- (cond +- (load-in-progress load-file-name) +- ((and (boundp 'byte-compile-current-file) byte-compile-current-file) +- byte-compile-current-file) +- (:else (buffer-file-name)))))) ++ "@SITEETC@")) + + ;;;###autoload + (defun yasnippet-snippets-initialize () |