diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-10-12 23:31:43 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-10-12 23:44:27 +0200 |
commit | 0858ff6ab5fd7ca5d77e77b798f1d6422b4edcd9 (patch) | |
tree | 4dd4e290601fd2d1f02367259aacce92a28a1bd3 /app-emacs | |
parent | www-client/chromium: drop 130.0.6723.31 (diff) | |
download | gentoo-0858ff6ab5fd7ca5d77e77b798f1d6422b4edcd9.tar.gz gentoo-0858ff6ab5fd7ca5d77e77b798f1d6422b4edcd9.tar.bz2 gentoo-0858ff6ab5fd7ca5d77e77b798f1d6422b4edcd9.zip |
app-emacs/rnc-mode: Fix byte-compile warnings
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-emacs')
-rw-r--r-- | app-emacs/rnc-mode/files/rnc-mode-1.0.6-flymake.patch | 30 | ||||
-rw-r--r-- | app-emacs/rnc-mode/files/rnc-mode-1.0.6-font-lock.patch | 33 | ||||
-rw-r--r-- | app-emacs/rnc-mode/rnc-mode-1.0.6-r1.ebuild (renamed from app-emacs/rnc-mode/rnc-mode-1.0.6.ebuild) | 8 |
3 files changed, 69 insertions, 2 deletions
diff --git a/app-emacs/rnc-mode/files/rnc-mode-1.0.6-flymake.patch b/app-emacs/rnc-mode/files/rnc-mode-1.0.6-flymake.patch new file mode 100644 index 000000000000..6904a063c682 --- /dev/null +++ b/app-emacs/rnc-mode/files/rnc-mode-1.0.6-flymake.patch @@ -0,0 +1,30 @@ +Update function and variable names that are obsolete since Emacs 26 + +--- rnc-mode-1.0.6/rnc-mode.el ++++ rnc-mode-1.0.6/rnc-mode.el +@@ -113,8 +113,8 @@ + + (defun rnc-flymake-init () + "Flymake init function for running Jing on the schema." +- (let* ((temp-file (flymake-init-create-temp-buffer-copy +- 'flymake-create-temp-inplace)) ++ (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy ++ 'flymake-proc-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) +@@ -123,11 +123,11 @@ + (defun rnc-configure-flymake () + (if (and (stringp rnc-jing-jar-file) + (file-exists-p rnc-jing-jar-file)) +- (add-to-list 'flymake-allowed-file-name-masks ++ (add-to-list 'flymake-proc-allowed-file-name-masks + '(".+\\.rnc$" + rnc-flymake-init +- flymake-simple-cleanup +- flymake-get-real-file-name)) ++ flymake-proc-simple-cleanup ++ flymake-proc-get-real-file-name)) + (message "RNC flymake not enabled because the Jing jar could not be found"))) + + ;;; Imenu support diff --git a/app-emacs/rnc-mode/files/rnc-mode-1.0.6-font-lock.patch b/app-emacs/rnc-mode/files/rnc-mode-1.0.6-font-lock.patch new file mode 100644 index 000000000000..5f615468ed11 --- /dev/null +++ b/app-emacs/rnc-mode/files/rnc-mode-1.0.6-font-lock.patch @@ -0,0 +1,33 @@ +Remove indirection for face names + +--- rnc-mode-1.0.6/rnc-mode.el ++++ rnc-mode-1.0.6/rnc-mode.el +@@ -156,24 +156,17 @@ + (concat (substring result 0 -2) "\\)")) + (setq result (concat result op "\\|"))))) + +-;; Font lock treats face names differently in GNU Emacs and XEmacs +-;; The following defvars is a workaround +- +-(defvar italic 'italic) +-(defvar default 'default) +-(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face) +- + (defvar rnc-font-lock-keywords + (list + '("\\b\\(attribute\\|element\\)\\b\\([^{]+\\){" 2 + font-lock-variable-name-face) +- '("[a-zA-Z][-a-zA-Z0-9._]*:[a-zA-Z][-a-zA-Z0-9._]*" . italic) ++ '("[a-zA-Z][-a-zA-Z0-9._]*:[a-zA-Z][-a-zA-Z0-9._]*" . 'italic) + '("\\b\\(default\\(\\s +namespace\\)?\\|namespace\\|datatypes\\)\\(\\s +[a-zA-Z][-a-zA-Z0-9._]*\\)?\\s *=" 1 font-lock-preprocessor-face) + '("\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\(\\s \\|\n\\)*[|&]?=" 1 + font-lock-function-name-face) +- '("[a-zA-Z][a-zA-Z0-9._]*\\(-[a-zA-Z][a-zA-Z0-9._]*\\)+" . default) +- (cons (rnc-make-regexp-choice rnc-atoms) 'italic) +- (cons (rnc-make-regexp-choice rnc-keywords) font-lock-keyword-face) ++ '("[a-zA-Z][a-zA-Z0-9._]*\\(-[a-zA-Z][a-zA-Z0-9._]*\\)+" . 'default) ++ (cons (rnc-make-regexp-choice rnc-atoms) ''italic) ++ (cons (rnc-make-regexp-choice rnc-keywords) 'font-lock-keyword-face) + ) + "RNC Highlighting") + diff --git a/app-emacs/rnc-mode/rnc-mode-1.0.6.ebuild b/app-emacs/rnc-mode/rnc-mode-1.0.6-r1.ebuild index 6dd83e053d79..820aaf70cc00 100644 --- a/app-emacs/rnc-mode/rnc-mode-1.0.6.ebuild +++ b/app-emacs/rnc-mode/rnc-mode-1.0.6-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit elisp @@ -14,5 +14,9 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" +PATCHES=( + "${FILESDIR}/${P}-flymake.patch" + "${FILESDIR}/${P}-font-lock.patch" +) SITEFILE="50${PN}-gentoo.el" DOCS="README.md" |