From 65212f91fac5938bcf392c273acbebe7c98e7f0d Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Tue, 21 Feb 2023 20:42:30 +0100 Subject: Work around lwarn incompatibility between GNU Emacs and XEmacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ebuild-mode.el (ebuild-mode-update-copyright): Call lwarn with nil as second argument, which works for both GNU Emacs and XEmacs. Signed-off-by: Ulrich Müller --- ChangeLog | 3 +++ ebuild-mode.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31717d8..87aee50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2023-02-21 Ulrich Müller + * ebuild-mode.el (ebuild-mode-update-copyright): Call lwarn with + nil as second argument, which works for both GNU Emacs and XEmacs. + * ebuild-mode.el (ebuild-repo-mode): Check if coding system utf-8-unix exists; it doesn't in XEmacs 21.4. diff --git a/ebuild-mode.el b/ebuild-mode.el index f16be60..8a58bff 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -377,13 +377,15 @@ Compatibility function for XEmacs." (if y2 ;; Update range of years (if (or (> 1999 y1) (>= y1 y2) (> y2 y)) - (lwarn 'ebuild :warning + ;; XEmacs wants 'warning instead of :warning, + ;; but nil always works (and defaults to :warning) + (lwarn 'ebuild nil "Suspicious range of copyright years: %d-%d" y1 y2) (if (/= y2 y) (replace-match year t t nil 2))) ;; Update single year and convert to range if necessary (if (or (> 1999 y1) (> y1 y)) - (lwarn 'ebuild :warning "Suspicious copyright year: %d" y1) + (lwarn 'ebuild nil "Suspicious copyright year: %d" y1) (if (/= y1 y) (replace-match (concat "\\1-" year) t nil nil 1)))))) (if update-author -- cgit v1.2.3-65-gdbad