summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-02-21 20:42:30 +0100
committerUlrich Müller <ulm@gentoo.org>2023-02-21 20:42:30 +0100
commit65212f91fac5938bcf392c273acbebe7c98e7f0d (patch)
tree180523bcf3e12845b6766326a28f23b7bb34c861
parentCheck if utf-8 coding system exists (diff)
downloadebuild-mode-65212f91fac5938bcf392c273acbebe7c98e7f0d.tar.gz
ebuild-mode-65212f91fac5938bcf392c273acbebe7c98e7f0d.tar.bz2
ebuild-mode-65212f91fac5938bcf392c273acbebe7c98e7f0d.zip
Work around lwarn incompatibility between GNU Emacs and XEmacs
* 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 <ulm@gentoo.org>
-rw-r--r--ChangeLog3
-rw-r--r--ebuild-mode.el6
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 <ulm@gentoo.org>
+ * 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