aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-04-17 14:38:34 -0700
committerPaul Eggert2012-04-17 14:38:34 -0700
commitae6e112df045de8ddc22e85f8538975d4664b325 (patch)
tree3923d0ff634b043c69f87255b52619d195dfc6ad
parentad85a071cc6d583041969d300793c92f21a54696 (diff)
parent197b6f3c605872bfeb7b2024d255142d8f579021 (diff)
downloademacs-ae6e112df045de8ddc22e85f8538975d4664b325.tar.gz
emacs-ae6e112df045de8ddc22e85f8538975d4664b325.zip
Merge from trunk.
-rw-r--r--ChangeLog13
-rw-r--r--autogen/config.in12
-rwxr-xr-xautogen/configure22
-rw-r--r--configure.in18
-rw-r--r--etc/NEWS12
-rw-r--r--lib-src/ChangeLog2
-rw-r--r--lisp/ChangeLog114
-rw-r--r--lisp/calendar/cal-tex.el5
-rw-r--r--lisp/dired-aux.el17
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/cl-extra.el3
-rw-r--r--lisp/emacs-lisp/cl-loaddefs.el2
-rw-r--r--lisp/emacs-lisp/eieio-opt.el6
-rw-r--r--lisp/emacs-lisp/ert-x.el2
-rw-r--r--lisp/emacs-lisp/smie.el33
-rw-r--r--lisp/frame.el3
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/nndraft.el3
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mouse.el8
-rw-r--r--lisp/mpc.el9
-rw-r--r--lisp/newcomment.el18
-rw-r--r--lisp/play/cookie1.el2
-rw-r--r--lisp/play/yow.el8
-rw-r--r--lisp/progmodes/perl-mode.el22
-rw-r--r--lisp/progmodes/python.el10
-rw-r--r--lisp/server.el42
-rw-r--r--lisp/ses.el124
-rw-r--r--lisp/speedbar.el4
-rw-r--r--lisp/tar-mode.el5
-rw-r--r--lisp/textmodes/ispell.el6
-rw-r--r--lisp/textmodes/picture.el131
-rw-r--r--lisp/textmodes/tex-mode.el15
-rw-r--r--lisp/textmodes/two-column.el204
-rw-r--r--lisp/vc/pcvs-util.el4
-rw-r--r--lisp/vc/pcvs.el14
-rw-r--r--lisp/vc/vc-dir.el14
-rw-r--r--lisp/vc/vc-dispatcher.el3
-rw-r--r--lisp/vc/vc-hg.el1
-rw-r--r--lisp/vc/vc.el12
-rw-r--r--lisp/woman.el10
-rw-r--r--lwlib/ChangeLog2
-rw-r--r--msdos/ChangeLog2
-rw-r--r--oldXMenu/ChangeLog2
-rw-r--r--src/ChangeLog35
-rw-r--r--src/dired.c42
46 files changed, 635 insertions, 389 deletions
diff --git a/ChangeLog b/ChangeLog
index 99ce37a2fee..6020d157797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
12012-04-14 Paul Eggert <eggert@cs.ucla.edu> 12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 configure: new option --enable-gcc-warnings (Bug#11207) 3 configure: new option --enable-gcc-warnings (Bug#11207)
4 I have been using this change for many months in my private copy 4 I have been using this change for many months in my private copy
@@ -15,6 +15,17 @@
15 * lib/Makefile.am (AM_CFLAGS): New macro. 15 * lib/Makefile.am (AM_CFLAGS): New macro.
16 * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib. 16 * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
17 17
182012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
19
20 * configure.in (AC_CHECK_FUNCS):
21 Add getpwent, endpwent, getgrent, endgrent. (Bug#7900)
22
232012-04-16 Glenn Morris <rgm@gnu.org>
24
25 * configure.in (NS_HAVE_NSINTEGER): Remove unnecessary variable.
26
27 * configure.in: Remove X libs workaround for old autoconf.
28
182012-04-12 Ken Brown <kbrown@cornell.edu> 292012-04-12 Ken Brown <kbrown@cornell.edu>
19 30
20 * configure.in: Warn that Cygwin 1.5 is unsupported. (Bug#10398) 31 * configure.in: Warn that Cygwin 1.5 is unsupported. (Bug#10398)
diff --git a/autogen/config.in b/autogen/config.in
index e93bd7f325c..c64b048ade5 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -203,6 +203,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
203/* Define to 1 if you have the 'dup2' function. */ 203/* Define to 1 if you have the 'dup2' function. */
204#undef HAVE_DUP2 204#undef HAVE_DUP2
205 205
206/* Define to 1 if you have the `endgrent' function. */
207#undef HAVE_ENDGRENT
208
209/* Define to 1 if you have the `endpwent' function. */
210#undef HAVE_ENDPWENT
211
206/* Define to 1 if you have the `euidaccess' function. */ 212/* Define to 1 if you have the `euidaccess' function. */
207#undef HAVE_EUIDACCESS 213#undef HAVE_EUIDACCESS
208 214
@@ -254,6 +260,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
254/* Define to 1 if you have the `getdomainname' function. */ 260/* Define to 1 if you have the `getdomainname' function. */
255#undef HAVE_GETDOMAINNAME 261#undef HAVE_GETDOMAINNAME
256 262
263/* Define to 1 if you have the `getgrent' function. */
264#undef HAVE_GETGRENT
265
257/* Define to 1 if you have the `gethostname' function. */ 266/* Define to 1 if you have the `gethostname' function. */
258#undef HAVE_GETHOSTNAME 267#undef HAVE_GETHOSTNAME
259 268
@@ -278,6 +287,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
278/* Define to 1 if you have the `getpt' function. */ 287/* Define to 1 if you have the `getpt' function. */
279#undef HAVE_GETPT 288#undef HAVE_GETPT
280 289
290/* Define to 1 if you have the `getpwent' function. */
291#undef HAVE_GETPWENT
292
281/* Define to 1 if you have the `getrlimit' function. */ 293/* Define to 1 if you have the `getrlimit' function. */
282#undef HAVE_GETRLIMIT 294#undef HAVE_GETRLIMIT
283 295
diff --git a/autogen/configure b/autogen/configure
index de24a151fca..dd889483229 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -9656,15 +9656,6 @@ else
9656 window_system=x11 9656 window_system=x11
9657fi 9657fi
9658 9658
9659## Workaround for bug in autoconf <= 2.62.
9660## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9661## No need to do anything special for these standard directories.
9662if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9663
9664 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9665
9666fi
9667
9668LD_SWITCH_X_SITE_AUX= 9659LD_SWITCH_X_SITE_AUX=
9669LD_SWITCH_X_SITE_AUX_RPATH= 9660LD_SWITCH_X_SITE_AUX_RPATH=
9670if test "${x_libraries}" != NONE; then 9661if test "${x_libraries}" != NONE; then
@@ -9803,7 +9794,6 @@ else
9803fi 9794fi
9804 9795
9805 9796
9806 NS_HAVE_NSINTEGER=yes
9807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808/* end confdefs.h. */ 9798/* end confdefs.h. */
9809#include <Foundation/NSObjCRuntime.h> 9799#include <Foundation/NSObjCRuntime.h>
@@ -9821,8 +9811,10 @@ else
9821 ns_have_nsinteger=no 9811 ns_have_nsinteger=no
9822fi 9812fi
9823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9824 if test $ns_have_nsinteger = no; then 9814 if test $ns_have_nsinteger = yes; then
9825 NS_HAVE_NSINTEGER=no 9815
9816$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
9817
9826 fi 9818 fi
9827fi 9819fi
9828 9820
@@ -13434,11 +13426,6 @@ $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13434 ## Extra CFLAGS applied to src/*.m files. 13426 ## Extra CFLAGS applied to src/*.m files.
13435 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" 13427 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
13436 fi 13428 fi
13437 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
13438
13439$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
13440
13441 fi
13442 # We also have mouse menus. 13429 # We also have mouse menus.
13443 HAVE_MENUS=yes 13430 HAVE_MENUS=yes
13444 OTHER_FILES=ns-app 13431 OTHER_FILES=ns-app
@@ -13967,6 +13954,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
13967sendto recvfrom getsockopt setsockopt getsockname getpeername \ 13954sendto recvfrom getsockopt setsockopt getsockname getpeername \
13968gai_strerror mkstemp getline getdelim mremap fsync sync \ 13955gai_strerror mkstemp getline getdelim mremap fsync sync \
13969difftime mempcpy mblen mbrlen posix_memalign \ 13956difftime mempcpy mblen mbrlen posix_memalign \
13957getpwent endpwent getgrent endgrent \
13970cfmakeraw cfsetspeed copysign __executable_start 13958cfmakeraw cfsetspeed copysign __executable_start
13971do : 13959do :
13972 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13960 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
diff --git a/configure.in b/configure.in
index 8be0da2ab28..6b60e2214fd 100644
--- a/configure.in
+++ b/configure.in
@@ -1500,15 +1500,6 @@ else
1500 window_system=x11 1500 window_system=x11
1501fi 1501fi
1502 1502
1503## Workaround for bug in autoconf <= 2.62.
1504## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
1505## No need to do anything special for these standard directories.
1506if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
1507
1508 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
1509
1510fi
1511
1512LD_SWITCH_X_SITE_AUX= 1503LD_SWITCH_X_SITE_AUX=
1513LD_SWITCH_X_SITE_AUX_RPATH= 1504LD_SWITCH_X_SITE_AUX_RPATH=
1514if test "${x_libraries}" != NONE; then 1505if test "${x_libraries}" != NONE; then
@@ -1629,13 +1620,12 @@ fail;
1629 AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], 1620 AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
1630 [AC_MSG_ERROR([`--with-ns' was specified, but the include 1621 [AC_MSG_ERROR([`--with-ns' was specified, but the include
1631 files are missing or cannot be compiled.])]) 1622 files are missing or cannot be compiled.])])
1632 NS_HAVE_NSINTEGER=yes
1633 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>], 1623 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
1634 [NSInteger i;])], 1624 [NSInteger i;])],
1635 ns_have_nsinteger=yes, 1625 ns_have_nsinteger=yes,
1636 ns_have_nsinteger=no) 1626 ns_have_nsinteger=no)
1637 if test $ns_have_nsinteger = no; then 1627 if test $ns_have_nsinteger = yes; then
1638 NS_HAVE_NSINTEGER=no 1628 AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
1639 fi 1629 fi
1640fi 1630fi
1641AC_SUBST(TEMACS_LDFLAGS2) 1631AC_SUBST(TEMACS_LDFLAGS2)
@@ -2683,9 +2673,6 @@ if test "${HAVE_NS}" = "yes"; then
2683 ## Extra CFLAGS applied to src/*.m files. 2673 ## Extra CFLAGS applied to src/*.m files.
2684 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" 2674 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
2685 fi 2675 fi
2686 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
2687 AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
2688 fi
2689 # We also have mouse menus. 2676 # We also have mouse menus.
2690 HAVE_MENUS=yes 2677 HAVE_MENUS=yes
2691 OTHER_FILES=ns-app 2678 OTHER_FILES=ns-app
@@ -2828,6 +2815,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
2828sendto recvfrom getsockopt setsockopt getsockname getpeername \ 2815sendto recvfrom getsockopt setsockopt getsockname getpeername \
2829gai_strerror mkstemp getline getdelim mremap fsync sync \ 2816gai_strerror mkstemp getline getdelim mremap fsync sync \
2830difftime mempcpy mblen mbrlen posix_memalign \ 2817difftime mempcpy mblen mbrlen posix_memalign \
2818getpwent endpwent getgrent endgrent \
2831cfmakeraw cfsetspeed copysign __executable_start) 2819cfmakeraw cfsetspeed copysign __executable_start)
2832 2820
2833dnl Cannot use AC_CHECK_FUNCS 2821dnl Cannot use AC_CHECK_FUNCS
diff --git a/etc/NEWS b/etc/NEWS
index 27b5406a155..16b9f75c503 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -27,7 +27,7 @@ so we will look at it and add it to the manual.
27If building with GCC, this enables compile-time checks that warn about 27If building with GCC, this enables compile-time checks that warn about
28possibly-questionable C code. On a recent GNU system there should be 28possibly-questionable C code. On a recent GNU system there should be
29no warnings; on older and on non-GNU systems the generated warnings 29no warnings; on older and on non-GNU systems the generated warnings
30may or may not be useful. By default, these warnings are not generated. 30may be useful.
31 31
32 32
33* Startup Changes in Emacs 24.2 33* Startup Changes in Emacs 24.2
@@ -39,6 +39,9 @@ been adding them there, put them somewhere else, eg site-lisp.
39 39
40* Changes in Emacs 24.2 40* Changes in Emacs 24.2
41 41
42** New functions `system-users', `system-groups' return lists of the user
43name, group names known to the system (where possible).
44
42** If your Emacs was built from a bzr checkout, the new variable 45** If your Emacs was built from a bzr checkout, the new variable
43`emacs-bzr-version' contains information about which bzr revision was used. 46`emacs-bzr-version' contains information about which bzr revision was used.
44 47
@@ -74,7 +77,12 @@ channel keys found, if any.
74 77
75** The `server-auth-key' variable can be used to set a permanent 78** The `server-auth-key' variable can be used to set a permanent
76shared key for Emacs Server. 79shared key for Emacs Server.
77 80
81** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
82closing brackets to be aligned with the line of the opening bracket.
83
84** FIXME something happened to ses.el, 2012-04-17.
85
78** Obsolete packages: 86** Obsolete packages:
79 87
80*** mailpost.el 88*** mailpost.el
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 55e76c0b008..161d71381c0 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,4 +1,4 @@
12012-04-16 Paul Eggert <eggert@cs.ucla.edu> 12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 configure: new option --enable-gcc-warnings (Bug#11207) 3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove. 4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7ebeea0a9dd..d9aadbe0f22 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,115 @@
12012-04-17 Juanma Barranquero <lekktu@gmail.com>
2
3 * server.el (server-ensure-safe-dir): Simplify.
4
52012-04-17 Stefan Monnier <monnier@iro.umontreal.ca>
6
7 * emacs-lisp/smie.el: Provide smarter auto-filling.
8 (smie-auto-fill): New function.
9 (smie-setup): Use it.
10
11 * newcomment.el (comment-choose-indent): Obey comment-inline-offset.
12
132012-04-17 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change)
14
15 * newcomment.el (comment-inline-offset): New custom var (bug#11090).
16 (comment-indent): Use it.
17
182012-04-17 Vincent Belaïche <vincentb1@users.sourceforge.net>
19
20 * ses.el: The overall change is to add cell renaming, that is
21 setting fancy names for cell symbols other than name matching
22 "\\`[A-Z]+[0-9]+\\'" regexp .
23 (ses-localvars): Add ses--renamed-cell-symb-list.
24 (ses-create-cell-variable): New defun.
25 (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols.
26 (ses-relocate-formula): Relocate formulas only for cells the
27 symbols of which are not renamed, i.e. symbols whose names do not
28 match regexp "\\`[A-Z]+[0-9]+\\'".
29 (ses-relocate-all): Relocate values only for cells the symbols of
30 which are not renamed.
31 (ses-load): Create cells variables as the (ses-cell ...) are read,
32 in order to check row col consistency with cell symbol name only
33 for cells that are not renamed.
34 (ses-replace-name-in-formula): New defun.
35 (ses-rename-cell): New defun.
36
372012-04-17 Peter Oliver <bzr@mavit.org.uk> (tiny change)
38
39 * progmodes/perl-mode.el (perl-indent-parens-as-block):
40 New option (bug#11118).
41 (perl-calculate-indent): Respect it.
42
432012-04-17 Glenn Morris <rgm@gnu.org>
44
45 * dired-aux.el (dired-mark-read-string): Doc fix.
46
472012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
48
49 * dired-aux.el (dired-mark-read-string): Offer optional completion.
50 (dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900)
51
522012-04-17 Glenn Morris <rgm@gnu.org>
53
54 * mouse.el (mouse-drag-track):
55 * speedbar.el (speedbar-frame-mode):
56 Use auto-hscroll-mode rather than the alias automatic-hscrolling.
57
582012-04-16 Leo Liu <sdl.web@gmail.com>
59
60 * progmodes/python.el: Trivial cleanup.
61
622012-04-16 Glenn Morris <rgm@gnu.org>
63
64 * vc/vc.el (vc-string-prefix-p):
65 * vc/pcvs-util.el (cvs-string-prefix-p):
66 * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p):
67 * mpc.el (mpc-string-prefix-p):
68 Make all of these into obsolete aliases for string-prefix-p.
69 Update callers.
70 * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers.
71
72 * textmodes/two-column.el: Move custom options to the start.
73 (frame-width): Remove compat definition.
74 (2C-associate-buffer, 2C-dissociate):
75 Use with-current-buffer rather than save-excursion.
76 (2C-dissociate): Force a mode-line update.
77 (2C-autoscroll): Use ignore-errors.
78
79 * emacs-lisp/eieio-opt.el (describe-class, describe-generic):
80 Autoload trivia.
81
82 * emacs-lisp/cl-extra.el (*random-state*):
83 Remove unnecessary declaration.
84
85 * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification.
86
87 * play/cookie1.el (cookie-snarf):
88 Give an explicit error if input file cannot be read.
89
90 * play/yow.el (yow-file): Use expand-file-name rather than concat.
91
92 * progmodes/perl-mode.el (c-macro-expand):
93 Remove unnecessary autoload (it is in loaddefs.el).
94
95 * textmodes/picture.el (picture-desired-column)
96 (picture-update-desired-column): Convert comments to doc-strings.
97 (picture-substitute): Remove function.
98 (picture-mode-map): Initialize in the defvar.
99
100 * woman.el: Remove eval-after-load for tar-mode.
101 * tar-mode.el (tar-mode-map): Add woman binding and menu entry.
102 (woman-tar-extract-file): Autoload it.
103
104 * frame.el (automatic-hscrolling): Make this alias obsolete.
105
12012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es> 1062012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es>
2 107
3 * ispell.el (ispell-set-spellchecker-params): Post-process 108 * ispell.el (ispell-set-spellchecker-params): Post-process
4 `ispell-dictionary-alist' to use [:alpha:] if possible. 109 `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible.
110 (ispell-dictionary-base-alist): Revert to original XEmacs
111 friendly version for default. [:alpha:] will be added in
112 `ispell-set-spellchecker-params' if needed
5 113
62012-04-16 Chong Yidong <cyd@gnu.org> 1142012-04-16 Chong Yidong <cyd@gnu.org>
7 115
@@ -1316,10 +1424,6 @@
1316 1424
13172012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> 14252012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com>
1318 1426
1319 * files.el (file-subdir-of-p): Fix typo.
1320
13212012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com>
1322
1323 * files.el (files-equal-p, file-subdir-of-p): New functions. 1427 * files.el (files-equal-p, file-subdir-of-p): New functions.
1324 (copy-directory): Error when trying to copy a directory on itself. 1428 (copy-directory): Error when trying to copy a directory on itself.
1325 Add missing copy-contents arg to tramp handler. 1429 Add missing copy-contents arg to tramp handler.
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 14899431e2a..0ae2b38eaf6 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -1,6 +1,6 @@
1;;; cal-tex.el --- calendar functions for printing calendars with LaTeX 1;;; cal-tex.el --- calendar functions for printing calendars with LaTeX
2 2
3;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
4 4
5;; Author: Steve Fisk <fisk@bowdoin.edu> 5;; Author: Steve Fisk <fisk@bowdoin.edu>
6;; Edward M. Reingold <reingold@cs.uiuc.edu> 6;; Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -1588,8 +1588,7 @@ informative header, and run HOOK."
1588 (cal-tex-e-document) 1588 (cal-tex-e-document)
1589 (or (and cal-tex-preamble-extra 1589 (or (and cal-tex-preamble-extra
1590 (string-match "inputenc" cal-tex-preamble-extra)) 1590 (string-match "inputenc" cal-tex-preamble-extra))
1591 (not (re-search-backward "[^[:ascii:]]" nil 'move)) 1591 (when (re-search-backward "[^[:ascii:]]" nil 'move)
1592 (progn
1593 (goto-char (point-min)) 1592 (goto-char (point-min))
1594 (when (search-forward "documentclass" nil t) 1593 (when (search-forward "documentclass" nil t)
1595 (forward-line 1) 1594 (forward-line 1)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 0795b0175a2..8a499c47464 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))."
245 " (default now): " 245 " (default now): "
246 ": "))) 246 ": ")))
247 (new-attribute (dired-mark-read-string prompt nil op-symbol 247 (new-attribute (dired-mark-read-string prompt nil op-symbol
248 arg files default)) 248 arg files default
249 (cond ((eq op-symbol 'chown)
250 (system-users))
251 ((eq op-symbol 'chgrp)
252 (system-groups)))))
249 (operation (concat program " " new-attribute)) 253 (operation (concat program " " new-attribute))
250 failures) 254 failures)
251 (setq failures 255 (setq failures
@@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and
385 (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) 389 (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
386 390
387(defun dired-mark-read-string (prompt initial op-symbol arg files 391(defun dired-mark-read-string (prompt initial op-symbol arg files
388 &optional default-value) 392 &optional default-value collection)
389 "Read args for a Dired marked-files command, prompting with PROMPT. 393 "Read args for a Dired marked-files command, prompting with PROMPT.
390Return the user input (a string). 394Return the user input (a string).
391 395
@@ -397,11 +401,14 @@ FILES should be a list of file names.
397DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list 401DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
398of such values, available via history commands. Note that if the 402of such values, available via history commands. Note that if the
399user enters empty input, this function returns the empty string, 403user enters empty input, this function returns the empty string,
400not DEFAULT-VALUE." 404not DEFAULT-VALUE.
405
406Optional argument COLLECTION is a collection of possible completions,
407suitable for use by `completing-read'."
401 (dired-mark-pop-up nil op-symbol files 408 (dired-mark-pop-up nil op-symbol files
402 'read-from-minibuffer 409 'completing-read
403 (format prompt (dired-mark-prompt arg files)) 410 (format prompt (dired-mark-prompt arg files))
404 initial nil nil nil default-value)) 411 collection nil nil initial nil default-value nil))
405 412
406;;; Cleaning a directory: flagging some backups for deletion. 413;;; Cleaning a directory: flagging some backups for deletion.
407 414
diff --git a/lisp/dired.el b/lisp/dired.el
index d322752e15f..77fe9cb7614 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3736;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3736;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3737;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3737;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3738;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3738;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3739;;;;;; dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360") 3739;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23")
3740;;; Generated autoloads from dired-aux.el 3740;;; Generated autoloads from dired-aux.el
3741 3741
3742(autoload 'dired-diff "dired-aux" "\ 3742(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 9ac5ce7d2f0..9a3d8cf705b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -1,6 +1,6 @@
1;;; cl-extra.el --- Common Lisp features, part 2 1;;; cl-extra.el --- Common Lisp features, part 2
2 2
3;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: Dave Gillespie <daveg@synaptics.com> 5;; Author: Dave Gillespie <daveg@synaptics.com>
6;; Keywords: extensions 6;; Keywords: extensions
@@ -430,7 +430,6 @@ With two arguments, return rounding and remainder of their quotient."
430 430
431;; Random numbers. 431;; Random numbers.
432 432
433(defvar *random-state*)
434;;;###autoload 433;;;###autoload
435(defun random* (lim &optional state) 434(defun random* (lim &optional state)
436 "Return a random nonnegative number less than LIM, an integer or float. 435 "Return a random nonnegative number less than LIM, an integer or float.
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el
index 5bb86628bb8..9e0099bb649 100644
--- a/lisp/emacs-lisp/cl-loaddefs.el
+++ b/lisp/emacs-lisp/cl-loaddefs.el
@@ -10,7 +10,7 @@
10;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p 10;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
11;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively 11;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively
12;;;;;; notevery notany every some mapcon mapcan mapl maplist map 12;;;;;; notevery notany every some mapcon mapcan mapl maplist map
13;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2") 13;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb")
14;;; Generated autoloads from cl-extra.el 14;;; Generated autoloads from cl-extra.el
15 15
16(autoload 'coerce "cl-extra" "\ 16(autoload 'coerce "cl-extra" "\
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index 10816aaa43c..a899839f68a 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -72,8 +72,7 @@ Argument CH-PREFIX is another character prefix to display."
72 72
73;;; CLASS COMPLETION / DOCUMENTATION 73;;; CLASS COMPLETION / DOCUMENTATION
74 74
75;;;###autoload 75;;;###autoload(defalias 'describe-class 'eieio-describe-class)
76(defalias 'describe-class 'eieio-describe-class)
77 76
78;;;###autoload 77;;;###autoload
79(defun eieio-describe-class (class &optional headerfcn) 78(defun eieio-describe-class (class &optional headerfcn)
@@ -305,8 +304,7 @@ are not abstract."
305;;; METHOD COMPLETION / DOC 304;;; METHOD COMPLETION / DOC
306 305
307(defalias 'describe-method 'eieio-describe-generic) 306(defalias 'describe-method 'eieio-describe-generic)
308;;;###autoload 307;;;###autoload(defalias 'describe-generic 'eieio-describe-generic)
309(defalias 'describe-generic 'eieio-describe-generic)
310(defalias 'eieio-describe-method 'eieio-describe-generic) 308(defalias 'eieio-describe-method 'eieio-describe-generic)
311 309
312;;;###autoload 310;;;###autoload
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index 257d0528cbc..a7916354c91 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
4 4
5;; Author: Lennart Borgman (lennart O borgman A gmail O com) 5;; Author: Lennart Borgman (lennart O borgman A gmail O com)
6;; Author: Christian Ohler <ohler@gnu.org> 6;; Christian Ohler <ohler@gnu.org>
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 2a12f03e514..5382e601e67 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1602,6 +1602,38 @@ to which that point should be aligned, if we were to reindent it.")
1602 (save-excursion (indent-line-to indent)) 1602 (save-excursion (indent-line-to indent))
1603 (indent-line-to indent))))) 1603 (indent-line-to indent)))))
1604 1604
1605(defun smie-auto-fill ()
1606 (let ((fc (current-fill-column))
1607 (try-again nil))
1608 (while (and fc (> (current-column) fc))
1609 (cond
1610 ((not (or (nth 8 (save-excursion
1611 (syntax-ppss (line-beginning-position))))
1612 (nth 8 (syntax-ppss))))
1613 (save-excursion
1614 (beginning-of-line)
1615 (smie-indent-forward-token)
1616 (let ((bsf (point))
1617 (gain 0)
1618 curcol)
1619 (while (<= (setq curcol (current-column)) fc)
1620 ;; FIXME? `smie-indent-calculate' can (and often will)
1621 ;; return a result that actually depends on the presence/absence
1622 ;; of a newline, so the gain computed here may not be accurate,
1623 ;; but in practice it seems to works well enough.
1624 (let* ((newcol (smie-indent-calculate))
1625 (newgain (- curcol newcol)))
1626 (when (> newgain gain)
1627 (setq gain newgain)
1628 (setq bsf (point))))
1629 (smie-indent-forward-token))
1630 (when (> gain 0)
1631 (setq try-again)
1632 (goto-char bsf)
1633 (newline-and-indent)))))
1634 (t (do-auto-fill))))))
1635
1636
1605(defun smie-setup (grammar rules-function &rest keywords) 1637(defun smie-setup (grammar rules-function &rest keywords)
1606 "Setup SMIE navigation and indentation. 1638 "Setup SMIE navigation and indentation.
1607GRAMMAR is a grammar table generated by `smie-prec2->grammar'. 1639GRAMMAR is a grammar table generated by `smie-prec2->grammar'.
@@ -1612,6 +1644,7 @@ KEYWORDS are additional arguments, which can use the following keywords:
1612 (set (make-local-variable 'smie-rules-function) rules-function) 1644 (set (make-local-variable 'smie-rules-function) rules-function)
1613 (set (make-local-variable 'smie-grammar) grammar) 1645 (set (make-local-variable 'smie-grammar) grammar)
1614 (set (make-local-variable 'indent-line-function) 'smie-indent-line) 1646 (set (make-local-variable 'indent-line-function) 'smie-indent-line)
1647 (set (make-local-variable 'normal-auto-fill-function) 'smie-auto-fill)
1615 (set (make-local-variable 'forward-sexp-function) 1648 (set (make-local-variable 'forward-sexp-function)
1616 'smie-forward-sexp-command) 1649 'smie-forward-sexp-command)
1617 (while keywords 1650 (while keywords
diff --git a/lisp/frame.el b/lisp/frame.el
index 79e1243c7af..1ee9d966ef1 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1651,7 +1651,8 @@ terminals, cursor blinking is controlled by the terminal."
1651 1651
1652;; Misc. 1652;; Misc.
1653 1653
1654(defvaralias 'automatic-hscrolling 'auto-hscroll-mode) 1654;; Only marked as obsolete in 24.2.
1655(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1")
1655 1656
1656(make-variable-buffer-local 'show-trailing-whitespace) 1657(make-variable-buffer-local 'show-trailing-whitespace)
1657 1658
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 23e800e0f3f..52f140d9192 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12012-04-16 Glenn Morris <rgm@gnu.org>
2
3 * nndraft.el (nndraft-request-list): Fix declaration.
4
12012-04-14 Lars Magne Ingebrigtsen <larsi@gnus.org> 52012-04-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we 7 * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 1800d0c02de..da50720ebbe 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -37,7 +37,8 @@
37(require 'mm-util) 37(require 'mm-util)
38(eval-when-compile (require 'cl)) 38(eval-when-compile (require 'cl))
39 39
40(declare-function nndraft-request-list "nnmh" (&rest args)) 40;; The nnoo-import at the end, I think.
41(declare-function nndraft-request-list "nndraft" (&rest args) t)
41 42
42(nnoo-declare nndraft 43(nnoo-declare nndraft
43 nnmh) 44 nnmh)
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 4e76e5cdb64..f35560841e2 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1586,7 +1586,7 @@ messages to make sure it works as expected."
1586 1586
1587 1587
1588;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and 1588;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and
1589;; feedmail-buffer-to-smptmail are the only things provided for values 1589;; feedmail-buffer-to-smtpmail are the only things provided for values
1590;; for the variable feedmail-buffer-eating-function. It's pretty easy 1590;; for the variable feedmail-buffer-eating-function. It's pretty easy
1591;; to write your own, though. 1591;; to write your own, though.
1592(defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid) 1592(defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 2e119483797..3344bbec2cc 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1,6 +1,6 @@
1;;; mouse.el --- window system-independent mouse support 1;;; mouse.el --- window system-independent mouse support
2 2
3;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: hardware, mouse 6;; Keywords: hardware, mouse
@@ -805,8 +805,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
805 (= click-count 1))) 805 (= click-count 1)))
806 ;; Suppress automatic hscrolling, because that is a nuisance 806 ;; Suppress automatic hscrolling, because that is a nuisance
807 ;; when setting point near the right fringe (but see below). 807 ;; when setting point near the right fringe (but see below).
808 (automatic-hscrolling-saved automatic-hscrolling) 808 (auto-hscroll-mode-saved auto-hscroll-mode)
809 (automatic-hscrolling nil) 809 (auto-hscroll-mode nil)
810 event end end-point) 810 event end end-point)
811 811
812 (setq mouse-selection-click-count click-count) 812 (setq mouse-selection-click-count click-count)
@@ -838,7 +838,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
838 ;; Automatic hscrolling did not occur during the call to 838 ;; Automatic hscrolling did not occur during the call to
839 ;; `read-event'; but if the user subsequently drags the 839 ;; `read-event'; but if the user subsequently drags the
840 ;; mouse, go ahead and hscroll. 840 ;; mouse, go ahead and hscroll.
841 (let ((automatic-hscrolling automatic-hscrolling-saved)) 841 (let ((auto-hscroll-mode auto-hscroll-mode-saved))
842 (redisplay)) 842 (redisplay))
843 (setq end (event-end event) 843 (setq end (event-end event)
844 end-point (posn-point end)) 844 end-point (posn-point end))
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 614f2bd6806..d2203a4deab 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1,6 +1,6 @@
1;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*- 1;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*-
2 2
3;; Copyright (C) 2006-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 4
5;; Author: Stefan Monnier <monnier@iro.umontreal.ca> 5;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
6;; Keywords: multimedia 6;; Keywords: multimedia
@@ -184,10 +184,7 @@ numerically rather than lexicographically."
184 (abs res)) 184 (abs res))
185 res)))))))) 185 res))))))))
186 186
187(defun mpc-string-prefix-p (str1 str2) 187(define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.2")
188 ;; FIXME: copied from pcvs-util.el.
189 "Tell whether STR1 is a prefix of STR2."
190 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
191 188
192;; This can speed up mpc--song-search significantly. The table may grow 189;; This can speed up mpc--song-search significantly. The table may grow
193;; very large, tho. It's only bounded by the fact that it gets flushed 190;; very large, tho. It's only bounded by the fact that it gets flushed
@@ -1690,7 +1687,7 @@ Return non-nil if a selection was deactivated."
1690 (process-put (mpc-proc) prop 1687 (process-put (mpc-proc) prop
1691 (delq nil 1688 (delq nil
1692 (mapcar (lambda (x) 1689 (mapcar (lambda (x)
1693 (if (mpc-string-prefix-p name x) 1690 (if (string-prefix-p name x)
1694 nil x)) 1691 nil x))
1695 new))))) 1692 new)))))
1696 (mpc-tagbrowser-refresh))) 1693 (mpc-tagbrowser-refresh)))
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 37a76e0309c..0862427c3ba 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -269,6 +269,19 @@ makes the comment easier to read. Default is 1. nil means 0."
269 :type '(choice string integer (const nil)) 269 :type '(choice string integer (const nil))
270 :group 'comment) 270 :group 'comment)
271 271
272(defcustom comment-inline-offset 1
273 "Inline comments have to be preceded by at least this many spaces.
274This is useful when style-conventions require a certain minimal offset.
275Python's PEP8 for example recommends two spaces, so you could do:
276
277\(add-hook 'python-mode-hook
278 (lambda () (set (make-local-variable 'comment-inline-offset) 2)))
279
280See `comment-padding' for whole-line comments."
281 :version "24.2"
282 :type 'integer
283 :group 'comment)
284
272;;;###autoload 285;;;###autoload
273(defcustom comment-multi-line nil 286(defcustom comment-multi-line nil
274 "Non-nil means `comment-indent-new-line' continues comments. 287 "Non-nil means `comment-indent-new-line' continues comments.
@@ -587,7 +600,7 @@ Point is expected to be at the start of the comment."
587 (save-excursion (end-of-line) (current-column))))) 600 (save-excursion (end-of-line) (current-column)))))
588 (other nil) 601 (other nil)
589 (min (save-excursion (skip-chars-backward " \t") 602 (min (save-excursion (skip-chars-backward " \t")
590 (if (bolp) 0 (1+ (current-column)))))) 603 (if (bolp) 0 (+ comment-inline-offset (current-column))))))
591 ;; Fix up the range. 604 ;; Fix up the range.
592 (if (< max min) (setq max min)) 605 (if (< max min) (setq max min))
593 ;; Don't move past the fill column. 606 ;; Don't move past the fill column.
@@ -687,7 +700,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
687 (save-excursion 700 (save-excursion
688 (skip-chars-backward " \t") 701 (skip-chars-backward " \t")
689 (unless (bolp) 702 (unless (bolp)
690 (setq indent (max indent (1+ (current-column)))))) 703 (setq indent (max indent
704 (+ (current-column) comment-inline-offset)))))
691 ;; If that's different from comment's current position, change it. 705 ;; If that's different from comment's current position, change it.
692 (unless (= (current-column) indent) 706 (unless (= (current-column) indent)
693 (delete-region (point) (progn (skip-chars-backward " \t") (point))) 707 (delete-region (point) (progn (skip-chars-backward " \t") (point)))
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index 06bd962d925..cbf29a26a71 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -96,6 +96,8 @@ of load, ENDMSG at the end."
96 "Reads in the PHRASE-FILE, returns it as a vector of strings. 96 "Reads in the PHRASE-FILE, returns it as a vector of strings.
97Emit STARTMSG and ENDMSG before and after. Caches the result; second 97Emit STARTMSG and ENDMSG before and after. Caches the result; second
98and subsequent calls on the same file won't go to disk." 98and subsequent calls on the same file won't go to disk."
99 (or (file-readable-p phrase-file)
100 (error "Cannot read file `%s'" phrase-file))
99 (let ((sym (intern-soft phrase-file cookie-cache))) 101 (let ((sym (intern-soft phrase-file cookie-cache)))
100 (and sym (not (equal (symbol-function sym) 102 (and sym (not (equal (symbol-function sym)
101 (nth 5 (file-attributes phrase-file)))) 103 (nth 5 (file-attributes phrase-file))))
diff --git a/lisp/play/yow.el b/lisp/play/yow.el
index fa32fdf8272..cb02a839cde 100644
--- a/lisp/play/yow.el
+++ b/lisp/play/yow.el
@@ -1,6 +1,6 @@
1;;; yow.el --- quote random zippyisms 1;;; yow.el --- quote random zippyisms
2 2
3;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Author: Richard Mlynarik 6;; Author: Richard Mlynarik
@@ -24,10 +24,6 @@
24;;; Commentary: 24;;; Commentary:
25 25
26;; Important pinheadery for GNU Emacs. 26;; Important pinheadery for GNU Emacs.
27;;
28;; See cookie1.el for implementation. Note --- the `n' argument of yow
29;; from the 18.xx implementation is no longer; we only support *random*
30;; random access now.
31 27
32;;; Code: 28;;; Code:
33 29
@@ -38,7 +34,7 @@
38 :prefix "yow-" 34 :prefix "yow-"
39 :group 'games) 35 :group 'games)
40 36
41(defcustom yow-file (concat data-directory "yow.lines") 37(defcustom yow-file (expand-file-name "yow.lines" data-directory)
42 "File containing pertinent pinhead phrases." 38 "File containing pertinent pinhead phrases."
43 :type 'file 39 :type 'file
44 :group 'yow) 40 :group 'yow)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index aab5f8f65a4..9df9943cc00 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1,6 +1,6 @@
1;;; perl-mode.el --- Perl code editing commands for GNU Emacs 1;;; perl-mode.el --- Perl code editing commands for GNU Emacs
2 2
3;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc.
4 4
5;; Author: William F. Mann 5;; Author: William F. Mann
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -133,11 +133,6 @@
133 map) 133 map)
134 "Keymap used in Perl mode.") 134 "Keymap used in Perl mode.")
135 135
136(autoload 'c-macro-expand "cmacexp"
137 "Display the result of expanding all C macros occurring in the region.
138The expansion is entirely correct because it uses the C preprocessor."
139 t)
140
141(defvar perl-mode-syntax-table 136(defvar perl-mode-syntax-table
142 (let ((st (make-syntax-table (standard-syntax-table)))) 137 (let ((st (make-syntax-table (standard-syntax-table))))
143 (modify-syntax-entry ?\n ">" st) 138 (modify-syntax-entry ?\n ">" st)
@@ -511,6 +506,14 @@ If nil, continued arguments are aligned with the first argument."
511 :type '(choice integer (const nil)) 506 :type '(choice integer (const nil))
512 :group 'perl) 507 :group 'perl)
513 508
509(defcustom perl-indent-parens-as-block nil
510 "Non-nil means that non-block ()-, {}- and []-groups are indented as blocks.
511The closing bracket is aligned with the line of the opening bracket,
512not the contents of the brackets."
513 :version "24.2"
514 :type 'boolean
515 :group 'perl)
516
514(defcustom perl-tab-always-indent tab-always-indent 517(defcustom perl-tab-always-indent tab-always-indent
515 "Non-nil means TAB in Perl mode always indents the current line. 518 "Non-nil means TAB in Perl mode always indents the current line.
516Otherwise it inserts a tab character if you type it past the first 519Otherwise it inserts a tab character if you type it past the first
@@ -853,7 +856,8 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
853 (cond ((nth 3 state) 'noindent) ; In a quoted string? 856 (cond ((nth 3 state) 'noindent) ; In a quoted string?
854 ((null containing-sexp) ; Line is at top level. 857 ((null containing-sexp) ; Line is at top level.
855 (skip-chars-forward " \t\f") 858 (skip-chars-forward " \t\f")
856 (if (= (following-char) ?{) 859 (if (memq (following-char)
860 (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{)))
857 0 ; move to beginning of line if it starts a function body 861 0 ; move to beginning of line if it starts a function body
858 ;; indent a little if this is a continuation line 862 ;; indent a little if this is a continuation line
859 (perl-backward-to-noncomment) 863 (perl-backward-to-noncomment)
@@ -897,7 +901,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
897 0 perl-continued-statement-offset) 901 0 perl-continued-statement-offset)
898 (current-column) 902 (current-column)
899 (if (save-excursion (goto-char indent-point) 903 (if (save-excursion (goto-char indent-point)
900 (looking-at "[ \t]*{")) 904 (looking-at
905 (if perl-indent-parens-as-block
906 "[ \t]*[{(\[]" "[ \t]*{")))
901 perl-continued-brace-offset 0))) 907 perl-continued-brace-offset 0)))
902 ;; This line starts a new statement. 908 ;; This line starts a new statement.
903 ;; Position at last unclosed open. 909 ;; Position at last unclosed open.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 09b89993626..6f8758ebec1 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -69,11 +69,7 @@
69(require 'comint) 69(require 'comint)
70(require 'ansi-color) 70(require 'ansi-color)
71 71
72(eval-when-compile 72(eval-when-compile (require 'compile))
73 (require 'compile)
74 (require 'hippie-exp))
75
76(autoload 'comint-mode "comint")
77 73
78(defgroup python nil 74(defgroup python nil
79 "Silly walks in the Python language." 75 "Silly walks in the Python language."
@@ -1488,8 +1484,6 @@ Don't save anything for STR matching `inferior-python-filter-regexp'."
1488 res) 1484 res)
1489 (t (concat res s))))) 1485 (t (concat res s)))))
1490 1486
1491(autoload 'comint-check-proc "comint")
1492
1493(defvar python-version-checked nil) 1487(defvar python-version-checked nil)
1494(defun python-check-version (cmd) 1488(defun python-check-version (cmd)
1495 "Check that CMD runs a suitable version of Python." 1489 "Check that CMD runs a suitable version of Python."
@@ -1684,8 +1678,6 @@ value to determine defaults."
1684 "Caches (directory . file) pair used in the last `python-load-file' command. 1678 "Caches (directory . file) pair used in the last `python-load-file' command.
1685Used for determining the default in the next one.") 1679Used for determining the default in the next one.")
1686 1680
1687(autoload 'comint-get-source "comint")
1688
1689(defun python-load-file (file-name) 1681(defun python-load-file (file-name)
1690 "Load a Python file FILE-NAME into the inferior Python process. 1682 "Load a Python file FILE-NAME into the inferior Python process.
1691If the file has extension `.py' import or reload it as a module. 1683If the file has extension `.py' import or reload it as a module.
diff --git a/lisp/server.el b/lisp/server.el
index 058bc55d87d..c82a639eadf 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -520,31 +520,27 @@ Creates the directory if necessary and makes sure:
520 ;; Check that it's safe for use. 520 ;; Check that it's safe for use.
521 (let* ((uid (nth 2 attrs)) 521 (let* ((uid (nth 2 attrs))
522 (w32 (eq system-type 'windows-nt)) 522 (w32 (eq system-type 'windows-nt))
523 (safe (catch :safe 523 (safe (cond
524 (unless (eq t (car attrs)) ; is a dir? 524 ((not (eq t (car attrs))) nil) ; is a dir?
525 (throw :safe nil)) 525 ((and w32 (zerop uid)) ; on FAT32?
526 (when (and w32 (zerop uid)) ; on FAT32? 526 (display-warning
527 (display-warning 527 'server
528 'server 528 (format "Using `%s' to store Emacs-server authentication files.
529 (format "Using `%s' to store Emacs-server authentication files.
530Directories on FAT32 filesystems are NOT secure against tampering. 529Directories on FAT32 filesystems are NOT secure against tampering.
531See variable `server-auth-dir' for details." 530See variable `server-auth-dir' for details."
532 (file-name-as-directory dir)) 531 (file-name-as-directory dir))
533 :warning) 532 :warning)
534 (throw :safe t)) 533 t)
535 (unless (or (= uid (user-uid)) ; is the dir ours? 534 ((and (/= uid (user-uid)) ; is the dir ours?
536 (and w32 535 (or (not w32)
537 ;; Files created on Windows by 536 ;; Files created on Windows by Administrator
538 ;; Administrator (RID=500) have 537 ;; (RID=500) have the Administrators (RID=544)
539 ;; the Administrators (RID=544) 538 ;; group recorded as the owner.
540 ;; group recorded as the owner. 539 (/= uid 544) (/= (user-uid) 500)))
541 (= uid 544) (= (user-uid) 500))) 540 nil)
542 (throw :safe nil)) 541 (w32 t) ; on NTFS?
543 (when w32 ; on NTFS? 542 (t ; else, check permissions
544 (throw :safe t)) 543 (zerop (logand ?\077 (file-modes dir)))))))
545 (unless (zerop (logand ?\077 (file-modes dir)))
546 (throw :safe nil))
547 t)))
548 (unless safe 544 (unless safe
549 (error "The directory `%s' is unsafe" dir))))) 545 (error "The directory `%s' is unsafe" dir)))))
550 546
diff --git a/lisp/ses.el b/lisp/ses.el
index 0638fc344c7..da18046c953 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -282,6 +282,9 @@ default printer and then modify its output.")
282 ses--numcols ses--numrows ses--symbolic-formulas 282 ses--numcols ses--numrows ses--symbolic-formulas
283 ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) 283 ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0)
284 ses--Dijkstra-weight-bound 284 ses--Dijkstra-weight-bound
285 ;; This list is useful to speed-up clean-up of symbols when
286 ;; an area containing renamed cell is deleted.
287 ses--renamed-cell-symb-list
285 ;; Global variables that we override 288 ;; Global variables that we override
286 mode-line-process next-line-add-newlines transient-mark-mode) 289 mode-line-process next-line-add-newlines transient-mark-mode)
287 "Buffer-local variables used by SES.") 290 "Buffer-local variables used by SES.")
@@ -674,6 +677,17 @@ for this spreadsheet."
674 (put sym 'ses-cell (cons xrow xcol)) 677 (put sym 'ses-cell (cons xrow xcol))
675 (make-local-variable sym))))) 678 (make-local-variable sym)))))
676 679
680(defun ses-create-cell-variable (sym row col)
681 "Create a buffer-local variable `SYM' for cell at position (ROW, COL).
682
683SYM is the symbol for that variable, ROW and COL are integers for
684row and column of the cell, with numbering starting from 0.
685
686Return nil in case of failure."
687 (unless (local-variable-p sym)
688 (make-local-variable sym)
689 (put sym 'ses-cell (cons row col))))
690
677;; We do not delete the ses-cell properties for the cell-variables, in 691;; We do not delete the ses-cell properties for the cell-variables, in
678;; case a formula that refers to this cell is in the kill-ring and is 692;; case a formula that refers to this cell is in the kill-ring and is
679;; later pasted back in. 693;; later pasted back in.
@@ -682,7 +696,10 @@ for this spreadsheet."
682 (let (sym) 696 (let (sym)
683 (dotimes (row (1+ (- maxrow minrow))) 697 (dotimes (row (1+ (- maxrow minrow)))
684 (dotimes (col (1+ (- maxcol mincol))) 698 (dotimes (col (1+ (- maxcol mincol)))
685 (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol))) 699 (let ((xrow (+ row minrow)) (xcol (+ col mincol)))
700 (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols))
701 (ses-cell-symbol xrow xcol)
702 (ses-create-cell-symbol xrow xcol))))
686 (if (boundp sym) 703 (if (boundp sym)
687 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) 704 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym))
688 buffer-undo-list)) 705 buffer-undo-list))
@@ -1400,7 +1417,8 @@ removed. Example:
1400Sets `ses-relocate-return' to 'delete if cell-references were removed." 1417Sets `ses-relocate-return' to 'delete if cell-references were removed."
1401 (let (rowcol result) 1418 (let (rowcol result)
1402 (if (or (atom formula) (eq (car formula) 'quote)) 1419 (if (or (atom formula) (eq (car formula) 'quote))
1403 (if (setq rowcol (ses-sym-rowcol formula)) 1420 (if (and (setq rowcol (ses-sym-rowcol formula))
1421 (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
1404 (ses-relocate-symbol formula rowcol 1422 (ses-relocate-symbol formula rowcol
1405 startrow startcol rowincr colincr) 1423 startrow startcol rowincr colincr)
1406 formula) ; Pass through as-is. 1424 formula) ; Pass through as-is.
@@ -1508,14 +1526,15 @@ if the range was altered."
1508the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR 1526the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR
1509to each symbol." 1527to each symbol."
1510 (let (reform) 1528 (let (reform)
1511 (let (mycell newval) 1529 (let (mycell newval xrow)
1512 (dotimes-with-progress-reporter 1530 (dotimes-with-progress-reporter
1513 (row ses--numrows) "Relocating formulas..." 1531 (row ses--numrows) "Relocating formulas..."
1514 (dotimes (col ses--numcols) 1532 (dotimes (col ses--numcols)
1515 (setq ses-relocate-return nil 1533 (setq ses-relocate-return nil
1516 mycell (ses-get-cell row col) 1534 mycell (ses-get-cell row col)
1517 newval (ses-relocate-formula (ses-cell-formula mycell) 1535 newval (ses-relocate-formula (ses-cell-formula mycell)
1518 minrow mincol rowincr colincr)) 1536 minrow mincol rowincr colincr)
1537 xrow (- row rowincr))
1519 (ses-set-cell row col 'formula newval) 1538 (ses-set-cell row col 'formula newval)
1520 (if (eq ses-relocate-return 'range) 1539 (if (eq ses-relocate-return 'range)
1521 ;; This cell contains a (ses-range X Y) where a cell has been 1540 ;; This cell contains a (ses-range X Y) where a cell has been
@@ -1531,8 +1550,22 @@ to each symbol."
1531 minrow mincol rowincr colincr)) 1550 minrow mincol rowincr colincr))
1532 (ses-set-cell row col 'references newval) 1551 (ses-set-cell row col 'references newval)
1533 (and (>= row minrow) (>= col mincol) 1552 (and (>= row minrow) (>= col mincol)
1534 (ses-set-cell row col 'symbol 1553 (let ((sym (ses-cell-symbol row col))
1535 (ses-create-cell-symbol row col)))))) 1554 (xcol (- col colincr)))
1555 (if (and
1556 sym
1557 (>= xrow 0)
1558 (>= xcol 0)
1559 (null (eq sym
1560 (ses-create-cell-symbol xrow xcol))))
1561 ;; This is a renamed cell, do not update the cell
1562 ;; name, but just update the coordinate property.
1563 (put sym 'ses-cell (cons row col))
1564 (ses-set-cell row col 'symbol
1565 (setq sym (ses-create-cell-symbol row col)))
1566 (unless (and (boundp sym) (local-variable-p sym))
1567 (set (make-local-variable sym) nil)
1568 (put sym 'ses-cell (cons row col)))))) )))
1536 ;; Relocate the cell values. 1569 ;; Relocate the cell values.
1537 (let (oldval myrow mycol xrow xcol) 1570 (let (oldval myrow mycol xrow xcol)
1538 (cond 1571 (cond
@@ -1545,11 +1578,17 @@ to each symbol."
1545 (setq mycol (+ col mincol) 1578 (setq mycol (+ col mincol)
1546 xrow (- myrow rowincr) 1579 xrow (- myrow rowincr)
1547 xcol (- mycol colincr)) 1580 xcol (- mycol colincr))
1548 (if (and (< xrow ses--numrows) (< xcol ses--numcols)) 1581 (let ((sym (ses-cell-symbol myrow mycol))
1549 (setq oldval (ses-cell-value xrow xcol)) 1582 (xsym (ses-create-cell-symbol xrow xcol)))
1550 ;; Cell is off the end of the array. 1583 ;; Make the value relocation only when if the cell is not
1551 (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) 1584 ;; a renamed cell. Otherwise this is not needed.
1552 (ses-set-cell myrow mycol 'value oldval)))) 1585 (and (eq sym xsym)
1586 (ses-set-cell myrow mycol 'value
1587 (if (and (< xrow ses--numrows) (< xcol ses--numcols))
1588 (ses-cell-value xrow xcol)
1589 ;;Cell is off the end of the array
1590 (symbol-value xsym))))))))
1591
1553 ((and (wholenump rowincr) (wholenump colincr)) 1592 ((and (wholenump rowincr) (wholenump colincr))
1554 ;; Insertion of rows and/or columns. Run the loop backwards. 1593 ;; Insertion of rows and/or columns. Run the loop backwards.
1555 (let ((disty (1- ses--numrows)) 1594 (let ((disty (1- ses--numrows))
@@ -1659,7 +1698,6 @@ Does not execute cell formulas or print functions."
1659 (message "Upgrading from SES-1 file format"))) 1698 (message "Upgrading from SES-1 file format")))
1660 (or (= ses--file-format 2) 1699 (or (= ses--file-format 2)
1661 (error "This file needs a newer version of the SES library code")) 1700 (error "This file needs a newer version of the SES library code"))
1662 (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols))
1663 ;; Initialize cell array. 1701 ;; Initialize cell array.
1664 (setq ses--cells (make-vector ses--numrows nil)) 1702 (setq ses--cells (make-vector ses--numrows nil))
1665 (dotimes (row ses--numrows) 1703 (dotimes (row ses--numrows)
@@ -1679,11 +1717,10 @@ Does not execute cell formulas or print functions."
1679 (dotimes (row ses--numrows) 1717 (dotimes (row ses--numrows)
1680 (dotimes (col ses--numcols) 1718 (dotimes (col ses--numcols)
1681 (let* ((x (read (current-buffer))) 1719 (let* ((x (read (current-buffer)))
1682 (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) 1720 (sym (car-safe (cdr-safe x))))
1683 (or (and (looking-at "\n") 1721 (or (and (looking-at "\n")
1684 (eq (car-safe x) 'ses-cell) 1722 (eq (car-safe x) 'ses-cell)
1685 (eq row (car rowcol)) 1723 (ses-create-cell-variable sym row col))
1686 (eq col (cdr rowcol)))
1687 (error "Cell-def error")) 1724 (error "Cell-def error"))
1688 (eval x))) 1725 (eval x)))
1689 (or (looking-at "\n\n") 1726 (or (looking-at "\n\n")
@@ -3140,6 +3177,63 @@ highlighted range in the spreadsheet."
3140 (mouse-set-point event) 3177 (mouse-set-point event)
3141 (ses-insert-ses-range)) 3178 (ses-insert-ses-range))
3142 3179
3180(defun ses-replace-name-in-formula (formula old-name new-name)
3181 (let ((new-formula formula))
3182 (unless (and (consp formula)
3183 (eq (car-safe formula) 'quote))
3184 (while formula
3185 (let ((elt (car-safe formula)))
3186 (cond
3187 ((consp elt)
3188 (setcar formula (ses-replace-name-in-formula elt old-name new-name)))
3189 ((and (symbolp elt)
3190 (eq (car-safe formula) old-name))
3191 (setcar formula new-name))))
3192 (setq formula (cdr formula))))
3193 new-formula))
3194
3195(defun ses-rename-cell (new-name)
3196 "Rename current cell."
3197 (interactive "*SEnter new name: ")
3198 (ses-check-curcell)
3199 (or
3200 (and (local-variable-p new-name)
3201 (ses-sym-rowcol new-name)
3202 ;; this test is needed because ses-cell property of deleted cells
3203 ;; is not deleted in case of subsequent undo
3204 (memq new-name ses--renamed-cell-symb-list)
3205 (error "Already a cell name"))
3206 (and (boundp new-name)
3207 (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? "
3208 new-name)))
3209 (error "Already a bound cell name")))
3210 (let* ((rowcol (ses-sym-rowcol ses--curcell))
3211 (cell (ses-get-cell (car rowcol) (cdr rowcol))))
3212 (put new-name 'ses-cell rowcol)
3213 (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol)))
3214 (let* ((rowcol (ses-sym-rowcol reference))
3215 (cell (ses-get-cell (car rowcol) (cdr rowcol))))
3216 (ses-cell-set-formula (car rowcol)
3217 (cdr rowcol)
3218 (ses-replace-name-in-formula
3219 (ses-cell-formula cell)
3220 ses--curcell
3221 new-name))))
3222 (push new-name ses--renamed-cell-symb-list)
3223 (set new-name (symbol-value ses--curcell))
3224 (aset cell 0 new-name)
3225 (put ses--curcell 'ses-cell nil)
3226 (makunbound ses--curcell)
3227 (setq ses--curcell new-name)
3228 (let* ((pos (point))
3229 (inhibit-read-only t)
3230 (col (current-column))
3231 (end (save-excursion
3232 (move-to-column (1+ col))
3233 (if (eolp)
3234 (+ pos (ses-col-width col) 1)
3235 (point)))))
3236 (put-text-property pos end 'intangible new-name))) )
3143 3237
3144;;---------------------------------------------------------------------------- 3238;;----------------------------------------------------------------------------
3145;; Checking formulas for safety 3239;; Checking formulas for safety
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index bb1debb4552..9065d9ed131 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1,6 +1,6 @@
1;;; speedbar --- quick access to files and tags in a frame 1;;; speedbar --- quick access to files and tags in a frame
2 2
3;; Copyright (C) 1996-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
4 4
5;; Author: Eric M. Ludlam <zappo@gnu.org> 5;; Author: Eric M. Ludlam <zappo@gnu.org>
6;; Keywords: file, tags, tools 6;; Keywords: file, tags, tools
@@ -1022,7 +1022,7 @@ supported at a time.
1022 (set (make-local-variable 'dframe-delete-frame-function) 1022 (set (make-local-variable 'dframe-delete-frame-function)
1023 'speedbar-handle-delete-frame) 1023 'speedbar-handle-delete-frame)
1024 ;; hscroll 1024 ;; hscroll
1025 (set (make-local-variable 'automatic-hscrolling) nil) ; Emacs 21 1025 (set (make-local-variable 'auto-hscroll-mode) nil)
1026 ;; reset the selection variable 1026 ;; reset the selection variable
1027 (setq speedbar-last-selected-file nil)) 1027 (setq speedbar-last-selected-file nil))
1028 1028
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 3eb2be15698..7c95f47e0fb 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value."
549 (define-key map "R" 'tar-rename-entry) 549 (define-key map "R" 'tar-rename-entry)
550 (define-key map "u" 'tar-unflag) 550 (define-key map "u" 'tar-unflag)
551 (define-key map "v" 'tar-view) 551 (define-key map "v" 'tar-view)
552 (define-key map "w" 'woman-tar-extract-file)
552 (define-key map "x" 'tar-expunge) 553 (define-key map "x" 'tar-expunge)
553 (define-key map "\177" 'tar-unflag-backwards) 554 (define-key map "\177" 'tar-unflag-backwards)
554 (define-key map "E" 'tar-extract-other-window) 555 (define-key map "E" 'tar-extract-other-window)
@@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value."
566 (define-key map [menu-bar immediate] 567 (define-key map [menu-bar immediate]
567 (cons "Immediate" (make-sparse-keymap "Immediate"))) 568 (cons "Immediate" (make-sparse-keymap "Immediate")))
568 569
570 (define-key map [menu-bar immediate woman]
571 '("Read Man Page (WoMan)" . woman-tar-extract-file))
569 (define-key map [menu-bar immediate view] 572 (define-key map [menu-bar immediate view]
570 '("View This File" . tar-view)) 573 '("View This File" . tar-view))
571 (define-key map [menu-bar immediate display] 574 (define-key map [menu-bar immediate display]
@@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
677 (fundamental-mode) 680 (fundamental-mode)
678 (signal (car err) (cdr err))))) 681 (signal (car err) (cdr err)))))
679 682
683(autoload 'woman-tar-extract-file "woman"
684 "In tar mode, run the WoMan man-page browser on this file." t)
680 685
681(define-minor-mode tar-subfile-mode 686(define-minor-mode tar-subfile-mode
682 "Minor mode for editing an element of a tar-file. 687 "Minor mode for editing an element of a tar-file.
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index cfb1a2b3607..53822694698 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -574,12 +574,12 @@ re-start Emacs."
574 574
575 575
576(defvar ispell-dictionary-base-alist 576(defvar ispell-dictionary-base-alist
577 '((nil 577 '((nil ; default
578 ;; The default dictionary. It may be English.aff, or any other 578 ;; The default dictionary. It may be English.aff, or any other
579 ;; dictionary depending on locale and such things. We should probably 579 ;; dictionary depending on locale and such things. We should probably
580 ;; ask ispell what dictionary it's using, but until we do that, let's 580 ;; ask ispell what dictionary it's using, but until we do that, let's
581 ;; just use an approximate regexp. 581 ;; just use a minimal regexp. [:alpha:] will later be set if possible.
582 "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1) 582 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
583 ("american" ; Yankee English 583 ("american" ; Yankee English
584 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) 584 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
585 ("brasileiro" ; Brazilian mode 585 ("brasileiro" ; Brazilian mode
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 9e8cbb216d1..3e2ab7892da 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -63,15 +63,17 @@
63 63
64;; Picture Movement Commands 64;; Picture Movement Commands
65 65
66;; When a cursor is on a wide-column character (e.g. Chinese, 66(defvar picture-desired-column 0
67;; Japanese, Korean), this variable tells the desired current column 67 "Desired current column for Picture mode.
68;; which may be different from (current-column). 68When a cursor is on a wide-column character (e.g. Chinese,
69(defvar picture-desired-column 0) 69Japanese, Korean), this may may be different from `current-column'.")
70 70
71;; If the value of picture-desired-column is far from the current 71
72;; column, or if the arg ADJUST-TO-CURRENT is non-nil, set it to the
73;; current column. Return the current column.
74(defun picture-update-desired-column (adjust-to-current) 72(defun picture-update-desired-column (adjust-to-current)
73 "Maybe update `picture-desired-column'.
74If the value of `picture-desired-column' is more than one column
75from `current-column', or if the argument ADJUST-TO-CURRENT is
76non-nil, set it to the current column. Return `current-column'."
75 (let ((current-column (current-column))) 77 (let ((current-column (current-column)))
76 (if (or adjust-to-current 78 (if (or adjust-to-current
77 (< picture-desired-column (1- current-column)) 79 (< picture-desired-column (1- current-column))
@@ -606,64 +608,61 @@ Leaves the region surrounding the rectangle."
606 608
607(defalias 'picture-delete-char 'delete-char) 609(defalias 'picture-delete-char 'delete-char)
608 610
609(defvar picture-mode-map nil) 611(defvar picture-mode-map
610 612 (let ((map (make-keymap)))
611(defun picture-substitute (oldfun newfun) 613 (define-key map [remap self-insert-command] 'picture-self-insert)
612 (define-key picture-mode-map (vector 'remap oldfun) newfun)) 614 (define-key map [remap self-insert-command] 'picture-self-insert)
613 615 (define-key map [remap completion-separator-self-insert-command]
614(if (not picture-mode-map) 616 'picture-self-insert)
615 (progn 617 (define-key map [remap completion-separator-self-insert-autofilling]
616 (setq picture-mode-map (make-keymap)) 618 'picture-self-insert)
617 (picture-substitute 'self-insert-command 'picture-self-insert) 619 (define-key map [remap forward-char] 'picture-forward-column)
618 (picture-substitute 'completion-separator-self-insert-command 620 (define-key map [remap backward-char] 'picture-backward-column)
619 'picture-self-insert) 621 (define-key map [remap delete-char] 'picture-clear-column)
620 (picture-substitute 'completion-separator-self-insert-autofilling 622 ;; There are two possibilities for what is normally on DEL.
621 'picture-self-insert) 623 (define-key map [remap backward-delete-char-untabify]
622 (picture-substitute 'forward-char 'picture-forward-column) 624 'picture-backward-clear-column)
623 (picture-substitute 'backward-char 'picture-backward-column) 625 (define-key map [remap delete-backward-char] 'picture-backward-clear-column)
624 (picture-substitute 'delete-char 'picture-clear-column) 626 (define-key map [remap kill-line] 'picture-clear-line)
625 ;; There are two possibilities for what is normally on DEL. 627 (define-key map [remap open-line] 'picture-open-line)
626 (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column) 628 (define-key map [remap newline] 'picture-newline)
627 (picture-substitute 'delete-backward-char 'picture-backward-clear-column) 629 (define-key map [remap newline-and-indent] 'picture-duplicate-line)
628 (picture-substitute 'kill-line 'picture-clear-line) 630 (define-key map [remap next-line] 'picture-move-down)
629 (picture-substitute 'open-line 'picture-open-line) 631 (define-key map [remap previous-line] 'picture-move-up)
630 (picture-substitute 'newline 'picture-newline) 632 (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line)
631 (picture-substitute 'newline-and-indent 'picture-duplicate-line) 633 (define-key map [remap move-end-of-line] 'picture-end-of-line)
632 (picture-substitute 'next-line 'picture-move-down) 634 (define-key map [remap mouse-set-point] 'picture-mouse-set-point)
633 (picture-substitute 'previous-line 'picture-move-up) 635 (define-key map "\C-c\C-d" 'picture-delete-char)
634 (picture-substitute 'move-beginning-of-line 'picture-beginning-of-line) 636 (define-key map "\e\t" 'picture-toggle-tab-state)
635 (picture-substitute 'move-end-of-line 'picture-end-of-line) 637 (define-key map "\t" 'picture-tab)
636 (picture-substitute 'mouse-set-point 'picture-mouse-set-point) 638 (define-key map "\e\t" 'picture-tab-search)
637 639 (define-key map "\C-c\t" 'picture-set-tab-stops)
638 (define-key picture-mode-map "\C-c\C-d" 'picture-delete-char) 640 (define-key map "\C-c\C-k" 'picture-clear-rectangle)
639 (define-key picture-mode-map "\e\t" 'picture-toggle-tab-state) 641 (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register)
640 (define-key picture-mode-map "\t" 'picture-tab) 642 (define-key map "\C-c\C-y" 'picture-yank-rectangle)
641 (define-key picture-mode-map "\e\t" 'picture-tab-search) 643 (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register)
642 (define-key picture-mode-map "\C-c\t" 'picture-set-tab-stops) 644 (define-key map "\C-c\C-r" 'picture-draw-rectangle)
643 (define-key picture-mode-map "\C-c\C-k" 'picture-clear-rectangle) 645 (define-key map "\C-c\C-c" 'picture-mode-exit)
644 (define-key picture-mode-map "\C-c\C-w" 'picture-clear-rectangle-to-register) 646 (define-key map "\C-c\C-f" 'picture-motion)
645 (define-key picture-mode-map "\C-c\C-y" 'picture-yank-rectangle) 647 (define-key map "\C-c\C-b" 'picture-motion-reverse)
646 (define-key picture-mode-map "\C-c\C-x" 'picture-yank-rectangle-from-register) 648 (define-key map "\C-c<" 'picture-movement-left)
647 (define-key picture-mode-map "\C-c\C-r" 'picture-draw-rectangle) 649 (define-key map "\C-c>" 'picture-movement-right)
648 (define-key picture-mode-map "\C-c\C-c" 'picture-mode-exit) 650 (define-key map "\C-c^" 'picture-movement-up)
649 (define-key picture-mode-map "\C-c\C-f" 'picture-motion) 651 (define-key map "\C-c." 'picture-movement-down)
650 (define-key picture-mode-map "\C-c\C-b" 'picture-motion-reverse) 652 (define-key map "\C-c`" 'picture-movement-nw)
651 (define-key picture-mode-map "\C-c<" 'picture-movement-left) 653 (define-key map "\C-c'" 'picture-movement-ne)
652 (define-key picture-mode-map "\C-c>" 'picture-movement-right) 654 (define-key map "\C-c/" 'picture-movement-sw)
653 (define-key picture-mode-map "\C-c^" 'picture-movement-up) 655 (define-key map "\C-c\\" 'picture-movement-se)
654 (define-key picture-mode-map "\C-c." 'picture-movement-down) 656 (define-key map [(control ?c) left] 'picture-movement-left)
655 (define-key picture-mode-map "\C-c`" 'picture-movement-nw) 657 (define-key map [(control ?c) right] 'picture-movement-right)
656 (define-key picture-mode-map "\C-c'" 'picture-movement-ne) 658 (define-key map [(control ?c) up] 'picture-movement-up)
657 (define-key picture-mode-map "\C-c/" 'picture-movement-sw) 659 (define-key map [(control ?c) down] 'picture-movement-down)
658 (define-key picture-mode-map "\C-c\\" 'picture-movement-se) 660 (define-key map [(control ?c) home] 'picture-movement-nw)
659 (define-key picture-mode-map [(control ?c) left] 'picture-movement-left) 661 (define-key map [(control ?c) prior] 'picture-movement-ne)
660 (define-key picture-mode-map [(control ?c) right] 'picture-movement-right) 662 (define-key map [(control ?c) end] 'picture-movement-sw)
661 (define-key picture-mode-map [(control ?c) up] 'picture-movement-up) 663 (define-key map [(control ?c) next] 'picture-movement-se)
662 (define-key picture-mode-map [(control ?c) down] 'picture-movement-down) 664 map)
663 (define-key picture-mode-map [(control ?c) home] 'picture-movement-nw) 665 "Keymap used in `picture-mode'.")
664 (define-key picture-mode-map [(control ?c) prior] 'picture-movement-ne)
665 (define-key picture-mode-map [(control ?c) end] 'picture-movement-sw)
666 (define-key picture-mode-map [(control ?c) next] 'picture-movement-se)))
667 666
668(defcustom picture-mode-hook nil 667(defcustom picture-mode-hook nil
669 "If non-nil, its value is called on entry to Picture mode. 668 "If non-nil, its value is called on entry to Picture mode.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 9472d7df879..af00531137a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1492,8 +1492,8 @@ Puts point on a blank line between them."
1492 1492
1493(defvar latex-complete-bibtex-cache nil) 1493(defvar latex-complete-bibtex-cache nil)
1494 1494
1495(defun latex-string-prefix-p (str1 str2) 1495(define-obsolete-function-alias 'latex-string-prefix-p
1496 (eq t (compare-strings str1 nil nil str2 0 (length str1)))) 1496 'string-prefix-p "24.2")
1497 1497
1498(defvar bibtex-reference-key) 1498(defvar bibtex-reference-key)
1499(declare-function reftex-get-bibfile-list "reftex-cite.el" ()) 1499(declare-function reftex-get-bibfile-list "reftex-cite.el" ())
@@ -1507,7 +1507,7 @@ Puts point on a blank line between them."
1507 keys) 1507 keys)
1508 (if (and (eq (car latex-complete-bibtex-cache) 1508 (if (and (eq (car latex-complete-bibtex-cache)
1509 (reftex-get-bibfile-list)) 1509 (reftex-get-bibfile-list))
1510 (latex-string-prefix-p (nth 1 latex-complete-bibtex-cache) 1510 (string-prefix-p (nth 1 latex-complete-bibtex-cache)
1511 key)) 1511 key))
1512 ;; Use the cache. 1512 ;; Use the cache.
1513 (setq keys (nth 2 latex-complete-bibtex-cache)) 1513 (setq keys (nth 2 latex-complete-bibtex-cache))
@@ -2051,10 +2051,7 @@ IN can be either a string (with the same % escapes in it) indicating
2051OUT describes the output file and is either a %-escaped string 2051OUT describes the output file and is either a %-escaped string
2052 or nil to indicate that there is no output file.") 2052 or nil to indicate that there is no output file.")
2053 2053
2054;; defsubst* gives better byte-code than defsubst. 2054(define-obsolete-function-alias 'tex-string-prefix-p 'string-prefix-p "24.2")
2055(defsubst* tex-string-prefix-p (str1 str2)
2056 "Return non-nil if STR1 is a prefix of STR2"
2057 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
2058 2055
2059(defun tex-guess-main-file (&optional all) 2056(defun tex-guess-main-file (&optional all)
2060 "Find a likely `tex-main-file'. 2057 "Find a likely `tex-main-file'.
@@ -2069,7 +2066,7 @@ of the current buffer."
2069 (with-current-buffer buf 2066 (with-current-buffer buf
2070 (when (and (cond 2067 (when (and (cond
2071 ((null all) (equal dir default-directory)) 2068 ((null all) (equal dir default-directory))
2072 ((eq all 'sub) (tex-string-prefix-p default-directory dir)) 2069 ((eq all 'sub) (string-prefix-p default-directory dir))
2073 (t)) 2070 (t))
2074 (stringp tex-main-file)) 2071 (stringp tex-main-file))
2075 (throw 'found (expand-file-name tex-main-file))))) 2072 (throw 'found (expand-file-name tex-main-file)))))
@@ -2078,7 +2075,7 @@ of the current buffer."
2078 (with-current-buffer buf 2075 (with-current-buffer buf
2079 (when (and (cond 2076 (when (and (cond
2080 ((null all) (equal dir default-directory)) 2077 ((null all) (equal dir default-directory))
2081 ((eq all 'sub) (tex-string-prefix-p default-directory dir)) 2078 ((eq all 'sub) (string-prefix-p default-directory dir))
2082 (t)) 2079 (t))
2083 buffer-file-name 2080 buffer-file-name
2084 ;; (or (easy-mmode-derived-mode-p 'latex-mode) 2081 ;; (or (easy-mmode-derived-mode-p 'latex-mode)
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 40cbbc59292..8a4fe4f87fd 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -124,15 +124,51 @@
124 124
125 125
126;;; Code: 126;;; Code:
127 127(defgroup two-column nil
128 "Minor mode for editing of two-column text."
129 :prefix "2C-"
130 :group 'frames)
131
132(defcustom 2C-mode-line-format
133 '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
134 minor-mode-alist "%n" mode-line-process ")%]%-")
135 "Value of `mode-line-format' for a buffer in two-column minor mode."
136 :type 'sexp
137 :group 'two-column)
138
139(defcustom 2C-other-buffer-hook 'text-mode
140 "Hook run in new buffer when it is associated with current one."
141 :type 'function
142 :group 'two-column)
128 143
129;; Lucid patch 144(defcustom 2C-separator ""
130(or (fboundp 'frame-width) 145 "A string inserted between the two columns when merging.
131 (fset 'frame-width 'screen-width)) 146This gets set locally by \\[2C-split]."
147 :type 'string
148 :group 'two-column)
149(put '2C-separator 'permanent-local t)
150
151(defcustom 2C-window-width 40
152 "The width of the first column. (Must be at least `window-min-width'.)
153This value is local for every buffer that sets it."
154 :type 'integer
155 :group 'two-column)
156(make-variable-buffer-local '2C-window-width)
157(put '2C-window-width 'permanent-local t)
132 158
159(defcustom 2C-beyond-fill-column 4
160 "Base for calculating `fill-column' for a buffer in two-column minor mode.
161The value of `fill-column' becomes `2C-window-width' for this buffer
162minus this value."
163 :type 'integer
164 :group 'two-column)
133 165
134;;;;; Set up keymap ;;;;; 166(defcustom 2C-autoscroll t
167 "If non-nil, Emacs attempts to keep the two column's buffers aligned."
168 :type 'boolean
169 :group 'two-column)
135 170
171
136(defvar 2C-mode-map 172(defvar 2C-mode-map
137 (let ((map (make-sparse-keymap))) 173 (let ((map (make-sparse-keymap)))
138 (define-key map "2" '2C-two-columns) 174 (define-key map "2" '2C-two-columns)
@@ -142,8 +178,6 @@
142 map) 178 map)
143 "Keymap for commands for setting up two-column mode.") 179 "Keymap for commands for setting up two-column mode.")
144 180
145
146
147;;;###autoload (autoload '2C-command "two-column" () t 'keymap) 181;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
148(fset '2C-command 2C-mode-map) 182(fset '2C-command 2C-mode-map)
149 183
@@ -154,7 +188,6 @@
154 188
155;;;###autoload (global-set-key [f2] '2C-command) 189;;;###autoload (global-set-key [f2] '2C-command)
156 190
157
158(defvar 2C-minor-mode-map 191(defvar 2C-minor-mode-map
159 (let ((map (make-sparse-keymap))) 192 (let ((map (make-sparse-keymap)))
160 (define-key map "1" '2C-merge) 193 (define-key map "1" '2C-merge)
@@ -167,7 +200,6 @@
167 map) 200 map)
168 "Keymap for commands for use in two-column mode.") 201 "Keymap for commands for use in two-column mode.")
169 202
170
171(setq minor-mode-map-alist 203(setq minor-mode-map-alist
172 (cons (cons '2C-mode 204 (cons (cons '2C-mode
173 (let ((map (make-sparse-keymap))) 205 (let ((map (make-sparse-keymap)))
@@ -181,15 +213,8 @@
181 map (current-global-map)) 213 map (current-global-map))
182 map)) 214 map))
183 minor-mode-map-alist)) 215 minor-mode-map-alist))
184
185;;;;; variable declarations ;;;;;
186
187(defgroup two-column nil
188 "Minor mode for editing of two-column text."
189 :prefix "2C-"
190 :group 'frames)
191
192 216
217
193;; Markers seem to be the only buffer-id not affected by renaming a buffer. 218;; Markers seem to be the only buffer-id not affected by renaming a buffer.
194;; This nevertheless loses when a buffer is killed. The variable-name is 219;; This nevertheless loses when a buffer is killed. The variable-name is
195;; required by `describe-mode'. 220;; required by `describe-mode'.
@@ -198,62 +223,8 @@
198(make-variable-buffer-local '2C-mode) 223(make-variable-buffer-local '2C-mode)
199(put '2C-mode 'permanent-local t) 224(put '2C-mode 'permanent-local t)
200 225
201
202
203(setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist)) 226(setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist))
204 227
205
206
207;; rearranged, so that the pertinent info will show in 40 columns
208(defcustom 2C-mode-line-format
209 '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
210 minor-mode-alist "%n" mode-line-process ")%]%-")
211 "Value of `mode-line-format' for a buffer in two-column minor mode."
212 :type 'sexp
213 :group 'two-column)
214
215
216(defcustom 2C-other-buffer-hook 'text-mode
217 "Hook run in new buffer when it is associated with current one."
218 :type 'function
219 :group 'two-column)
220
221
222(defcustom 2C-separator ""
223 "A string inserted between the two columns when merging.
224This gets set locally by \\[2C-split]."
225 :type 'string
226 :group 'two-column)
227(put '2C-separator 'permanent-local t)
228
229
230
231(defcustom 2C-window-width 40
232 "The width of the first column. (Must be at least `window-min-width')
233This value is local for every buffer that sets it."
234 :type 'integer
235 :group 'two-column)
236(make-variable-buffer-local '2C-window-width)
237(put '2C-window-width 'permanent-local t)
238
239
240
241(defcustom 2C-beyond-fill-column 4
242 "Base for calculating `fill-column' for a buffer in two-column minor mode.
243The value of `fill-column' becomes `2C-window-width' for this buffer
244minus this value."
245 :type 'integer
246 :group 'two-column)
247
248
249
250(defcustom 2C-autoscroll t
251 "If non-nil, Emacs attempts to keep the two column's buffers aligned."
252 :type 'boolean
253 :group 'two-column)
254
255
256
257(defvar 2C-autoscroll-start nil) 228(defvar 2C-autoscroll-start nil)
258(make-variable-buffer-local '2C-autoscroll-start) 229(make-variable-buffer-local '2C-autoscroll-start)
259 230
@@ -276,7 +247,6 @@ minus this value."
276 (if req (error "You must first set two-column minor mode")))) 247 (if req (error "You must first set two-column minor mode"))))
277 248
278 249
279
280;; function for setting up two-column minor mode in a buffer associated 250;; function for setting up two-column minor mode in a buffer associated
281;; with the buffer pointed to by the marker other. 251;; with the buffer pointed to by the marker other.
282(defun 2C-mode (other) 252(defun 2C-mode (other)
@@ -320,7 +290,6 @@ The appearance of the screen can be customized by the variables
320 (run-hooks '2C-mode-hook)) 290 (run-hooks '2C-mode-hook))
321 291
322 292
323
324;;;###autoload 293;;;###autoload
325(defun 2C-two-columns (&optional buffer) 294(defun 2C-two-columns (&optional buffer)
326 "Split current window vertically for two-column editing. 295 "Split current window vertically for two-column editing.
@@ -356,7 +325,6 @@ first and the associated buffer to its right."
356 (other-window -1))))) 325 (other-window -1)))))
357 326
358 327
359
360;;;###autoload 328;;;###autoload
361(defun 2C-associate-buffer () 329(defun 2C-associate-buffer ()
362 "Associate another buffer with this one in two-column minor mode. 330 "Associate another buffer with this one in two-column minor mode.
@@ -368,9 +336,8 @@ accepting the proposed default buffer.
368 (let ((b1 (current-buffer)) 336 (let ((b1 (current-buffer))
369 (b2 (or (2C-other) 337 (b2 (or (2C-other)
370 (read-buffer "Associate buffer: " (other-buffer))))) 338 (read-buffer "Associate buffer: " (other-buffer)))))
371 (save-excursion 339 (setq 2C-mode nil)
372 (setq 2C-mode nil) 340 (with-current-buffer b2
373 (set-buffer b2)
374 (and (2C-other) 341 (and (2C-other)
375 (not (eq b1 (2C-other))) 342 (not (eq b1 (2C-other)))
376 (error "Buffer already associated with buffer `%s'" 343 (error "Buffer already associated with buffer `%s'"
@@ -382,7 +349,6 @@ accepting the proposed default buffer.
382 (2C-two-columns b2))) 349 (2C-two-columns b2)))
383 350
384 351
385
386;;;###autoload 352;;;###autoload
387(defun 2C-split (arg) 353(defun 2C-split (arg)
388 "Split a two-column text at point, into two buffers in two-column minor mode. 354 "Split a two-column text at point, into two buffers in two-column minor mode.
@@ -454,32 +420,28 @@ First column's text sSs Second column's text
454 (move-to-column column))))) 420 (move-to-column column)))))
455 421
456 422
457
458
459(defun 2C-dissociate () 423(defun 2C-dissociate ()
460 "Turn off two-column minor mode in current and associated buffer. 424 "Turn off two-column minor mode in current and associated buffer.
461If the associated buffer is unmodified and empty, it is killed." 425If the associated buffer is unmodified and empty, it is killed."
462 (interactive) 426 (interactive)
463 (let ((buffer (current-buffer))) 427 (let ((buffer (current-buffer))
464 (save-excursion 428 (other (2C-other)))
465 (and (2C-other) 429 (if other
466 (set-buffer (2C-other)) 430 (with-current-buffer other
467 (or (not (2C-other)) 431 (when (or (not (2C-other)) (eq buffer (2C-other)))
468 (eq buffer (2C-other))) 432 (if (and (not (buffer-modified-p)) (zerop (buffer-size)))
469 (if (and (not (buffer-modified-p)) 433 (kill-buffer)
470 (eobp) (bobp)) 434 (kill-local-variable '2C-mode)
471 (kill-buffer nil) 435 (kill-local-variable '2C-window-width)
472 (kill-local-variable '2C-mode) 436 (kill-local-variable '2C-separator)
473 (kill-local-variable '2C-window-width) 437 (kill-local-variable 'mode-line-format)
474 (kill-local-variable '2C-separator) 438 (kill-local-variable 'fill-column))))))
475 (kill-local-variable 'mode-line-format) 439 (kill-local-variable '2C-mode)
476 (kill-local-variable 'fill-column)))) 440 (kill-local-variable '2C-window-width)
477 (kill-local-variable '2C-mode) 441 (kill-local-variable '2C-separator)
478 (kill-local-variable '2C-window-width) 442 (kill-local-variable 'mode-line-format)
479 (kill-local-variable '2C-separator) 443 (kill-local-variable 'fill-column)
480 (kill-local-variable 'mode-line-format) 444 (force-mode-line-update))
481 (kill-local-variable 'fill-column)))
482
483 445
484 446
485;; this doesn't use yank-rectangle, so that the first column can 447;; this doesn't use yank-rectangle, so that the first column can
@@ -578,7 +540,6 @@ on, this also realigns the two buffers."
578 (message "Autoscrolling is off."))) 540 (message "Autoscrolling is off.")))
579 541
580 542
581
582(defun 2C-autoscroll () 543(defun 2C-autoscroll ()
583 (if 2C-autoscroll 544 (if 2C-autoscroll
584 ;; catch a mouse scroll on non-selected scrollbar 545 ;; catch a mouse scroll on non-selected scrollbar
@@ -590,27 +551,25 @@ on, this also realigns the two buffers."
590 (select-window (car (car (cdr last-command-event))))) 551 (select-window (car (car (cdr last-command-event)))))
591 ;; In some cases scrolling causes an error, but post-command-hook 552 ;; In some cases scrolling causes an error, but post-command-hook
592 ;; shouldn't, and should always stay in the original window 553 ;; shouldn't, and should always stay in the original window
593 (condition-case () 554 (ignore-errors
594 (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) 555 (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil)
595 (/= (window-start) 2C-autoscroll-start) 556 (/= (window-start) 2C-autoscroll-start)
596 (2C-other) 557 (2C-other)
597 (get-buffer-window (2C-other)) 558 (get-buffer-window (2C-other))
598 (let ((lines (count-lines (window-start) 559 (let ((lines (count-lines (window-start)
599 2C-autoscroll-start))) 560 2C-autoscroll-start)))
600 (if (< (window-start) 2C-autoscroll-start) 561 (if (< (window-start) 2C-autoscroll-start)
601 (setq lines (- lines))) 562 (setq lines (- lines)))
602 (setq 2C-autoscroll-start (window-start)) 563 (setq 2C-autoscroll-start (window-start))
603 (select-window (get-buffer-window (2C-other))) 564 (select-window (get-buffer-window (2C-other)))
604 ;; make sure that other buffer has enough lines 565 ;; make sure that other buffer has enough lines
605 (save-excursion 566 (save-excursion
606 (insert-char 567 (insert-char
607 ?\n (- lines (count-lines (window-start) 568 ?\n (- lines (count-lines (window-start)
608 (goto-char (point-max))) 569 (goto-char (point-max)))
609 -1))) 570 -1)))
610 (scroll-up lines) 571 (scroll-up lines)
611 (setq 2C-autoscroll-start (window-start)))) 572 (setq 2C-autoscroll-start (window-start)))))))))
612 (error))))))
613
614 573
615 574
616(defun 2C-enlarge-window-horizontally (arg) 575(defun 2C-enlarge-window-horizontally (arg)
@@ -628,7 +587,6 @@ on, this also realigns the two buffers."
628 (2C-enlarge-window-horizontally (- arg))) 587 (2C-enlarge-window-horizontally (- arg)))
629 588
630 589
631
632(provide 'two-column) 590(provide 'two-column)
633 591
634;;; two-column.el ends here 592;;; two-column.el ends here
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el
index b300247e552..a3c525cb896 100644
--- a/lisp/vc/pcvs-util.el
+++ b/lisp/vc/pcvs-util.el
@@ -182,9 +182,7 @@ arguments. If ARGS is not a list, no argument will be passed."
182 (if oneline (line-end-position) (point-max)))) 182 (if oneline (line-end-position) (point-max))))
183 (file-error nil))) 183 (file-error nil)))
184 184
185(defun cvs-string-prefix-p (str1 str2) 185(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.2")
186 "Tell whether STR1 is a prefix of STR2."
187 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
188 186
189;;;; 187;;;;
190;;;; file names 188;;;; file names
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 9ba65cda143..6aec24755b5 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -432,8 +432,8 @@ If non-nil, NEW means to create a new buffer no matter what."
432 (case cvs-reuse-cvs-buffer 432 (case cvs-reuse-cvs-buffer
433 (always t) 433 (always t)
434 (subdir 434 (subdir
435 (or (cvs-string-prefix-p default-directory dir) 435 (or (string-prefix-p default-directory dir)
436 (cvs-string-prefix-p dir default-directory))) 436 (string-prefix-p dir default-directory)))
437 (samedir (string= default-directory dir))) 437 (samedir (string= default-directory dir)))
438 (return buffer))))) 438 (return buffer)))))
439 ;; we really have to create a new buffer: 439 ;; we really have to create a new buffer:
@@ -887,7 +887,7 @@ RM-MSGS if non-nil means remove messages."
887 (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE) 887 (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE)
888 (not (when first-dir (setq first-dir nil) t)) 888 (not (when first-dir (setq first-dir nil) t))
889 (or (eq rm-dirs 'all) 889 (or (eq rm-dirs 'all)
890 (not (cvs-string-prefix-p 890 (not (string-prefix-p
891 (cvs-fileinfo->dir last-fi) 891 (cvs-fileinfo->dir last-fi)
892 (cvs-fileinfo->dir fi))) 892 (cvs-fileinfo->dir fi)))
893 (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty)) 893 (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty))
@@ -1839,7 +1839,7 @@ Signal an error if there is no backup file."
1839 (setq buffer-file-name (expand-file-name buffer-file-name)) 1839 (setq buffer-file-name (expand-file-name buffer-file-name))
1840 (let (ret) 1840 (let (ret)
1841 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) 1841 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))
1842 (when (cvs-string-prefix-p 1842 (when (string-prefix-p
1843 (expand-file-name (cvs-fileinfo->full-name fi) dir) 1843 (expand-file-name (cvs-fileinfo->full-name fi) dir)
1844 buffer-file-name) 1844 buffer-file-name)
1845 (setq ret t))) 1845 (setq ret t)))
@@ -2261,7 +2261,7 @@ With prefix argument, prompt for cvs flags."
2261(defun cvs-dir-member-p (fileinfo dir) 2261(defun cvs-dir-member-p (fileinfo dir)
2262 "Return true if FILEINFO represents a file in directory DIR." 2262 "Return true if FILEINFO represents a file in directory DIR."
2263 (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) 2263 (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE))
2264 (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) 2264 (string-prefix-p dir (cvs-fileinfo->dir fileinfo))))
2265 2265
2266(defun cvs-execute-single-file (fi extractor program constant-args) 2266(defun cvs-execute-single-file (fi extractor program constant-args)
2267 "Internal function for `cvs-execute-single-file-list'." 2267 "Internal function for `cvs-execute-single-file-list'."
@@ -2392,7 +2392,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
2392 (set-buffer cvs-buf) 2392 (set-buffer cvs-buf)
2393 ;; look for a corresponding pcl-cvs buffer 2393 ;; look for a corresponding pcl-cvs buffer
2394 (when (and (eq major-mode 'cvs-mode) 2394 (when (and (eq major-mode 'cvs-mode)
2395 (cvs-string-prefix-p default-directory dir)) 2395 (string-prefix-p default-directory dir))
2396 (let ((subdir (substring dir (length default-directory)))) 2396 (let ((subdir (substring dir (length default-directory))))
2397 (set-buffer buffer) 2397 (set-buffer buffer)
2398 (set (make-local-variable 'cvs-buffer) cvs-buf) 2398 (set (make-local-variable 'cvs-buffer) cvs-buf)
@@ -2423,7 +2423,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
2423 (set-buffer cvs-buf) 2423 (set-buffer cvs-buf)
2424 ;; look for a corresponding pcl-cvs buffer 2424 ;; look for a corresponding pcl-cvs buffer
2425 (when (and (eq major-mode 'cvs-mode) 2425 (when (and (eq major-mode 'cvs-mode)
2426 (cvs-string-prefix-p default-directory file)) 2426 (string-prefix-p default-directory file))
2427 (let* ((file (substring file (length default-directory))) 2427 (let* ((file (substring file (length default-directory)))
2428 (fi (cvs-create-fileinfo 2428 (fi (cvs-create-fileinfo
2429 (if (string= "0" version) 2429 (if (string= "0" version)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 33611b4eafd..4c32eea2f72 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1,6 +1,6 @@
1;;; vc-dir.el --- Directory status display under VC 1;;; vc-dir.el --- Directory status display under VC
2 2
3;; Copyright (C) 2007-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
4 4
5;; Author: Dan Nicolaescu <dann@ics.uci.edu> 5;; Author: Dan Nicolaescu <dann@ics.uci.edu>
6;; Keywords: vc tools 6;; Keywords: vc tools
@@ -556,7 +556,7 @@ If a prefix argument is given, move by that many lines."
556 (let ((data (ewoc-data crt)) 556 (let ((data (ewoc-data crt))
557 (dir (vc-dir-node-directory crt))) 557 (dir (vc-dir-node-directory crt)))
558 (and (vc-dir-fileinfo->directory data) 558 (and (vc-dir-fileinfo->directory data)
559 (vc-string-prefix-p dir argdir) 559 (string-prefix-p dir argdir)
560 (vc-dir-fileinfo->marked data) 560 (vc-dir-fileinfo->marked data)
561 (setq found data)))) 561 (setq found data))))
562 found)) 562 found))
@@ -818,7 +818,7 @@ child files."
818 data) 818 data)
819 (while 819 (while
820 (and (setq crt (ewoc-next vc-ewoc crt)) 820 (and (setq crt (ewoc-next vc-ewoc crt))
821 (vc-string-prefix-p dir 821 (string-prefix-p dir
822 (progn 822 (progn
823 (setq data (ewoc-data crt)) 823 (setq data (ewoc-data crt))
824 (vc-dir-node-directory crt)))) 824 (vc-dir-node-directory crt))))
@@ -846,7 +846,7 @@ If it is a file, return the corresponding cons for the file itself."
846 data) 846 data)
847 (while 847 (while
848 (and (setq crt (ewoc-next vc-ewoc crt)) 848 (and (setq crt (ewoc-next vc-ewoc crt))
849 (vc-string-prefix-p dir (progn 849 (string-prefix-p dir (progn
850 (setq data (ewoc-data crt)) 850 (setq data (ewoc-data crt))
851 (vc-dir-node-directory crt)))) 851 (vc-dir-node-directory crt))))
852 (unless (vc-dir-fileinfo->directory data) 852 (unless (vc-dir-fileinfo->directory data)
@@ -878,10 +878,10 @@ If it is a file, return the corresponding cons for the file itself."
878 children 878 children
879 dname) 879 dname)
880 ;; Find DIR 880 ;; Find DIR
881 (while (and crt (not (vc-string-prefix-p 881 (while (and crt (not (string-prefix-p
882 dirname (vc-dir-node-directory crt)))) 882 dirname (vc-dir-node-directory crt))))
883 (setq crt (ewoc-next vc-ewoc crt))) 883 (setq crt (ewoc-next vc-ewoc crt)))
884 (while (and crt (vc-string-prefix-p 884 (while (and crt (string-prefix-p
885 dirname 885 dirname
886 (setq dname (vc-dir-node-directory crt)))) 886 (setq dname (vc-dir-node-directory crt))))
887 (let ((data (ewoc-data crt))) 887 (let ((data (ewoc-data crt)))
@@ -915,7 +915,7 @@ If it is a file, return the corresponding cons for the file itself."
915 (if (not (derived-mode-p 'vc-dir-mode)) 915 (if (not (derived-mode-p 'vc-dir-mode))
916 (push status-buf drop) 916 (push status-buf drop)
917 (let ((ddir default-directory)) 917 (let ((ddir default-directory))
918 (when (vc-string-prefix-p ddir file) 918 (when (string-prefix-p ddir file)
919 (if (file-directory-p file) 919 (if (file-directory-p file)
920 (progn 920 (progn
921 (vc-dir-resync-directory-files file) 921 (vc-dir-resync-directory-files file)
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index ec1b127dd19..95c15030953 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -537,13 +537,12 @@ editing!"
537 (kill-buffer (current-buffer))))) 537 (kill-buffer (current-buffer)))))
538 538
539(declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) 539(declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
540(declare-function vc-string-prefix-p "vc" (prefix string))
541 540
542(defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info) 541(defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info)
543 "Resync all buffers that visit files in DIRECTORY." 542 "Resync all buffers that visit files in DIRECTORY."
544 (dolist (buffer (buffer-list)) 543 (dolist (buffer (buffer-list))
545 (let ((fname (buffer-file-name buffer))) 544 (let ((fname (buffer-file-name buffer)))
546 (when (and fname (vc-string-prefix-p directory fname)) 545 (when (and fname (string-prefix-p directory fname))
547 (with-current-buffer buffer 546 (with-current-buffer buffer
548 (vc-resynch-buffer fname keep noquery reset-vc-info)))))) 547 (vc-resynch-buffer fname keep noquery reset-vc-info))))))
549 548
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 52e8051342d..a2728268816 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 2006-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 4
5;; Author: Ivan Kanis 5;; Author: Ivan Kanis
6;; Maintainer: FSF
6;; Keywords: vc tools 7;; Keywords: vc tools
7;; Package: vc 8;; Package: vc
8 9
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 4cbbf47c2d6..ab7e587eb79 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1,6 +1,6 @@
1;;; vc.el --- drive a version-control system from within Emacs 1;;; vc.el --- drive a version-control system from within Emacs
2 2
3;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: FSF (see below for full credits) 5;; Author: FSF (see below for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -847,7 +847,7 @@ been updated to their corresponding values."
847 (if (file-directory-p file) 847 (if (file-directory-p file)
848 (dolist (buffer (buffer-list)) 848 (dolist (buffer (buffer-list))
849 (let ((fname (buffer-file-name buffer))) 849 (let ((fname (buffer-file-name buffer)))
850 (when (and fname (vc-string-prefix-p file fname)) 850 (when (and fname (string-prefix-p file fname))
851 (push fname flist)))) 851 (push fname flist))))
852 (push file flist))) 852 (push file flist)))
853 ,form 853 ,form
@@ -900,7 +900,7 @@ use."
900 (lambda (arg) 900 (lambda (arg)
901 (message "arg %s" arg) 901 (message "arg %s" arg)
902 (and (file-directory-p arg) 902 (and (file-directory-p arg)
903 (vc-string-prefix-p (expand-file-name arg) def-dir))))))) 903 (string-prefix-p (expand-file-name arg) def-dir)))))))
904 (let ((default-directory repo-dir)) 904 (let ((default-directory repo-dir))
905 (vc-call-backend bk 'create-repo)) 905 (vc-call-backend bk 'create-repo))
906 (throw 'found bk)))) 906 (throw 'found bk))))
@@ -2809,11 +2809,7 @@ to provide the `find-revision' operation instead."
2809 2809
2810 2810
2811;; These things should probably be generally available 2811;; These things should probably be generally available
2812 2812(define-obsolete-function-alias 'vc-string-prefix-p 'string-prefix-p "24.2")
2813(defun vc-string-prefix-p (prefix string)
2814 (let ((lpref (length prefix)))
2815 (and (>= (length string) lpref)
2816 (eq t (compare-strings prefix nil nil string nil lpref)))))
2817 2813
2818(defun vc-file-tree-walk (dirname func &rest args) 2814(defun vc-file-tree-walk (dirname func &rest args)
2819 "Walk recursively through DIRNAME. 2815 "Walk recursively through DIRNAME.
diff --git a/lisp/woman.el b/lisp/woman.el
index c76399a96e5..98ab27716a1 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1,6 +1,6 @@
1;;; woman.el --- browse UN*X manual pages `wo (without) man' 1;;; woman.el --- browse UN*X manual pages `wo (without) man'
2 2
3;; Copyright (C) 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> 5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -1595,14 +1595,6 @@ Also make each path-info component into a list.
1595 (woman-process-buffer) 1595 (woman-process-buffer)
1596 (goto-char (point-min))))) 1596 (goto-char (point-min)))))
1597 1597
1598;; There is currently no `tar-mode-hook' so use ...
1599(eval-after-load "tar-mode"
1600 '(progn
1601 (define-key tar-mode-map "w" 'woman-tar-extract-file)
1602 (define-key-after (lookup-key tar-mode-map [menu-bar immediate])
1603 [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view)))
1604
1605
1606(defvar woman-last-file-name nil 1598(defvar woman-last-file-name nil
1607 "The full pathname of the last file formatted by WoMan.") 1599 "The full pathname of the last file formatted by WoMan.")
1608 1600
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 85b69f47d28..f6ffedeafda 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,4 +1,4 @@
12012-04-14 Paul Eggert <eggert@cs.ucla.edu> 12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 configure: new option --enable-gcc-warnings (Bug#11207) 3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove. 4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index fa7dc234717..bf3a11d5bd8 100644
--- a/msdos/ChangeLog
+++ b/msdos/ChangeLog
@@ -1,4 +1,4 @@
12012-04-14 Paul Eggert <eggert@cs.ucla.edu> 12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 configure: new option --enable-gcc-warnings (Bug#11207) 3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * sed1v2.inp, sed3v2.inp, sedlibmk.inp: GNULIB_WARN_CFLAGS, 4 * sed1v2.inp, sed3v2.inp, sedlibmk.inp: GNULIB_WARN_CFLAGS,
diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog
index a76ea61abd8..243899e011d 100644
--- a/oldXMenu/ChangeLog
+++ b/oldXMenu/ChangeLog
@@ -1,4 +1,4 @@
12012-04-14 Paul Eggert <eggert@cs.ucla.edu> 12012-04-17 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 configure: new option --enable-gcc-warnings (Bug#11207) 3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove. 4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
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.