aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog35
-rw-r--r--src/dired.c42
2 files changed, 64 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7362bf462a9..78fa3b501a3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,25 @@
12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
5 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6 (ALL_CFLAGS): Use new macros rather than old.
7 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
8 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
10 -Wunused-result, -Wunused-variable. This should go away once
11 the Emacs and Gnulib regex code is merged.
12 (xmalloc, xrealloc): Now static.
13
142012-04-17 Glenn Morris <rgm@gnu.org>
15
16 * dired.c (Fsystem_users): Doc fix.
17
182012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
19
20 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
21 (syms_of_dired): Add them.
22
12012-04-16 Paul Eggert <eggert@cs.ucla.edu> 232012-04-16 Paul Eggert <eggert@cs.ucla.edu>
2 24
3 Fix minor alloc.c problems found by static checking. 25 Fix minor alloc.c problems found by static checking.
@@ -42,19 +64,6 @@
42 64
432012-04-14 Paul Eggert <eggert@cs.ucla.edu> 652012-04-14 Paul Eggert <eggert@cs.ucla.edu>
44 66
45 configure: new option --enable-gcc-warnings (Bug#11207)
46 * Makefile.in (C_WARNINGS_SWITCH): Remove.
47 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
48 (ALL_CFLAGS): Use new macros rather than old.
49 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
50 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
51 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
52 -Wunused-result, -Wunused-variable. This should go away once
53 the Emacs and Gnulib regex code is merged.
54 (xmalloc, xrealloc): Now static.
55
562012-04-14 Paul Eggert <eggert@cs.ucla.edu>
57
58 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926). 67 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
59 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS. 68 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
60 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h: 69 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
diff --git a/src/dired.c b/src/dired.c
index 9b0f94a0760..eeae59d2801 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1015,6 +1015,46 @@ Comparison is in lexicographic order and case is significant. */)
1015 return Fstring_lessp (Fcar (f1), Fcar (f2)); 1015 return Fstring_lessp (Fcar (f1), Fcar (f2));
1016} 1016}
1017 1017
1018
1019DEFUN ("system-users", Fsystem_users, Ssystem_users, 0, 0, 0,
1020 doc: /* Return a list of user names currently registered in the system.
1021If we don't know how to determine that on this platform, just
1022return a list with one element, taken from `user-real-login-name'. */)
1023 (void)
1024{
1025 Lisp_Object users = Qnil;
1026#if defined(HAVE_GETPWENT) && defined(HAVE_ENDPWENT)
1027 struct passwd *pw;
1028
1029 while ((pw = getpwent ()))
1030 users = Fcons (DECODE_SYSTEM (build_string (pw->pw_name)), users);
1031
1032 endpwent ();
1033#endif
1034 if (EQ (users, Qnil))
1035 /* At least current user is always known. */
1036 users = Fcons (Vuser_real_login_name, Qnil);
1037 return users;
1038}
1039
1040DEFUN ("system-groups", Fsystem_groups, Ssystem_groups, 0, 0, 0,
1041 doc: /* Return a list of user group names currently registered in the system.
1042The value may be nil if not supported on this platform. */)
1043 (void)
1044{
1045 Lisp_Object groups = Qnil;
1046#if defined(HAVE_GETGRENT) && defined(HAVE_ENDGRENT)
1047 struct group *gr;
1048 int length;
1049
1050 while ((gr = getgrent ()))
1051 groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups);
1052
1053 endgrent ();
1054#endif
1055 return groups;
1056}
1057
1018void 1058void
1019syms_of_dired (void) 1059syms_of_dired (void)
1020{ 1060{
@@ -1032,6 +1072,8 @@ syms_of_dired (void)
1032 defsubr (&Sfile_name_all_completions); 1072 defsubr (&Sfile_name_all_completions);
1033 defsubr (&Sfile_attributes); 1073 defsubr (&Sfile_attributes);
1034 defsubr (&Sfile_attributes_lessp); 1074 defsubr (&Sfile_attributes_lessp);
1075 defsubr (&Ssystem_users);
1076 defsubr (&Ssystem_groups);
1035 1077
1036 DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions, 1078 DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions,
1037 doc: /* Completion ignores file names ending in any string in this list. 1079 doc: /* Completion ignores file names ending in any string in this list.