commit:     2052ab77d3856593ae6c41d305377058d22ed0d2
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May  1 17:15:38 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May  1 17:15:38 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=2052ab77

Drop XEmacs compatibility code in eselect-mode

* misc/eselect-mode.el (eselect-mode-before-save):
Call delete-trailing-whitespace which exists in XEmacs 21.5.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog            | 2 ++
 misc/eselect-mode.el | 6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 83b0289..4ef1610 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use
        write-contents-functions instead of obsolete write-contents-hooks.
+       (eselect-mode-before-save): Call delete-trailing-whitespace which
+       exists in XEmacs 21.5.
 
 2022-01-08  Ulrich Müller  <u...@gentoo.org>
 

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 50e88d6..3bdac81 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -96,11 +96,7 @@
 ;;; Mode definitions.
 
 (defun eselect-mode-before-save ()
-  ;;(delete-trailing-whitespace)       ; doesn't exist in XEmacs
-  (save-excursion
-    (goto-char (point-min))
-    (while (re-search-forward "[ \t]+$" nil t)
-      (delete-region (match-beginning 0) (point))))
+  (delete-trailing-whitespace)
   ;; return nil, otherwise the file is presumed to be written
   nil)
 

Reply via email to