Преглед на файлове

etc: Support indentation of whole files.

* etc/indent-package.el.in: Rename to...
* etc/indent-code.el.in: ... this.  Add case for a single argument.
* doc/contributing.texi (Formatting Code): Adjust accordingly.
* configure.ac: Likewise.
gn-latest-20200428
Ludovic Courtès преди 5 години
родител
ревизия
557d9c8d7a
No known key found for this signature in database GPG ключ ID: 90B11993D9AEBB5
променени са 4 файла, в които са добавени 24 реда и са изтрити 10 реда
  1. +1
    -1
      .gitignore
  2. +1
    -1
      configure.ac
  3. +8
    -3
      doc/contributing.texi
  4. +14
    -5
      etc/indent-code.el.in

+ 1
- 1
.gitignore Целия файл

@ -128,4 +128,4 @@ stamp-h[0-9]
tmp
/doc/os-config-lightweight-desktop.texi
/nix/scripts/download
/etc/indent-package.el
/etc/indent-code.el

+ 1
- 1
configure.ac Целия файл

@ -245,6 +245,6 @@ AC_CONFIG_FILES([scripts/guix], [chmod +x scripts/guix])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
AC_CONFIG_FILES([etc/indent-package.el], [chmod +x etc/indent-package.el])
AC_CONFIG_FILES([etc/indent-code.el], [chmod +x etc/indent-code.el])
AC_OUTPUT

+ 8
- 3
doc/contributing.texi Целия файл

@ -256,12 +256,17 @@ If you do not use Emacs, please make sure to let your editor knows these
rules. To automatically indent a package definition, you can also run:
@example
./etc/indent-package.el gnu/packages/@var{file}.scm @var{package}
./etc/indent-code.el gnu/packages/@var{file}.scm @var{package}
@end example
@noindent
This automatically indents the definition of @var{package} in
@file{gnu/packages/@var{file}.scm} by running Emacs in batch mode.
@file{gnu/packages/@var{file}.scm} by running Emacs in batch mode. To
indent a whole file, omit the second argument:
@example
./etc/indent-code.el gnu/services/@var{file}.scm
@end example
We require all top-level procedures to carry a docstring. This
requirement can be relaxed for simple private procedures in the
@ -374,7 +379,7 @@ or a package update along with fixes to that package.
@item
Please follow our code formatting rules, possibly running the
@command{etc/indent-package.el} script to do that automatically for you
@command{etc/indent-code.el} script to do that automatically for you
(@pxref{Formatting Code}).
@end enumerate


etc/indent-package.el.in → etc/indent-code.el.in Целия файл


Зареждане…
Отказ
Запис