[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-11-05 Thread Ulrich Müller
commit: 88eb5c77a9aa08a1e69bc41aea73c78e8e7a26f4
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Nov  5 17:31:24 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Nov  5 17:31:24 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=88eb5c77

eselect-mode: Doc fix

* misc/eselect-mode.el: Doc fix.

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

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

diff --git a/ChangeLog b/ChangeLog
index c0fe120..da11122 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-11-05  Ulrich Müller  
+
+   * misc/eselect-mode.el: Doc fix.
+
 2023-10-06  Ulrich Müller  
 
* misc/eselect-mode.el (eselect-mode, eselect-mode-hook):

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index d6fc68e..6ffa88f 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -131,6 +131,8 @@
  (replace-match (concat "\\1-" year) t nil nil 1)
 
 (defun eselect-mode-before-save ()
+  "Function to be called before saving a buffer.
+This will be added to the `write-contents-functions' hook."
   (when eselect-mode-fix-whitespace
 (delete-trailing-whitespace))
   (when eselect-mode-update-copyright



[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-10-21 Thread Ulrich Müller
commit: aa4697a70dec32ad6e7e371899968afc7fe338e6
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Oct  6 07:38:41 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Oct  6 07:38:41 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=aa4697a7

eselect-mode: Use #' for quoting of function names

* misc/eselect-mode.el (eselect-mode, eselect-mode-hook):
Sharp-quote the function names.

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

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

diff --git a/ChangeLog b/ChangeLog
index 13bbc97..c0fe120 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2023-10-06  Ulrich Müller  
 
+   * misc/eselect-mode.el (eselect-mode, eselect-mode-hook):
+   Sharp-quote the function names.
+
* misc/eselect-mode.el (eselect-mode-add-font-lock): New function.
(eselect-mode-hook): Add it, instead of an anonymous function.
 

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 06843df..d6fc68e 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -143,7 +143,7 @@
 ;;;###autoload
 (define-derived-mode eselect-mode sh-mode "Eselect"
   "Major mode for .eselect files."
-  (add-hook 'write-contents-functions 'eselect-mode-before-save t t)
+  (add-hook 'write-contents-functions #'eselect-mode-before-save t t)
   (sh-set-shell "bash")
   (setq tab-width 4)
   (setq indent-tabs-mode t))
@@ -152,7 +152,7 @@
   "Add `eselect-mode' font-lock keywords for the current buffer."
   (font-lock-add-keywords nil eselect-mode-font-lock-keywords))
 
-(add-hook 'eselect-mode-hook 'eselect-mode-add-font-lock)
+(add-hook 'eselect-mode-hook #'eselect-mode-add-font-lock)
 
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode))



[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-10-06 Thread Ulrich Müller
commit: 2f9084ac529bcd514a3546a9d7f9a376f1c4a5d5
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Oct  6 07:36:28 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Oct  6 07:36:28 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=2f9084ac

eselect-mode: Use named function in hook variable

* misc/eselect-mode.el (eselect-mode-add-font-lock): New function.
(eselect-mode-hook): Add it, instead of an anonymous function.

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

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

diff --git a/ChangeLog b/ChangeLog
index 65307ec..13bbc97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-06  Ulrich Müller  
+
+   * misc/eselect-mode.el (eselect-mode-add-font-lock): New function.
+   (eselect-mode-hook): Add it, instead of an anonymous function.
+
 2023-09-13  Ulrich Müller  
 
* configure.ac: Update version to 1.4.27.

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index e59c90c..06843df 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -148,10 +148,11 @@
   (setq tab-width 4)
   (setq indent-tabs-mode t))
 
-(add-hook 'eselect-mode-hook
- (lambda () (font-lock-add-keywords
- nil eselect-mode-font-lock-keywords)))
+(defun eselect-mode-add-font-lock ()
+  "Add `eselect-mode' font-lock keywords for the current buffer."
+  (font-lock-add-keywords nil eselect-mode-font-lock-keywords))
 
+(add-hook 'eselect-mode-hook 'eselect-mode-add-font-lock)
 
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode))



