mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 09:01:55 +02:00
eclass/elisp-common: Sync with Gentoo
It's from Gentoo commit 4066b05ec44ace7c595a38cc94497037c3b9b8aa.
This commit is contained in:
parent
be50183ea9
commit
28adc27afd
@ -25,7 +25,7 @@
|
|||||||
# When relying on the emacs USE flag, you need to add
|
# When relying on the emacs USE flag, you need to add
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# emacs? ( >=app-editors/emacs-25.3:* )
|
# emacs? ( >=app-editors/emacs-25.3:* )
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# to your DEPEND/RDEPEND line and use the functions provided here to
|
# to your DEPEND/RDEPEND line and use the functions provided here to
|
||||||
@ -39,7 +39,7 @@
|
|||||||
# NEED_EMACS with the Emacs version, as in the following example:
|
# NEED_EMACS with the Emacs version, as in the following example:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# NEED_EMACS=26.1
|
# NEED_EMACS=26.1
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Please note that this should be done only for packages that are known
|
# Please note that this should be done only for packages that are known
|
||||||
@ -54,7 +54,7 @@
|
|||||||
# are loadable.
|
# are loadable.
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-compile *.el
|
# elisp-compile *.el
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Function elisp-make-autoload-file() can be used to generate a file
|
# Function elisp-make-autoload-file() can be used to generate a file
|
||||||
@ -75,7 +75,7 @@
|
|||||||
# (see below) the change, as it defaults to ${PN}.
|
# (see below) the change, as it defaults to ${PN}.
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-install ${PN} *.el *.elc
|
# elisp-install ${PN} *.el *.elc
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# To let the Emacs support be activated by Emacs on startup, you need
|
# To let the Emacs support be activated by Emacs on startup, you need
|
||||||
@ -84,9 +84,9 @@
|
|||||||
# Normally this would look like this:
|
# Normally this would look like this:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# (add-to-list 'load-path "@SITELISP@")
|
# (add-to-list 'load-path "@SITELISP@")
|
||||||
# (add-to-list 'auto-mode-alist '("\\.csv\\'" . csv-mode))
|
# (add-to-list 'auto-mode-alist '("\\.csv\\'" . csv-mode))
|
||||||
# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
|
# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# If your Emacs support files are installed in a subdirectory of
|
# If your Emacs support files are installed in a subdirectory of
|
||||||
@ -117,13 +117,13 @@
|
|||||||
# your ebuild (e.g., right after S or RDEPEND):
|
# your ebuild (e.g., right after S or RDEPEND):
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# SITEFILE="50${PN}-gentoo.el"
|
# SITEFILE="50${PN}-gentoo.el"
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Which is then installed by
|
# Which is then installed by
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
# elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# in src_install(). Any characters after the "-gentoo" part and before
|
# in src_install(). Any characters after the "-gentoo" part and before
|
||||||
@ -137,7 +137,7 @@
|
|||||||
# and install a site-init file that does just that:
|
# and install a site-init file that does just that:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-make-site-file "${SITEFILE}"
|
# elisp-make-site-file "${SITEFILE}"
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Again, this must be called in src_install(). See the function's
|
# Again, this must be called in src_install(). See the function's
|
||||||
@ -153,7 +153,7 @@
|
|||||||
# version. In this case, you can add an explicit check in pkg_setup:
|
# version. In this case, you can add an explicit check in pkg_setup:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-check-emacs-version
|
# elisp-check-emacs-version
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# When having optional Emacs support, you should prepend "use emacs &&"
|
# When having optional Emacs support, you should prepend "use emacs &&"
|
||||||
@ -165,13 +165,13 @@
|
|||||||
# emerging and unmerging by using
|
# emerging and unmerging by using
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# pkg_postinst() {
|
# pkg_postinst() {
|
||||||
# elisp-site-regen
|
# elisp-site-regen
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# pkg_postrm() {
|
# pkg_postrm() {
|
||||||
# elisp-site-regen
|
# elisp-site-regen
|
||||||
# }
|
# }
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Again, with optional Emacs support, you should prepend "use emacs &&"
|
# Again, with optional Emacs support, you should prepend "use emacs &&"
|
||||||
@ -260,7 +260,6 @@ elisp-emacs-version() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: elisp-check-emacs-version
|
# @FUNCTION: elisp-check-emacs-version
|
||||||
# @USAGE: [version]
|
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Test if the eselected Emacs version is at least the version of
|
# Test if the eselected Emacs version is at least the version of
|
||||||
# GNU Emacs specified in the NEED_EMACS variable, or die otherwise.
|
# GNU Emacs specified in the NEED_EMACS variable, or die otherwise.
|
||||||
@ -356,8 +355,8 @@ elisp-make-autoload-file() {
|
|||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# @CODE
|
# @CODE
|
||||||
# elisp-org-export-to texinfo README.org
|
# elisp-org-export-to texinfo README.org
|
||||||
# mv README.texi ${PN}.texi || die
|
# mv README.texi ${PN}.texi || die
|
||||||
# @CODE
|
# @CODE
|
||||||
|
|
||||||
elisp-org-export-to() {
|
elisp-org-export-to() {
|
||||||
@ -512,16 +511,16 @@ elisp-test-ert() {
|
|||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# @CODE
|
# @CODE
|
||||||
# inherit elisp-common
|
# inherit elisp-common
|
||||||
#
|
#
|
||||||
# ...
|
# ...
|
||||||
#
|
#
|
||||||
# elisp-enable-tests --optional ert-runner "${S}"/elisp -t "!org"
|
# elisp-enable-tests --optional ert-runner "${S}"/elisp -t "!org"
|
||||||
#
|
#
|
||||||
# src_test() {
|
# src_test() {
|
||||||
# emake -C tests test
|
# emake -C tests test
|
||||||
# elisp-test
|
# elisp-test
|
||||||
# }
|
# }
|
||||||
# @CODE
|
# @CODE
|
||||||
|
|
||||||
elisp-enable-tests() {
|
elisp-enable-tests() {
|
||||||
@ -662,7 +661,7 @@ elisp-site-file-install() {
|
|||||||
# this will add the package's SITELISP subdirectory to Emacs' load-path:
|
# this will add the package's SITELISP subdirectory to Emacs' load-path:
|
||||||
#
|
#
|
||||||
# @CODE
|
# @CODE
|
||||||
# (add-to-list 'load-path "@SITELISP@")
|
# (add-to-list 'load-path "@SITELISP@")
|
||||||
# @CODE
|
# @CODE
|
||||||
#
|
#
|
||||||
# Additional arguments are appended as lines to the destination file.
|
# Additional arguments are appended as lines to the destination file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user