[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-08-25 Thread Ulrich Müller
commit: e8d1843145399daeee83fb6793074bf80b06cad3
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Aug 24 21:35:38 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Aug 25 08:39:59 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e8d18431

eselect-mode: Enable lexical binding

* misc/eselect-mode.el: Enable lexical binding.

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

 ChangeLog| 2 ++
 misc/eselect-mode.el | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 670bbcf..f9ee3f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2023-08-24  Ulrich Müller  
 
+   * misc/eselect-mode.el: Enable lexical binding.
+
* misc/eselect-mode.el (eselect-mode): Refer to sh-mode directly,
instead of shell-script-mode which is its alias.
 

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 57791f8..e59c90c 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -1,4 +1,4 @@
-;;; eselect-mode.el --- edit eselect files
+;;; eselect-mode.el --- edit eselect files  -*-lexical-binding:t-*-
 
 ;; Copyright 2006-2023 Gentoo Authors
 



[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-08-24 Thread Ulrich Müller
commit: 78b2c7b63e382bf3dd989b2f680ccdff356a39cc
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Aug 24 17:31:49 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Aug 24 17:31:49 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=78b2c7b6

eselect-mode: Refer to sh-mode instead of shell-script-mode

* misc/eselect-mode.el (eselect-mode): Refer to sh-mode directly,
instead of shell-script-mode which is its alias.

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

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

diff --git a/ChangeLog b/ChangeLog
index e534492..670bbcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-08-24  Ulrich Müller  
+
+   * misc/eselect-mode.el (eselect-mode): Refer to sh-mode directly,
+   instead of shell-script-mode which is its alias.
+
 2023-08-22  Ulrich Müller  
 
* doc/developer-guide.txt: Update documentation for "has".

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index bfcf494..57791f8 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -141,7 +141,7 @@
   nil)
 
 ;;;###autoload
-(define-derived-mode eselect-mode shell-script-mode "Eselect"
+(define-derived-mode eselect-mode sh-mode "Eselect"
   "Major mode for .eselect files."
   (add-hook 'write-contents-functions 'eselect-mode-before-save t t)
   (sh-set-shell "bash")



[gentoo-commits] proj/eselect:master commit in: misc/, /

2023-06-12 Thread Ulrich Müller
commit: 4ebe3143212afa53ffc2f88156cc69a4f383375b
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Jun 12 15:48:17 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jun 12 15:48:17 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=4ebe3143

eselect-mode: Update copyright years before writing a file

* misc/eselect-mode.el (eselect, eselect-mode-fix-whitespace)
(eselect-mode-update-copyright): New custom group and variables.
(eselect-mode-copyright-regexp): New variable.
(eselect-mode-update-copyright): New function, mostly copied from
ebuild-mode-update-copyright in ebuild-mode.el.
(eselect-mode-before-save): Make fixing of whitespace conditional.
Update copyright years when customised to do so.

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

 ChangeLog| 10 ++
 misc/eselect-mode.el | 53 ++--
 2 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 87efe93..fd75fe3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-06-12  Ulrich Müller  
+
+   * misc/eselect-mode.el (eselect, eselect-mode-fix-whitespace)
+   (eselect-mode-update-copyright): New custom group and variables.
+   (eselect-mode-copyright-regexp): New variable.
+   (eselect-mode-update-copyright): New function, mostly copied from
+   ebuild-mode-update-copyright in ebuild-mode.el.
+   (eselect-mode-before-save): Make fixing of whitespace conditional.
+   Update copyright years when customised to do so.
+
 2023-06-07  Ulrich Müller  
 
* bin/eselect.in (PATH): Use printf instead of echo.

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index d7ea649..d2df858 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -1,6 +1,6 @@
 ;;; eselect-mode.el --- edit eselect files
 
-;; Copyright 2006-2022 Gentoo Authors
+;; Copyright 2006-2023 Gentoo Authors
 
 ;; Author: Matthew Kennedy 
 ;; Diego Pettenò 
@@ -31,6 +31,26 @@
 (require 'sh-script)
 (require 'font-lock)
 
+;;; Variables.
+
+(defgroup eselect nil
+  "Major mode for Gentoo eselect modules."
+  :group 'languages)
+
+(defcustom eselect-mode-fix-whitespace t
+  "If non-nil, delete trailing whitespace before writing a file."
+  :type 'boolean
+  :group 'eselect)
+
+(defcustom eselect-mode-update-copyright t
+  "If non-nil, update copyright years before writing a file."
+  :type 'boolean
+  :group 'eselect)
+
+(defvar eselect-mode-copyright-regexp
+  "^#[ \t]*Copyright[ \t]+\\([1-9][0-9]+\\)\\(?:-\\([1-9][0-9]+\\)\\)?\
+[ \t]+\\(.*\\.*\\)")
+
 ;;; Font-lock.
 
 (defvar eselect-mode-keywords-warn
@@ -86,8 +106,37 @@
 
 ;;; Mode definitions.
 
+(defun eselect-mode-update-copyright ()
+  "Update the copyright notice in the file's header."
+  (save-excursion
+(goto-char (point-min))
+(let ((case-fold-search nil))
+  (when (re-search-forward eselect-mode-copyright-regexp 400 t)
+   (let* ((y1 (string-to-number (match-string 1)))
+  (y2 (and (match-string 2)
+   (string-to-number (match-string 2
+  (year (save-match-data (format-time-string "%Y" nil t)))
+  (y (string-to-number year)))
+ (if y2
+ ;; Update range of years
+ (if (or (> 2005 y1) (>= y1 y2) (> y2 y))
+ (lwarn 'eselect :warning
+"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 (> 2005 y1) (> y1 y))
+   (lwarn 'eselect :warning "Suspicious copyright year: %d" y1)
+ (if (/= y1 y)
+ (replace-match (concat "\\1-" year) t nil nil 1)
+
 (defun eselect-mode-before-save ()
-  (delete-trailing-whitespace)
+  (when eselect-mode-fix-whitespace
+(delete-trailing-whitespace))
+  (when eselect-mode-update-copyright
+(eselect-mode-update-copyright)
+;; call it only once per buffer
+(set (make-local-variable 'eselect-mode-update-copyright) nil))
   ;; return nil, otherwise the file is presumed to be written
   nil)
 



[gentoo-commits] proj/eselect:master commit in: /, misc/

2023-06-12 Thread Ulrich Müller
commit: b2ae3184ccfcb1ff932f207ca432ebbf964de0c1
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Jun 12 15:51:59 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jun 12 15:51:59 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=b2ae3184

eselect-mode: Drop XEmacs compatibility code

* misc/eselect-mode.el (eselect-mode): Drop XEmacs compatibility
code.

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

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

diff --git a/ChangeLog b/ChangeLog
index fd75fe3..a5532ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2023-06-12  Ulrich Müller  
 
+   * misc/eselect-mode.el (eselect-mode): Drop XEmacs compatibility
+   code.
+
* misc/eselect-mode.el (eselect, eselect-mode-fix-whitespace)
(eselect-mode-update-copyright): New custom group and variables.
(eselect-mode-copyright-regexp): New variable.

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index d2df858..bfcf494 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -143,10 +143,7 @@
 ;;;###autoload
 (define-derived-mode eselect-mode shell-script-mode "Eselect"
   "Major mode for .eselect files."
-  (if (not (featurep 'xemacs))
-  (add-hook 'write-contents-functions 'eselect-mode-before-save t t)
-(make-local-hook 'write-contents-hooks)
-(add-hook 'write-contents-hooks 'eselect-mode-before-save t t))
+  (add-hook 'write-contents-functions 'eselect-mode-before-save t t)
   (sh-set-shell "bash")
   (setq tab-width 4)
   (setq indent-tabs-mode t))



[gentoo-commits] proj/eselect:master commit in: /, misc/

2023-02-27 Thread Ulrich Müller
commit: 3ac9bf6ea721335a5ad7e6d924cb3a5950a8ac13
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Feb 27 17:11:25 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Feb 27 17:11:25 2023 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=3ac9bf6e

Update option list in bash completion

* misc/eselect.bashcomp (_eselect): Add --eprefix and --root
options.

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

 ChangeLog | 5 +
 misc/eselect.bashcomp | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b442b8b..141e377 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-27  Ulrich Müller  
+
+   * misc/eselect.bashcomp (_eselect): Add --eprefix and --root
+   options.
+
 2023-02-26  Ulrich Müller  
 
* bin/eselect.in: New global option --eprefix.

diff --git a/misc/eselect.bashcomp b/misc/eselect.bashcomp
index 7e33285..3ef614e 100644
--- a/misc/eselect.bashcomp
+++ b/misc/eselect.bashcomp
@@ -1,5 +1,5 @@
 # -*- mode: sh; indent-tabs-mode: nil; -*-  vim: set ft=sh tw=80 sw=4 et :
-# Copyright 2005-2020 Gentoo Authors
+# Copyright 2005-2023 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 
 # bash command-line completion for eselect
@@ -8,7 +8,7 @@
 
 _eselect() {
 local cur sedcmd2 sedcmd3 possibles
-local options="--brief --color= --colour="
+local options="--brief --color= --colour= --eprefix= --root="
 COMPREPLY=()
 cur="${COMP_WORDS[COMP_CWORD]}"
 sedcmd2='s/^  \([[:alnum:]-][[:alnum:]_-]*\)[[:space:],].*$/\1/p'



[gentoo-commits] proj/eselect:master commit in: misc/, /

2022-05-01 Thread Ulrich Müller
commit: 2052ab77d3856593ae6c41d305377058d22ed0d2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun May  1 17:15:38 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun May  1 17:15:38 2022 +
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  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  
 

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)
 



[gentoo-commits] proj/eselect:master commit in: /, misc/

2022-05-01 Thread Ulrich Müller
commit: 03dd0b50c278ae49bfcae50fb53eb7fb42ca3829
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun May  1 17:32:10 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun May  1 17:32:10 2022 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=03dd0b50

eselect-mode: Remove eselect-mode-make-keywords-list function

* misc/eselect-mode.el (eselect-mode-make-keywords-list): Remove.
(eselect-mode-font-lock-keywords): Inline its code. \< \> around
a regexp can be obtained via the paren option of regexp-opt.

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

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

diff --git a/ChangeLog b/ChangeLog
index 4ef1610..6fcf0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
write-contents-functions instead of obsolete write-contents-hooks.
(eselect-mode-before-save): Call delete-trailing-whitespace which
exists in XEmacs 21.5.
+   (eselect-mode-make-keywords-list): Remove function.
+   (eselect-mode-font-lock-keywords): Inline its code. \< \> around
+   a regexp can be obtained via the paren option of regexp-opt.
 
 2022-01-08  Ulrich Müller  
 

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 3bdac81..d7ea649 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -69,20 +69,11 @@
  "get_repo_news_dir" "env_update")
 font-lock-type-face))
 
-(defun eselect-mode-make-keywords-list (keywords-list face
-  prefix suffix)
-  ;; based on `generic-make-keywords-list' from generic.el
-  ;; Note: XEmacs doesn't have generic.el
-  (unless (listp keywords-list)
-(error "Keywords argument must be a list of strings"))
-  (cons (concat prefix "\\<"
-   (regexp-opt keywords-list t)
-   "\\>" suffix)
-   face))
-
 (defvar eselect-mode-font-lock-keywords
   (mapcar
-   (lambda (x) (apply 'eselect-mode-make-keywords-list x))
+   (lambda (x)
+ (cons (regexp-opt (car x) 'words)
+  (cadr x)))
(list
 eselect-mode-keywords-warn
 eselect-mode-keywords-core



[gentoo-commits] proj/eselect:master commit in: /, misc/

2022-05-01 Thread Ulrich Müller
commit: 197e833501a270c0f828eb097eacb14679ae1ba2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun May  1 17:11:21 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun May  1 17:11:21 2022 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=197e8335

Fix a byte-compile warning in eselect-mode

* misc/eselect-mode.el (eselect-mode): For GNU Emacs, use
write-contents-functions instead of obsolete write-contents-hooks.

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

 ChangeLog| 5 +
 misc/eselect-mode.el | 9 +
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8089935..83b0289 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-01  Ulrich Müller  
+
+   * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use
+   write-contents-functions instead of obsolete write-contents-hooks.
+
 2022-01-08  Ulrich Müller  
 
* configure.ac: Update version to 1.4.20.

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 667411b..50e88d6 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -1,6 +1,6 @@
 ;;; eselect-mode.el --- edit eselect files
 
-;; Copyright 2006-2020 Gentoo Authors
+;; Copyright 2006-2022 Gentoo Authors
 
 ;; Author: Matthew Kennedy 
 ;; Diego Pettenò 
@@ -107,9 +107,10 @@
 ;;;###autoload
 (define-derived-mode eselect-mode shell-script-mode "Eselect"
   "Major mode for .eselect files."
-  (if (featurep 'xemacs)
-  (make-local-hook 'write-contents-hooks))
-  (add-hook 'write-contents-hooks 'eselect-mode-before-save t t)
+  (if (not (featurep 'xemacs))
+  (add-hook 'write-contents-functions 'eselect-mode-before-save t t)
+(make-local-hook 'write-contents-hooks)
+(add-hook 'write-contents-hooks 'eselect-mode-before-save t t))
   (sh-set-shell "bash")
   (setq tab-width 4)
   (setq indent-tabs-mode t))



[gentoo-commits] proj/eselect:master commit in: misc/

2018-12-09 Thread Ulrich Müller
commit: e0c3320098d6a91661035eb54377bbfcf8b93ff2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec  9 22:35:05 2018 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Dec  9 22:35:05 2018 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e0c33200

Use simplified copyright notice for GLEP 76 compliance.

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

 misc/eselect-mode.el | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el
index 77eeed9..d914d83 100644
--- a/misc/eselect-mode.el
+++ b/misc/eselect-mode.el
@@ -1,9 +1,6 @@
 ;;; eselect-mode.el --- edit eselect files
 
-;; Copyright 2006 Matthew Kennedy
-;; Copyright 2006 Diego Pettenò
-;; Copyright 2007-2012 Christian Faulhammer
-;; Copyright 2007-2018 Ulrich Müller
+;; Copyright 2006-2018 Gentoo Authors
 
 ;; Author: Matthew Kennedy 
 ;; Diego Pettenò 



[gentoo-commits] proj/eselect:master commit in: misc/, /, man/, bin/, modules/, libs/

2018-01-08 Thread Ulrich Müller
commit: 7b4a81e02cf6b98f12297c18a557a700fc991bd2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Jan  8 22:59:25 2018 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jan  8 22:59:25 2018 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=7b4a81e0

Update copyright years.

 README | 2 +-
 bin/eselect.in | 4 ++--
 libs/config.bash.in| 2 +-
 libs/core.bash.in  | 2 +-
 libs/default.eselect.in| 2 +-
 libs/editor-variable.bash.in   | 2 +-
 libs/manip.bash.in | 2 +-
 libs/multilib.bash.in  | 2 +-
 libs/output.bash.in| 2 +-
 libs/package-manager.bash.in   | 2 +-
 libs/path-manipulation.bash.in | 2 +-
 libs/skel.bash.in  | 2 +-
 libs/tests.bash.in | 2 +-
 man/editor.eselect.5   | 2 +-
 man/env.eselect.5  | 2 +-
 man/eselect.1  | 2 +-
 man/kernel.eselect.5   | 2 +-
 man/news.eselect.5 | 2 +-
 man/pager.eselect.5| 2 +-
 man/profile.eselect.5  | 2 +-
 man/rc.eselect.5   | 2 +-
 man/visual.eselect.5   | 2 +-
 misc/eselect-mode.el   | 2 +-
 misc/eselect.bashcomp  | 2 +-
 modules/config.eselect | 2 +-
 modules/cow.eselect| 2 +-
 modules/editor.eselect | 2 +-
 modules/env.eselect| 2 +-
 modules/kernel.eselect | 2 +-
 modules/locale.eselect | 2 +-
 modules/modules.eselect| 2 +-
 modules/news.eselect   | 2 +-
 modules/pager.eselect  | 2 +-
 modules/profile.eselect| 2 +-
 modules/rc.eselect | 2 +-
 modules/visual.eselect | 2 +-
 36 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/README b/README
index a7ccd3a..57498d3 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ See ``doc/``. Use ``make html`` for HTML versions.
 Copyright
 -
 
-eselect is Copyright (c) 2005-2017 Gentoo Foundation. This code is
+eselect is Copyright (c) 2005-2018 Gentoo Foundation. This code is
 distributed under the terms of the `GNU General Public License,
 version 2 or later`__.
 

diff --git a/bin/eselect.in b/bin/eselect.in
index 7b1f019..432f4e8 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -1,6 +1,6 @@
 #!@BASH@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #
@@ -98,7 +98,7 @@ es_do_help() {
 es_do_version() {
echo "eselect ${ESELECT_VERSION}"
echo
-   echo "Copyright (c) 2005-2017 Gentoo Foundation."
+   echo "Copyright (c) 2005-2018 Gentoo Foundation."
echo "Distributed under the terms of the GNU GPL version 2 or later."
 }
 

diff --git a/libs/config.bash.in b/libs/config.bash.in
index 96648eb..33a2695 100644
--- a/libs/config.bash.in
+++ b/libs/config.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/core.bash.in b/libs/core.bash.in
index 281dbde..6f77626 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/default.eselect.in b/libs/default.eselect.in
index 8eb2cd6..b889f95 100644
--- a/libs/default.eselect.in
+++ b/libs/default.eselect.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/editor-variable.bash.in b/libs/editor-variable.bash.in
index 23072a9..61bd981 100644
--- a/libs/editor-variable.bash.in
+++ b/libs/editor-variable.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/manip.bash.in b/libs/manip.bash.in
index f247c56..9e066f2 100644
--- a/libs/manip.bash.in
+++ b/libs/manip.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/multilib.bash.in b/libs/multilib.bash.in
index b483dd7..4225adb 100644
--- a/libs/multilib.bash.in
+++ b/libs/multilib.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2017 Gentoo Foundation
+# Copyright (c) 2005-2018 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/output.bash.in b/libs/output.bash.in
index fa47820..23413d4 100644
--- 

[gentoo-commits] proj/eselect:master commit in: misc/, /, man/, libs/, modules/, bin/

2016-01-27 Thread Ulrich Müller
commit: f0be71199acd32f312e9de82cf9f9a572d2281be
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jan 27 19:33:28 2016 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jan 27 19:33:28 2016 +
URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=f0be7119

Happy new year 2016!

 README | 2 +-
 bin/eselect.in | 4 ++--
 libs/config.bash.in| 2 +-
 libs/core.bash.in  | 2 +-
 libs/default.eselect.in| 2 +-
 libs/editor-variable.bash.in   | 2 +-
 libs/manip.bash.in | 2 +-
 libs/multilib.bash.in  | 2 +-
 libs/output.bash.in| 2 +-
 libs/package-manager.bash.in   | 2 +-
 libs/path-manipulation.bash.in | 2 +-
 libs/skel.bash.in  | 2 +-
 libs/tests.bash.in | 2 +-
 man/editor.eselect.5   | 2 +-
 man/env.eselect.5  | 2 +-
 man/eselect.1  | 2 +-
 man/kernel.eselect.5   | 2 +-
 man/news.eselect.5 | 2 +-
 man/pager.eselect.5| 2 +-
 man/profile.eselect.5  | 2 +-
 man/rc.eselect.5   | 2 +-
 man/visual.eselect.5   | 2 +-
 misc/eselect-mode.el   | 2 +-
 misc/eselect.bashcomp  | 2 +-
 modules/config.eselect | 2 +-
 modules/cow.eselect| 2 +-
 modules/editor.eselect | 2 +-
 modules/env.eselect| 2 +-
 modules/kernel.eselect | 2 +-
 modules/locale.eselect | 2 +-
 modules/modules.eselect| 2 +-
 modules/news.eselect   | 2 +-
 modules/pager.eselect  | 2 +-
 modules/profile.eselect| 2 +-
 modules/rc.eselect | 2 +-
 modules/visual.eselect | 2 +-
 36 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/README b/README
index b107b32..945dc41 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ See ``doc/``. Use ``make html`` for HTML versions.
 Copyright
 -
 
-eselect is Copyright (c) 2005-2015 Gentoo Foundation. This code is
+eselect is Copyright (c) 2005-2016 Gentoo Foundation. This code is
 distributed under the terms of the `GNU General Public License,
 version 2 or later`__.
 

diff --git a/bin/eselect.in b/bin/eselect.in
index c446d46..67266f4 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -1,6 +1,6 @@
 #!@BASH@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #
@@ -98,7 +98,7 @@ es_do_help() {
 es_do_version() {
echo "eselect ${ESELECT_VERSION}"
echo
-   echo "Copyright (c) 2005-2015 Gentoo Foundation."
+   echo "Copyright (c) 2005-2016 Gentoo Foundation."
echo "Distributed under the terms of the GNU GPL version 2 or later."
 }
 

diff --git a/libs/config.bash.in b/libs/config.bash.in
index 940c64b..80ef798 100644
--- a/libs/config.bash.in
+++ b/libs/config.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/core.bash.in b/libs/core.bash.in
index 8cd4e54..6b6f049 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/default.eselect.in b/libs/default.eselect.in
index f0e9ee3..bc91cf4 100644
--- a/libs/default.eselect.in
+++ b/libs/default.eselect.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/editor-variable.bash.in b/libs/editor-variable.bash.in
index 22ec188..ec40827 100644
--- a/libs/editor-variable.bash.in
+++ b/libs/editor-variable.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/manip.bash.in b/libs/manip.bash.in
index c7720d9..51b04ef 100644
--- a/libs/manip.bash.in
+++ b/libs/manip.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/multilib.bash.in b/libs/multilib.bash.in
index a5b5e3f..6f5b6e4 100644
--- a/libs/multilib.bash.in
+++ b/libs/multilib.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2015 Gentoo Foundation
+# Copyright (c) 2005-2016 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/output.bash.in b/libs/output.bash.in
index a4b7380..6cccddc 100644
--- 

[gentoo-commits] proj/eselect:master commit in: misc/, libs/, man/, modules/, /, bin/

2015-01-17 Thread Ulrich Müller
commit: eedd79f8e685ced062ed139fecea1efb8e185157
Author: Ulrich Müller ulm AT gentoo DOT org
AuthorDate: Sat Jan 17 16:33:01 2015 +
Commit: Ulrich Müller ulm AT gentoo DOT org
CommitDate: Sat Jan 17 16:33:01 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=eedd79f8

Happy new year 2015!

---
 README | 2 +-
 bin/eselect.in | 4 ++--
 libs/config.bash.in| 2 +-
 libs/core.bash.in  | 2 +-
 libs/default.eselect.in| 2 +-
 libs/editor-variable.bash.in   | 2 +-
 libs/manip.bash.in | 2 +-
 libs/multilib.bash.in  | 2 +-
 libs/output.bash.in| 2 +-
 libs/package-manager.bash.in   | 2 +-
 libs/path-manipulation.bash.in | 2 +-
 libs/skel.bash.in  | 2 +-
 libs/tests.bash.in | 2 +-
 man/binutils.eselect.5 | 2 +-
 man/editor.eselect.5   | 2 +-
 man/env.eselect.5  | 2 +-
 man/eselect.1  | 2 +-
 man/kernel.eselect.5   | 2 +-
 man/news.eselect.5 | 2 +-
 man/pager.eselect.5| 2 +-
 man/profile.eselect.5  | 2 +-
 man/rc.eselect.5   | 2 +-
 man/visual.eselect.5   | 2 +-
 misc/eselect-mode.el   | 2 +-
 misc/eselect.bashcomp  | 2 +-
 modules/binutils.eselect   | 2 +-
 modules/config.eselect | 2 +-
 modules/cow.eselect| 2 +-
 modules/editor.eselect | 2 +-
 modules/env.eselect| 2 +-
 modules/kernel.eselect | 2 +-
 modules/locale.eselect | 2 +-
 modules/modules.eselect| 2 +-
 modules/news.eselect   | 2 +-
 modules/pager.eselect  | 2 +-
 modules/profile.eselect| 2 +-
 modules/rc.eselect | 2 +-
 modules/visual.eselect | 2 +-
 38 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/README b/README
index da7df64..9ab4015 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ See ``doc/``. Use ``make html`` for HTML versions.
 Copyright
 -
 
-eselect is Copyright (c) 2005-2014 Gentoo Foundation. This code is
+eselect is Copyright (c) 2005-2015 Gentoo Foundation. This code is
 distributed under the terms of the `GNU General Public License,
 version 2 or later`__.
 

diff --git a/bin/eselect.in b/bin/eselect.in
index e2f29ea..934a10a 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -1,6 +1,6 @@
 #!@BASH@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #
@@ -96,7 +96,7 @@ es_do_help() {
 es_do_version() {
echo eselect ${ESELECT_VERSION}
echo
-   echo Copyright (c) 2005-2014 Gentoo Foundation.
+   echo Copyright (c) 2005-2015 Gentoo Foundation.
echo Distributed under the terms of the GNU GPL version 2 or later.
 }
 

diff --git a/libs/config.bash.in b/libs/config.bash.in
index 38592f4..940c64b 100644
--- a/libs/config.bash.in
+++ b/libs/config.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/core.bash.in b/libs/core.bash.in
index cc263b8..8cd4e54 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/default.eselect.in b/libs/default.eselect.in
index 87c77d3..f0e9ee3 100644
--- a/libs/default.eselect.in
+++ b/libs/default.eselect.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/editor-variable.bash.in b/libs/editor-variable.bash.in
index b0c8e5f..22ec188 100644
--- a/libs/editor-variable.bash.in
+++ b/libs/editor-variable.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/manip.bash.in b/libs/manip.bash.in
index 60deefb..c7720d9 100644
--- a/libs/manip.bash.in
+++ b/libs/manip.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 #

diff --git a/libs/multilib.bash.in b/libs/multilib.bash.in
index 5793104..a5b5e3f 100644
--- a/libs/multilib.bash.in
+++ b/libs/multilib.bash.in
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright (c) 2005-2014 Gentoo Foundation
+# Copyright (c) 2005-2015 Gentoo Foundation
 #
 # This file is part of the 'eselect' tools framework.
 

[gentoo-commits] proj/eselect:master commit in: /, misc/

2014-06-05 Thread Ulrich Müller
commit: 5df2ce07583dc623dd6b6caec17d9e73bfb47e1d
Author: Ulrich Müller ulm AT gentoo DOT org
AuthorDate: Thu Jun  5 11:21:31 2014 +
Commit: Ulrich Müller ulm AT gentoo DOT org
CommitDate: Thu Jun  5 11:21:31 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=5df2ce07

eselect.bashcomp: Improve handling of options followed by an equals sign.

* misc/eselect.bashcomp (_eselect): Improve handling of options
that are followed by an equals sign.

---
 ChangeLog | 3 +++
 misc/eselect.bashcomp | 7 +--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c3f0061..1f01c16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-06-05  Ulrich Müller  u...@gentoo.org
 
+   * misc/eselect.bashcomp (_eselect): Improve handling of options
+   that are followed by an equals sign.
+
* bin/eselect.in: Parse global options even if we are invoked
as something-config or similar. Respect -- to indicate end
of options.

diff --git a/misc/eselect.bashcomp b/misc/eselect.bashcomp
index da3e55b..bd5afe3 100644
--- a/misc/eselect.bashcomp
+++ b/misc/eselect.bashcomp
@@ -8,7 +8,7 @@
 
 _eselect() {
 local cur sedcmd2 sedcmd3 possibles
-local options=--brief --color --colour
+local options=--brief --color= --colour=
 COMPREPLY=()
 cur=${COMP_WORDS[COMP_CWORD]}
 sedcmd2='s/^  \([[:alnum:]-][[:alnum:]_-]*\)[[:space:],].*$/\1/p'
@@ -17,6 +17,7 @@ _eselect() {
 set -- ${COMP_WORDS[@]:1}
 # skip global options
 while [[ $# -gt 1  $1 == -* ]]; do
+[[ $2 == = ]]  shift 2
 shift
 done
 # skip any subaction options
@@ -38,8 +39,10 @@ _eselect() {
 ;;
 esac
 
-[[ -n ${possibles} ]]  \
+if [[ -n ${possibles} ]]; then
 COMPREPLY=( $(compgen -W ${possibles} -- ${cur}) )
+[[ ${COMPREPLY[0]} == *= ]]  compopt -o nospace
+fi
 
 return 0
 }