aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--admin/FOR-RELEASE12
-rwxr-xr-xautogen/configure216
-rw-r--r--configure.in9
-rw-r--r--doc/emacs/ChangeLog73
-rw-r--r--doc/emacs/arevert-xtra.texi10
-rw-r--r--doc/emacs/basic.texi2
-rw-r--r--doc/emacs/buffers.texi110
-rw-r--r--doc/emacs/calendar.texi13
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/custom.texi21
-rw-r--r--doc/emacs/display.texi405
-rw-r--r--doc/emacs/emacs.texi4
-rw-r--r--doc/emacs/files.texi667
-rw-r--r--doc/emacs/fixit.texi93
-rw-r--r--doc/emacs/fortran-xtra.texi2
-rw-r--r--doc/emacs/frames.texi121
-rw-r--r--doc/emacs/help.texi2
-rw-r--r--doc/emacs/killing.texi2
-rw-r--r--doc/emacs/kmacro.texi2
-rw-r--r--doc/emacs/macos.texi2
-rw-r--r--doc/emacs/mini.texi86
-rw-r--r--doc/emacs/programs.texi2
-rw-r--r--doc/emacs/rmail.texi13
-rw-r--r--doc/emacs/screen.texi2
-rw-r--r--doc/emacs/search.texi215
-rw-r--r--doc/emacs/windows.texi4
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--etc/NEWS49
-rw-r--r--etc/PROBLEMS8
-rw-r--r--lisp/ChangeLog234
-rw-r--r--lisp/abbrev.el9
-rw-r--r--lisp/allout-widgets.el15
-rw-r--r--lisp/allout.el22
-rw-r--r--lisp/autoarg.el31
-rw-r--r--lisp/autoinsert.el7
-rw-r--r--lisp/autorevert.el40
-rw-r--r--lisp/battery.el10
-rw-r--r--lisp/cedet/ChangeLog17
-rw-r--r--lisp/cedet/ede.el20
-rw-r--r--lisp/cedet/ede/project-am.el6
-rw-r--r--lisp/cedet/ede/util.el7
-rw-r--r--lisp/cedet/semantic.el6
-rw-r--r--lisp/composite.el22
-rw-r--r--lisp/delsel.el5
-rw-r--r--lisp/descr-text.el3
-rw-r--r--lisp/desktop.el13
-rw-r--r--lisp/dired-x.el20
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/dirtrack.el8
-rw-r--r--lisp/doc-view.el7
-rw-r--r--lisp/double.el11
-rw-r--r--lisp/electric.el19
-rw-r--r--lisp/emacs-lisp/checkdoc.el7
-rw-r--r--lisp/emacs-lisp/easy-mmode.el12
-rw-r--r--lisp/emacs-lisp/eldoc.el19
-rw-r--r--lisp/emacs-lock.el18
-rw-r--r--lisp/emulation/crisp.el6
-rw-r--r--lisp/emulation/cua-base.el23
-rw-r--r--lisp/epa-hook.el9
-rw-r--r--lisp/erc/ChangeLog8
-rw-r--r--lisp/erc/erc-fill.el9
-rw-r--r--lisp/erc/erc-track.el15
-rw-r--r--lisp/erc/erc.el4
-rw-r--r--lisp/face-remap.el2
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/follow.el9
-rw-r--r--lisp/font-core.el10
-rw-r--r--lisp/frame.el25
-rw-r--r--lisp/gnus/ChangeLog46
-rw-r--r--lisp/gnus/gnus-cite.el9
-rw-r--r--lisp/help.el16
-rw-r--r--lisp/hi-lock.el19
-rw-r--r--lisp/hilit-chg.el26
-rw-r--r--lisp/hl-line.el15
-rw-r--r--lisp/ibuf-ext.el6
-rw-r--r--lisp/ibuffer.el8
-rw-r--r--lisp/icomplete.el7
-rw-r--r--lisp/ido.el6
-rw-r--r--lisp/image-file.el9
-rw-r--r--lisp/image-mode.el13
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/isearch.el2
-rw-r--r--lisp/iswitchb.el11
-rw-r--r--lisp/jka-cmpr-hook.el11
-rw-r--r--lisp/linum.el7
-rw-r--r--lisp/longlines.el31
-rw-r--r--lisp/mail/footnote.el11
-rw-r--r--lisp/mail/mailabbrev.el10
-rw-r--r--lisp/master.el10
-rw-r--r--lisp/mb-depth.el12
-rw-r--r--lisp/menu-bar.el10
-rw-r--r--lisp/minibuf-eldef.el18
-rw-r--r--lisp/mouse-sel.el9
-rw-r--r--lisp/mouse.el421
-rw-r--r--lisp/msb.el5
-rw-r--r--lisp/mwheel.el8
-rw-r--r--lisp/net/browse-url.el45
-rw-r--r--lisp/net/goto-addr.el2
-rw-r--r--lisp/net/tramp-cache.el3
-rw-r--r--lisp/net/tramp.el5
-rw-r--r--lisp/net/trampver.el4
-rw-r--r--lisp/net/xesam.el6
-rw-r--r--lisp/outline.el5
-rw-r--r--lisp/paren.el12
-rw-r--r--lisp/progmodes/bug-reference.el5
-rw-r--r--lisp/progmodes/cap-words.el8
-rw-r--r--lisp/progmodes/cc-engine.el53
-rw-r--r--lisp/progmodes/compile.el28
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/hideif.el14
-rw-r--r--lisp/progmodes/idlw-shell.el18
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/octave-inf.el2
-rw-r--r--lisp/progmodes/octave-mod.el8
-rw-r--r--lisp/progmodes/subword.el20
-rw-r--r--lisp/progmodes/vera-mode.el1
-rw-r--r--lisp/progmodes/vhdl-mode.el8
-rw-r--r--lisp/progmodes/which-func.el14
-rw-r--r--lisp/recentf.el14
-rw-r--r--lisp/reveal.el19
-rw-r--r--lisp/rfn-eshadow.el18
-rw-r--r--lisp/ruler-mode.el6
-rw-r--r--lisp/savehist.el18
-rw-r--r--lisp/scroll-all.el11
-rw-r--r--lisp/scroll-bar.el11
-rw-r--r--lisp/server.el8
-rw-r--r--lisp/shell.el10
-rw-r--r--lisp/simple.el133
-rw-r--r--lisp/strokes.el8
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/t-mouse.el9
-rw-r--r--lisp/tar-mode.el12
-rw-r--r--lisp/term/tvi970.el17
-rw-r--r--lisp/term/vt100.el5
-rw-r--r--lisp/textmodes/flyspell.el14
-rw-r--r--lisp/textmodes/ispell.el20
-rw-r--r--lisp/textmodes/nroff-mode.el16
-rw-r--r--lisp/textmodes/paragraphs.el22
-rw-r--r--lisp/textmodes/refill.el15
-rw-r--r--lisp/textmodes/reftex.el8
-rw-r--r--lisp/textmodes/rst.el9
-rw-r--r--lisp/textmodes/sgml-mode.el20
-rw-r--r--lisp/textmodes/tex-mode.el10
-rw-r--r--lisp/time.el17
-rw-r--r--lisp/tool-bar.el7
-rw-r--r--lisp/tooltip.el13
-rw-r--r--lisp/type-break.el28
-rw-r--r--lisp/url/ChangeLog4
-rw-r--r--lisp/url/url-handlers.el5
-rw-r--r--lisp/vc/diff-mode.el19
-rw-r--r--lisp/vc/ediff-init.el8
-rw-r--r--lisp/vc/log-edit.el2
-rw-r--r--lisp/vc/vc-bzr.el4
-rw-r--r--lisp/vc/vc-hooks.el18
-rw-r--r--lisp/vc/vc.el8
-rw-r--r--lisp/view.el27
-rw-r--r--lisp/whitespace.el36
-rw-r--r--lisp/wid-browse.el3
-rw-r--r--lisp/window.el29
-rw-r--r--lisp/xt-mouse.el5
-rw-r--r--nextstep/ChangeLog4
-rw-r--r--nextstep/INSTALL21
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/config.nt9
-rw-r--r--src/ChangeLog49
-rw-r--r--src/bidi.c44
-rw-r--r--src/dispextern.h3
-rw-r--r--src/editfns.c91
-rw-r--r--src/systime.h11
-rw-r--r--src/xdisp.c90
-rw-r--r--test/ChangeLog6
-rw-r--r--test/automated/vc-bzr.el101
174 files changed, 2850 insertions, 2162 deletions
diff --git a/ChangeLog b/ChangeLog
index 6147b1131fe..ade71ae09a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
12011-10-24 Paul Eggert <eggert@cs.ucla.edu>
2
3 * configure.in (LIB_PTHREAD): Prepend -lpthread to LIBS (Bug#9852)
4 if the library is found. Otherwise, later configure-time tests,
5 such as the test for pthread_sigmask, generate the wrong results
6 on some platforms. Problem reported for FreeBSD by Nali Toja.
7
82011-10-20 Paul Eggert <eggert@cs.ucla.edu>
9
10 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11 * configure.in (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, HAVE_TM_GMTOFF):
12 Remove; no longer needed, now that we defer to strftime for time
13 zone names.
14
12011-10-18 Jan Djärv <jan.h.d@swipnet.se> 152011-10-18 Jan Djärv <jan.h.d@swipnet.se>
2 16
3 * configure.in (GLIB_REQUIRED, GTK_REQUIRED): Set to 2.10 (Bug#9786). 17 * configure.in (GLIB_REQUIRED, GTK_REQUIRED): Set to 2.10 (Bug#9786).
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 26e3de63808..01d488c97e3 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -151,9 +151,9 @@ TUTORIAL.zh
151abbrevs.texi 151abbrevs.texi
152ack.texi 152ack.texi
153anti.texi 153anti.texi
154arevert-xtra.texi 154arevert-xtra.texi cyd
155basic.texi cyd 155basic.texi cyd
156buffers.texi 156buffers.texi cyd
157building.texi 157building.texi
158calendar.texi 158calendar.texi
159cal-xtra.texi 159cal-xtra.texi
@@ -162,12 +162,12 @@ commands.texi cyd
162custom.texi 162custom.texi
163dired.texi 163dired.texi
164dired-xtra.texi 164dired-xtra.texi
165display.texi 165display.texi cyd
166emacs.texi 166emacs.texi
167emacs-xtra.texi 167emacs-xtra.texi
168emerge-xtra.texi 168emerge-xtra.texi
169entering.texi cyd 169entering.texi cyd
170files.texi 170files.texi cyd
171fixit.texi 171fixit.texi
172fortran-xtra.texi 172fortran-xtra.texi
173frames.texi 173frames.texi
@@ -175,7 +175,7 @@ glossary.texi
175help.texi cyd 175help.texi cyd
176indent.texi 176indent.texi
177killing.texi cyd 177killing.texi cyd
178kmacro.texi 178kmacro.texi cyd
179macos.texi 179macos.texi
180maintaining.texi 180maintaining.texi
181major.texi 181major.texi
@@ -191,7 +191,7 @@ programs.texi
191regs.texi cyd 191regs.texi cyd
192rmail.texi 192rmail.texi
193screen.texi cyd 193screen.texi cyd
194search.texi 194search.texi cyd
195sending.texi 195sending.texi
196text.texi 196text.texi
197trouble.texi 197trouble.texi
diff --git a/autogen/configure b/autogen/configure
index 5e9c365c9ab..cd68832a547 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -8949,116 +8949,6 @@ done
8949 8949
8950>>>>>>> MERGE-SOURCE 8950>>>>>>> MERGE-SOURCE
8951 8951
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
8953$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
8954if test "${ac_cv_struct_tm+set}" = set; then :
8955 $as_echo_n "(cached) " >&6
8956else
8957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958/* end confdefs.h. */
8959#include <sys/types.h>
8960#include <time.h>
8961
8962int
8963main ()
8964{
8965struct tm tm;
8966 int *p = &tm.tm_sec;
8967 return !p;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972if ac_fn_c_try_compile "$LINENO"; then :
8973 ac_cv_struct_tm=time.h
8974else
8975 ac_cv_struct_tm=sys/time.h
8976fi
8977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8978fi
8979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
8980$as_echo "$ac_cv_struct_tm" >&6; }
8981if test $ac_cv_struct_tm = sys/time.h; then
8982
8983$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
8984
8985fi
8986
8987ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
8988#include <$ac_cv_struct_tm>
8989
8990"
8991if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
8992
8993cat >>confdefs.h <<_ACEOF
8994#define HAVE_STRUCT_TM_TM_ZONE 1
8995_ACEOF
8996
8997
8998fi
8999
9000if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
9001
9002$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
9003
9004else
9005 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
9006"
9007if test "x$ac_cv_have_decl_tzname" = x""yes; then :
9008 ac_have_decl=1
9009else
9010 ac_have_decl=0
9011fi
9012
9013cat >>confdefs.h <<_ACEOF
9014#define HAVE_DECL_TZNAME $ac_have_decl
9015_ACEOF
9016
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
9018$as_echo_n "checking for tzname... " >&6; }
9019if test "${ac_cv_var_tzname+set}" = set; then :
9020 $as_echo_n "(cached) " >&6
9021else
9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023/* end confdefs.h. */
9024#include <time.h>
9025#if !HAVE_DECL_TZNAME
9026extern char *tzname[];
9027#endif
9028
9029int
9030main ()
9031{
9032return tzname[0][0];
9033 ;
9034 return 0;
9035}
9036_ACEOF
9037if ac_fn_c_try_link "$LINENO"; then :
9038 ac_cv_var_tzname=yes
9039else
9040 ac_cv_var_tzname=no
9041fi
9042rm -f core conftest.err conftest.$ac_objext \
9043 conftest$ac_exeext conftest.$ac_ext
9044fi
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
9046$as_echo "$ac_cv_var_tzname" >&6; }
9047 if test $ac_cv_var_tzname = yes; then
9048
9049$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
9050
9051 fi
9052fi
9053
9054ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
9055"
9056if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
9057
9058$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
9059
9060fi
9061
9062ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default 8952ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9063#if HAVE_SYS_SOCKET_H 8953#if HAVE_SYS_SOCKET_H
9064#include <sys/socket.h> 8954#include <sys/socket.h>
@@ -11289,8 +11179,8 @@ fi
11289if test "$pkg_check_gtk" != "yes"; then 11179if test "$pkg_check_gtk" != "yes"; then
11290 HAVE_GTK=no 11180 HAVE_GTK=no
11291if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then 11181if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11292 GLIB_REQUIRED=2.6 11182 GLIB_REQUIRED=2.10
11293 GTK_REQUIRED=2.6 11183 GTK_REQUIRED=2.10
11294 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 11184 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11295 11185
11296 11186
@@ -18992,6 +18882,108 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
18992 REPLACE_VSNPRINTF=0; 18882 REPLACE_VSNPRINTF=0;
18993 REPLACE_VSPRINTF=0; 18883 REPLACE_VSPRINTF=0;
18994 18884
18885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
18886$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
18887if test "${ac_cv_struct_tm+set}" = set; then :
18888 $as_echo_n "(cached) " >&6
18889else
18890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18891/* end confdefs.h. */
18892#include <sys/types.h>
18893#include <time.h>
18894
18895int
18896main ()
18897{
18898struct tm tm;
18899 int *p = &tm.tm_sec;
18900 return !p;
18901 ;
18902 return 0;
18903}
18904_ACEOF
18905if ac_fn_c_try_compile "$LINENO"; then :
18906 ac_cv_struct_tm=time.h
18907else
18908 ac_cv_struct_tm=sys/time.h
18909fi
18910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18911fi
18912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
18913$as_echo "$ac_cv_struct_tm" >&6; }
18914if test $ac_cv_struct_tm = sys/time.h; then
18915
18916$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
18917
18918fi
18919
18920ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
18921#include <$ac_cv_struct_tm>
18922
18923"
18924if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
18925
18926cat >>confdefs.h <<_ACEOF
18927#define HAVE_STRUCT_TM_TM_ZONE 1
18928_ACEOF
18929
18930
18931fi
18932
18933if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18934
18935$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
18936
18937else
18938 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
18939"
18940if test "x$ac_cv_have_decl_tzname" = x""yes; then :
18941 ac_have_decl=1
18942else
18943 ac_have_decl=0
18944fi
18945
18946cat >>confdefs.h <<_ACEOF
18947#define HAVE_DECL_TZNAME $ac_have_decl
18948_ACEOF
18949
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
18951$as_echo_n "checking for tzname... " >&6; }
18952if test "${ac_cv_var_tzname+set}" = set; then :
18953 $as_echo_n "(cached) " >&6
18954else
18955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18956/* end confdefs.h. */
18957#include <time.h>
18958#if !HAVE_DECL_TZNAME
18959extern char *tzname[];
18960#endif
18961
18962int
18963main ()
18964{
18965return tzname[0][0];
18966 ;
18967 return 0;
18968}
18969_ACEOF
18970if ac_fn_c_try_link "$LINENO"; then :
18971 ac_cv_var_tzname=yes
18972else
18973 ac_cv_var_tzname=no
18974fi
18975rm -f core conftest.err conftest.$ac_objext \
18976 conftest$ac_exeext conftest.$ac_ext
18977fi
18978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
18979$as_echo "$ac_cv_var_tzname" >&6; }
18980 if test $ac_cv_var_tzname = yes; then
18981
18982$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
18983
18984 fi
18985fi
18986
18995 18987
18996 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> 18988 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
18997" 18989"
diff --git a/configure.in b/configure.in
index bcd2d674863..fcf569b5ef2 100644
--- a/configure.in
+++ b/configure.in
@@ -1317,12 +1317,6 @@ AC_CHECK_HEADERS(net/if_dl.h, , , [AC_INCLUDES_DEFAULT
1317AC_CHECK_FUNCS(getifaddrs freeifaddrs) 1317AC_CHECK_FUNCS(getifaddrs freeifaddrs)
1318 1318
1319dnl checks for structure members 1319dnl checks for structure members
1320AC_STRUCT_TM
1321AC_STRUCT_TIMEZONE
1322AC_CHECK_MEMBER(struct tm.tm_gmtoff,
1323 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
1324 [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],,
1325 [#include <time.h>])
1326AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, 1320AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
1327 struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr, 1321 struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
1328 struct ifreq.ifr_addr, 1322 struct ifreq.ifr_addr,
@@ -1731,7 +1725,8 @@ fi
1731if test "$HAVE_PTHREAD" = yes; then 1725if test "$HAVE_PTHREAD" = yes; then
1732 case "${canonical}" in 1726 case "${canonical}" in
1733 *-hpux*) ;; 1727 *-hpux*) ;;
1734 *) LIB_PTHREAD="-lpthread" ;; 1728 *) LIB_PTHREAD="-lpthread"
1729 LIBS="$LIB_PTHREAD $LIBS" ;;
1735 esac 1730 esac
1736 AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).]) 1731 AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).])
1737fi 1732fi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 15b84c27075..a1310e87b15 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,76 @@
12011-10-24 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Scrolling): Document scroll-up-line and
4 scroll-down-line. Document scroll-command property.
5 (Recentering): New node, split off from Scrolling.
6
72011-10-23 Chong Yidong <cyd@gnu.org>
8
9 * frames.texi (Scroll Bars): GTK uses right scroll bars now.
10 (Tool Bars): Copyedits.
11
12 * buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only.
13
142011-10-22 Chong Yidong <cyd@gnu.org>
15
16 * windows.texi (Displaying Buffers): Fix broken lispref link.
17
182011-10-22 Chong Yidong <cyd@gnu.org>
19
20 * mini.texi (Minibuffer Exit): Rename from Strict Completion.
21 Move confirm-nonexistent-file-or-buffer discussion here.
22
23 * files.texi (File Names, Visiting): Move detailed discussion of
24 minibuffer confirmation to Minibuffer Exit.
25
26 * buffers.texi (Buffers): Tweak mention of mail buffer name.
27 (Select Buffer): Move confirmation discussion to Minibuffer Exit.
28
292011-10-21 Chong Yidong <cyd@gnu.org>
30
31 * files.texi (File Names, Visiting, Interlocking): Copyedits.
32 (Backup Copying): backup-by-copying-when-mismatch is now t.
33 (Customize Save): Fix description of require-final-newline.
34 (Reverting): Note that revert-buffer can't be undone. Mention VC.
35 (Auto Save Control): Clarify.
36 (File Archives): Add 7z.
37 (Remote Files): ange-ftp-make-backup-files defaults to nil.
38
39 * arevert-xtra.texi (Autorevert): Copyedits.
40
412011-10-20 Chong Yidong <cyd@gnu.org>
42
43 * custom.texi (Hooks, Init Examples):
44 * display.texi (Font Lock):
45 * fixit.texi (Spelling):
46 * rmail.texi (Rmail Display): Minor mode function with no arg now
47 enables it.
48
49 * fixit.texi (Spelling): Fix description of inline completion.
50
512011-10-19 Chong Yidong <cyd@gnu.org>
52
53 * search.texi (Repeat Isearch, Error in Isearch): Add kindex
54 entries.
55 (Isearch Yank): Document isearch-yank-pop.
56 (Isearch Scroll): Refer to C-l instead of unbound `recenter'.
57 (Other Repeating Search): Document Occur Edit mode.
58
592011-10-18 Chong Yidong <cyd@gnu.org>
60
61 * display.texi (Fringes): Move overflow-newline-into-fringe here,
62 from Line Truncation node.
63 (Standard Faces): Note that only the background of the cursor face
64 has an effect.
65 (Cursor Display): Fix descriptions of cursor face
66 and bar cursor blinking.
67 (Text Display): Document nobreak-char-display more clearly.
68 (Line Truncation): Add xref to Split Window node.
69 (Display Custom): Don't bother documenting baud-rate or
70 no-redraw-on-reenter.
71
72 * search.texi (Slow Isearch): Node removed.
73
12011-10-18 Glenn Morris <rgm@gnu.org> 742011-10-18 Glenn Morris <rgm@gnu.org>
2 75
3 * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745) 76 * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745)
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 374886cd956..6a24646b5f7 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -8,11 +8,11 @@
8@section Auto Reverting Non-File Buffers 8@section Auto Reverting Non-File Buffers
9 9
10Global Auto Revert Mode normally only reverts file buffers. There are 10Global Auto Revert Mode normally only reverts file buffers. There are
11two ways to auto-revert certain non-file buffers: enabling Auto Revert 11two ways to auto-revert certain non-file buffers: by enabling Auto
12Mode in those buffers (using @kbd{M-x auto-revert-mode}); and setting 12Revert Mode in those buffers (using @kbd{M-x auto-revert-mode}); and
13@code{global-auto-revert-non-file-buffers} non-@code{nil}. The latter 13by setting @code{global-auto-revert-non-file-buffers} to a
14enables Auto Reverting for all types of buffers for which it is 14non-@code{nil} value. The latter enables Auto Reverting for all types
15implemented (listed in the menu below). 15of buffers for which it is implemented (listed in the menu below).
16 16
17Like file buffers, non-file buffers should normally not revert while 17Like file buffers, non-file buffers should normally not revert while
18you are working on them, or while they contain information that might 18you are working on them, or while they contain information that might
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 714e03720bc..abb65982873 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -367,7 +367,7 @@ the preceding newline, joining this line to the previous one.
367 If, however, the region is active, @kbd{@key{DEL}} instead deletes 367 If, however, the region is active, @kbd{@key{DEL}} instead deletes
368the text in the region. @xref{Mark}, for a description of the region. 368the text in the region. @xref{Mark}, for a description of the region.
369 369
370 On most keyboards, @key{DEL} is labelled @key{Backspace}, but we 370 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we
371refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} 371refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL}
372with the @key{Delete} key; we will discuss @key{Delete} momentarily.) 372with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
373On some text-only terminals, Emacs may not recognize the @key{DEL} key 373On some text-only terminals, Emacs may not recognize the @key{DEL} key
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index b82f3fac7d4..302693aecef 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -7,11 +7,11 @@
7 7
8@cindex buffers 8@cindex buffers
9 The text you are editing in Emacs resides in an object called a 9 The text you are editing in Emacs resides in an object called a
10@dfn{buffer}. Each time you visit a file, a buffer is created to hold the 10@dfn{buffer}. Each time you visit a file, a buffer is used to hold
11file's text. Each time you invoke Dired, a buffer is created to hold the 11the file's text. Each time you invoke Dired, a buffer is used to hold
12directory listing. If you send a message with @kbd{C-x m}, a buffer named 12the directory listing. If you send a message with @kbd{C-x m}, a
13@samp{*mail*} is used to hold the text of the message. When you ask for a 13buffer is used to hold the text of the message. When you ask for a
14command's documentation, that appears in a buffer called @samp{*Help*}. 14command's documentation, that appears in a buffer named @samp{*Help*}.
15 15
16 Each buffer has a unique name, which can be of any length. When a 16 Each buffer has a unique name, which can be of any length. When a
17buffer is displayed in a window, its name is shown in the mode line 17buffer is displayed in a window, its name is shown in the mode line
@@ -19,35 +19,34 @@ buffer is displayed in a window, its name is shown in the mode line
19matters in buffer names. Most buffers are made by visiting files, and 19matters in buffer names. Most buffers are made by visiting files, and
20their names are derived from the files' names; however, you can also 20their names are derived from the files' names; however, you can also
21create an empty buffer with any name you want. A newly started Emacs 21create an empty buffer with any name you want. A newly started Emacs
22has a buffer named @samp{*scratch*}, which is not associated with any 22has several buffers, including one named @samp{*scratch*}, which can
23file and can be used for evaluating Lisp expressions in Emacs 23be used for evaluating Lisp expressions and is not associated with any
24(@pxref{Lisp Interaction}). 24file (@pxref{Lisp Interaction}).
25 25
26@cindex selected buffer 26@cindex selected buffer
27@cindex current buffer 27@cindex current buffer
28 At any time, one and only one buffer is @dfn{current}. This is also 28 At any time, one and only one buffer is @dfn{selected}; we call it
29called the @dfn{selected buffer}. We often say that a command 29the @dfn{current buffer}. We sometimes say that a command operates on
30operates on ``the buffer''; this really means that the command 30``the buffer''; this really means that it operates on the current
31operates on the current buffer (most commands do). When there is only 31buffer. When there is only one Emacs window, the buffer displayed in
32one Emacs window, the buffer displayed in that window is current. 32that window is current. When there are multiple windows, the buffer
33When there are multiple windows present, the buffer displayed in the 33displayed in the @dfn{selected window} is current. @xref{Windows}.
34@dfn{selected window} is current. @xref{Windows}. 34
35 35 Aside from its textual contents, each buffer records several pieces
36 Each buffer records individually what file it is visiting (if any), 36of information, such as what file it is visiting (if any), whether it
37whether it is modified, and what major mode and minor modes are in 37is modified, and what major mode and minor modes are in effect
38effect (@pxref{Major Modes}). Any Emacs variable can be made 38(@pxref{Modes}). These are stored in @dfn{buffer-local
39@dfn{local to} a particular buffer, meaning its value in that buffer 39variables}---variables that can have a different value in each buffer.
40can be different from the value in other buffers. @xref{Locals}. 40@xref{Locals}.
41 41
42@cindex buffer size, maximum 42@cindex buffer size, maximum
43 A buffer's size cannot be larger than some maximum, which is defined 43 A buffer's size cannot be larger than some maximum, which is defined
44by the largest buffer position representable by the @dfn{Emacs 44by the largest buffer position representable by @dfn{Emacs integers}.
45integer} data type. This is because Emacs tracks buffer positions 45This is because Emacs tracks buffer positions using that data type.
46using that data type. For typical 64-bit machines, the maximum buffer size 46For typical 64-bit machines, this maximum buffer size is @math{2^61 -
47enforced by the data types is @math{2^61 - 2} bytes, or about 2 EiB. 472} bytes, or about 2 EiB. For typical 32-bit machines, the maximum is
48For typical 32-bit machines, the maximum is @math{2^29 - 2} bytes, or 48usually @math{2^29 - 2} bytes, or about 512 MiB. Buffer sizes are
49about 512 MiB. Buffer sizes are also limited by the size of Emacs's 49also limited by the amount of memory present in the system.
50virtual memory.
51 50
52@menu 51@menu
53* Select Buffer:: Creating a new buffer or reselecting an old one. 52* Select Buffer:: Creating a new buffer or reselecting an old one.
@@ -76,9 +75,9 @@ Similar, but select @var{buffer} in another window
76Similar, but select @var{buffer} in a separate frame 75Similar, but select @var{buffer} in a separate frame
77(@code{switch-to-buffer-other-frame}). 76(@code{switch-to-buffer-other-frame}).
78@item C-x @key{LEFT} 77@item C-x @key{LEFT}
79Select the previous buffer in the list of existing buffers. 78Select the previous buffer in the buffer list (@code{previous-buffer}).
80@item C-x @key{RIGHT} 79@item C-x @key{RIGHT}
81Select the next buffer in the list of existing buffers. 80Select the next buffer in the buffer list (@code{next-buffer}).
82@item C-u M-g M-g 81@item C-u M-g M-g
83@itemx C-u M-g g 82@itemx C-u M-g g
84Read a number @var{n} and move to line @var{n} in the most recently 83Read a number @var{n} and move to line @var{n} in the most recently
@@ -87,28 +86,21 @@ selected buffer other than the current buffer.
87 86
88@kindex C-x b 87@kindex C-x b
89@findex switch-to-buffer 88@findex switch-to-buffer
90 To select the buffer named @var{bufname}, type @kbd{C-x b 89 The @kbd{C-x b} (@code{switch-to-buffer}) command reads a buffer
91@var{bufname} @key{RET}}. This runs the command 90name using the minibuffer. Then it makes that buffer current, and
92@code{switch-to-buffer} with argument @var{bufname}. While entering 91displays it in the currently-selected window. An empty input
93the buffer name, you can use the usual minibuffer completion and 92specifies the buffer that was current most recently among those not
94history commands (@pxref{Minibuffer}). An empty input specifies the 93now displayed in any window. If you specify a buffer that does not
95buffer that was current most recently among those not now displayed in 94exist, @kbd{C-x b} creates a new, empty buffer that is not visiting
96any window. 95any file, and selects it for editing.
97 96
98@cindex minibuffer confirmation 97 While entering the buffer name, you can use the usual completion and
99@cindex confirming in the minibuffer 98history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and
100 If you specify a buffer that does not exist, @kbd{C-x b} creates a 99related commands, use ``permissive completion with confirmation'' for
101new, empty buffer that is not visiting any file, and selects it for 100minibuffer completion: if you type @key{RET} immediately after
102editing. First, however, Emacs might prompt you for confirmation, in 101completing up to a nonexistent buffer name, Emacs prints
103case you entered the wrong buffer name. Emacs asks for confirmation 102@samp{[Confirm]} and you must type a second @key{RET} to submit that
104only if the last key you typed, before submitting the minibuffer input 103buffer name. @xref{Completion Exit}, for details.
105with @key{RET}, was @key{TAB} (@code{minibuffer-complete}). This
106catches a common mistake, in which one types @key{RET} before
107realizing that @key{TAB} did not complete far enough to yield the
108desired buffer name (@pxref{Completion}). Emacs asks for confirmation
109by putting the message @samp{[Confirm]} in the minibuffer; type
110@key{RET} again to confirm and visit the buffer. @xref{Visiting}, for
111information about modifying this behavior.
112 104
113 One reason to create a new buffer is to use it for making temporary 105 One reason to create a new buffer is to use it for making temporary
114notes. If you try to save it, Emacs asks for the file name to use. 106notes. If you try to save it, Emacs asks for the file name to use.
@@ -237,15 +229,11 @@ have special commands to operate on the text; also by visiting a file
237whose access control says you cannot write it. 229whose access control says you cannot write it.
238 230
239@findex toggle-read-only 231@findex toggle-read-only
240 If you wish to make changes in a read-only buffer, use the command 232 The command @kbd{C-x C-q} (@code{toggle-read-only}) makes a read-only
241@kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer 233buffer writable, and makes a writable buffer read-only. This works by
242writable, and makes a writable buffer read-only. This 234setting the variable @code{buffer-read-only}, which has a local value
243works by setting the variable @code{buffer-read-only}, which has a local 235in each buffer and makes the buffer read-only if its value is
244value in each buffer and makes the buffer read-only if its value is 236non-@code{nil}.
245non-@code{nil}. If you have files under version control, you may find
246it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only}
247instead. This will guard you against an operation that will confuse
248most modern version-conmtrol systems. @xref{Version Control}.
249 237
250@findex rename-buffer 238@findex rename-buffer
251 @kbd{M-x rename-buffer} changes the name of the current buffer. You 239 @kbd{M-x rename-buffer} changes the name of the current buffer. You
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 71a2dba7d08..4a09d6e3d9c 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -893,11 +893,12 @@ Move to a date specified in the Ethiopic calendar
893(@code{calendar-ethiopic-goto-date}). 893(@code{calendar-ethiopic-goto-date}).
894@end table 894@end table
895 895
896 These commands ask you for a date on the other calendar, move point to 896 These commands ask you for a date on the other calendar, move point
897the Gregorian calendar date equivalent to that date, and display the 897to the Gregorian calendar date equivalent to that date, and display
898other calendar's date in the echo area. Emacs uses strict completion 898the other calendar's date in the echo area. Emacs uses strict
899(@pxref{Strict Completion}) whenever it asks you to type a month name, so you 899completion (@pxref{Completion Exit}) whenever it asks you to type a
900don't have to worry about the spelling of Hebrew, Islamic, or French names. 900month name, so you don't have to worry about the spelling of Hebrew,
901Islamic, or French names.
901 902
902@c FIXME move? 903@c FIXME move?
903@findex calendar-hebrew-list-yahrzeits 904@findex calendar-hebrew-list-yahrzeits
@@ -993,7 +994,7 @@ occurrence of that combination. Use @kbd{g m n c} to move point to the
993next occurrence of a combination. These commands signal an error if the 994next occurrence of a combination. These commands signal an error if the
994haab/tzolkin date combination you have typed is impossible. 995haab/tzolkin date combination you have typed is impossible.
995 996
996 Emacs uses strict completion (@pxref{Strict Completion}) whenever it 997 Emacs uses strict completion (@pxref{Completion Exit}) whenever it
997asks you to type a Mayan name, so you don't have to worry about 998asks you to type a Mayan name, so you don't have to worry about
998spelling. 999spelling.
999 1000
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index de6e7539c27..817cfc369d1 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -46,7 +46,7 @@ are certain characters found on non-English keyboards
46@cindex M- 46@cindex M-
47 Emacs also recognizes control characters that are entered using 47 Emacs also recognizes control characters that are entered using
48@dfn{modifier keys}. Two commonly-used modifier keys are 48@dfn{modifier keys}. Two commonly-used modifier keys are
49@key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually 49@key{Control} (usually labeled @key{Ctrl}), and @key{Meta} (usually
50labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for 50labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for
51historical reasons.}. For example, @kbd{Control-a} is entered by 51historical reasons.}. For example, @kbd{Control-a} is entered by
52holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer 52holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 6af77374d07..d87c22ec28e 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -770,7 +770,7 @@ here's how to set up a hook to turn on Auto Fill mode when entering
770Text mode and other modes based on Text mode: 770Text mode and other modes based on Text mode:
771 771
772@example 772@example
773(add-hook 'text-mode-hook 'turn-on-auto-fill) 773(add-hook 'text-mode-hook 'auto-fill-mode)
774@end example 774@end example
775 775
776 Here is another example, showing how to use a hook to customize the 776 Here is another example, showing how to use a hook to customize the
@@ -2174,8 +2174,7 @@ Turn off Line Number mode, a global minor mode.
2174Turn on Auto Fill mode automatically in Text mode and related modes. 2174Turn on Auto Fill mode automatically in Text mode and related modes.
2175 2175
2176@example 2176@example
2177(add-hook 'text-mode-hook 2177(add-hook 'text-mode-hook 'auto-fill-mode)
2178 '(lambda () (auto-fill-mode 1)))
2179@end example 2178@end example
2180 2179
2181This shows how to add a hook function to a normal hook variable 2180This shows how to add a hook function to a normal hook variable
@@ -2183,19 +2182,9 @@ This shows how to add a hook function to a normal hook variable
2183@code{lambda}, with a single-quote in front of it to make it a list 2182@code{lambda}, with a single-quote in front of it to make it a list
2184constant rather than an expression. 2183constant rather than an expression.
2185 2184
2186It's beyond the scope of this manual to explain Lisp functions, but for 2185It's beyond the scope of this manual to explain Lisp functions, but
2187this example it is enough to know that the effect is to execute 2186for this example it is enough to know that the effect is to execute
2188@code{(auto-fill-mode 1)} when Text mode is entered. You can replace 2187the @code{auto-fill-mode} function when Text mode is entered.
2189that with any other expression that you like, or with several
2190expressions in a row.
2191
2192Emacs comes with a function named @code{turn-on-auto-fill} whose
2193definition is @code{(lambda () (auto-fill-mode 1))}. Thus, a simpler
2194way to write the above example is as follows:
2195
2196@example
2197(add-hook 'text-mode-hook 'turn-on-auto-fill)
2198@end example
2199 2188
2200@item 2189@item
2201Load the installed Lisp library named @file{foo} (actually a file 2190Load the installed Lisp library named @file{foo} (actually a file
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 68b2209ffba..8995b1242b1 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -13,6 +13,7 @@ the text is displayed.
13 13
14@menu 14@menu
15* Scrolling:: Commands to move text up and down in a window. 15* Scrolling:: Commands to move text up and down in a window.
16* Recentering:: A scroll command that centers the current line.
16* Auto Scrolling:: Redisplay scrolls text automatically when needed. 17* Auto Scrolling:: Redisplay scrolls text automatically when needed.
17* Horizontal Scrolling:: Moving text left and right in a window. 18* Horizontal Scrolling:: Moving text left and right in a window.
18* Narrowing:: Restricting display and editing to a portion 19* Narrowing:: Restricting display and editing to a portion
@@ -48,15 +49,15 @@ portion of the buffer is displayed.
48 Scrolling ``forward'' or ``up'' advances the portion of the buffer 49 Scrolling ``forward'' or ``up'' advances the portion of the buffer
49displayed in the window; equivalently, it moves the buffer text 50displayed in the window; equivalently, it moves the buffer text
50upwards relative to the window. Scrolling ``backward'' or ``down'' 51upwards relative to the window. Scrolling ``backward'' or ``down''
51moves the displayed portion backwards, and moves the text downwards 52displays an earlier portion of the buffer, and moves the text
52relative to the window. In Emacs, scrolling ``up'' or ``down'' refers 53downwards relative to the window.
53to the direction that the text moves in the window, @emph{not} the 54
54direction that the window moves relative to the text; this terminology 55 In Emacs, scrolling ``up'' or ``down'' refers to the direction that
55was taken up by Emacs before the modern meaning of ``scrolling up'' 56the text moves in the window, @emph{not} the direction that the window
56and ``scrolling down'' became widely adopted. Hence the strange 57moves relative to the text. This terminology was adopted by Emacs
57result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this 58before the modern meaning of ``scrolling up'' and ``scrolling down''
58manual, we refer to scrolling ``forward'' and ``backward'' where 59became widespread. Hence, the strange result that @key{PageDown}
59possible, in order to minimize confusion. 60scrolls ``up'' in the Emacs sense.
60 61
61 The portion of a buffer displayed in a window always contains point. 62 The portion of a buffer displayed in a window always contains point.
62If you move point past the bottom or top of the window, scrolling 63If you move point past the bottom or top of the window, scrolling
@@ -64,11 +65,6 @@ occurs automatically to bring it back onscreen (@pxref{Auto
64Scrolling}). You can also scroll explicitly with these commands: 65Scrolling}). You can also scroll explicitly with these commands:
65 66
66@table @kbd 67@table @kbd
67@item C-l
68Scroll the selected window so that the current line is the center-most
69text line; on subsequent consecutive invocations, make the current
70line the top-most line, the bottom-most line, and so on in cyclic
71order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
72@item C-v 68@item C-v
73@itemx @key{next} 69@itemx @key{next}
74@itemx @key{PageDown} 70@itemx @key{PageDown}
@@ -77,6 +73,86 @@ Scroll forward by nearly a full window (@code{scroll-up-command}).
77@itemx @key{prior} 73@itemx @key{prior}
78@itemx @key{PageUp} 74@itemx @key{PageUp}
79Scroll backward (@code{scroll-down-command}). 75Scroll backward (@code{scroll-down-command}).
76@end table
77
78@kindex C-v
79@kindex M-v
80@kindex next
81@kindex prior
82@kindex PageDown
83@kindex PageUp
84@findex scroll-up-command
85@findex scroll-down-command
86 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
87whole window height. The effect is to take the two lines at the
88bottom of the window and put them at the top, followed by lines that
89were not previously visible. If point was in the text that scrolled
90off the top, it ends up on the window's new topmost line. The
91@key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}.
92
93 @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar
94way. The @key{prior} (or @key{PageUp}) key is equivalent to
95@kbd{M-v}.
96
97@vindex next-screen-context-lines
98 The number of lines of overlap left by these scroll commands is
99controlled by the variable @code{next-screen-context-lines}, whose
100default value is 2. You can supply the commands with a numeric prefix
101argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave
102point unchanged, so that the text and point move up or down together.
103@kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa.
104
105@vindex scroll-error-top-bottom
106 By default, these commands signal an error (by beeping or flashing
107the screen) if no more scrolling is possible, because the window has
108reached the beginning or end of the buffer. If you change the
109variable @code{scroll-error-top-bottom} to @code{t}, the command moves
110point to the farthest possible position. If point is already there,
111the command signals an error.
112
113@vindex scroll-preserve-screen-position
114@cindex @code{scroll-command} property
115 Some users like scroll commands to keep point at the same screen
116position, so that scrolling back to the same screen conveniently
117returns point to its original position. You can enable this behavior
118via the variable @code{scroll-preserve-screen-position}. If the value
119is @code{t}, Emacs adjusts point to keep the cursor at the same screen
120position whenever a scroll command moves it off-window, rather than
121moving it to the topmost or bottommost line. With any other
122non-@code{nil} value, Emacs adjusts point this way even if the scroll
123command leaves point in the window. This variable affects all the
124scroll commands documented in this section, as well as scrolling with
125the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any
126command that has a non-@code{nil} @code{scroll-command} property.
127@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
128
129@vindex scroll-up
130@vindex scroll-down
131@findex scroll-up-line
132@findex scroll-down-line
133 The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave
134similarly to @code{scroll-up-command} and @code{scroll-down-command},
135except they do not obey @code{scroll-error-top-bottom}. Prior to
136Emacs 24, these were the default commands for scrolling up and down.
137The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line}
138scroll the current window by one line at a time. If you intend to use
139any of these commands, you might want to give them key bindings
140(@pxref{Init Rebinding}).
141
142@node Recentering
143@section Recentering
144
145@table @kbd
146@item C-l
147Scroll the selected window so the current line is the center-most text
148line; on subsequent consecutive invocations, make the current line the
149top line, the bottom line, and so on in cyclic order. Possibly
150redisplay the screen too (@code{recenter-top-bottom}).
151
152@item M-x recenter
153Scroll the selected window so the current line is the center-most text
154line. Possibly redisplay the screen too.
155
80@item C-M-l 156@item C-M-l
81Scroll heuristically to bring useful information onto the screen 157Scroll heuristically to bring useful information onto the screen
82(@code{reposition-window}). 158(@code{reposition-window}).
@@ -107,14 +183,13 @@ non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
107screen lines between point and the top or bottom of the window 183screen lines between point and the top or bottom of the window
108(@pxref{Auto Scrolling}). 184(@pxref{Auto Scrolling}).
109 185
110 You can also supply @kbd{C-l} with a prefix argument. With a plain 186 You can also give @kbd{C-l} a prefix argument. A plain prefix
111prefix argument, @kbd{C-u C-l}, Emacs simply recenters point. With a 187argument, @kbd{C-u C-l}, simply recenters point. A positive argument
112positive argument @var{n}, it scrolls to place point @var{n} lines 188@var{n} puts point @var{n} lines down from the top of the window. An
113down from the top of the window. An argument of zero puts point on 189argument of zero puts point on the topmost line. A negative argument
114the topmost line. A negative argument @var{-n} puts point @var{n} 190@var{-n} puts point @var{n} lines from the bottom of the window. When
115lines from the bottom of the window. When given an argument, 191given an argument, @kbd{C-l} does not clear the screen or cycle
116@kbd{C-l} does not clear the screen or cycle through different screen 192through different screen positions.
117positions.
118 193
119@vindex recenter-redisplay 194@vindex recenter-redisplay
120 If the variable @code{recenter-redisplay} has a non-@code{nil} 195 If the variable @code{recenter-redisplay} has a non-@code{nil}
@@ -127,62 +202,6 @@ becomes garbled for any reason (@pxref{Screen Garbled}).
127 The more primitive command @kbd{M-x recenter} behaves like 202 The more primitive command @kbd{M-x recenter} behaves like
128@code{recenter-top-bottom}, but does not cycle among screen positions. 203@code{recenter-top-bottom}, but does not cycle among screen positions.
129 204
130@kindex C-v
131@kindex M-v
132@kindex next
133@kindex prior
134@kindex PageDown
135@kindex PageUp
136@findex scroll-up-command
137@findex scroll-down-command
138 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
139whole window height. The effect is to take the two lines at the
140bottom of the window and put them at the top, followed by lines that
141were not previously visible. If point was in the text that scrolled
142off the top, it ends up on the window's new topmost line.
143
144 Similarly, @kbd{M-v} (@code{scroll-down-command}) scrolls backward.
145
146 We refer to @kbd{C-v} and @kbd{M-v} as @dfn{full-screen scroll
147commands}. The function key @key{next}, or @key{PageDown}, is
148equivalent to @kbd{C-v}; the function key @key{prior}, or
149@key{PageUp}, is equivalent to @kbd{M-v}.
150
151@vindex next-screen-context-lines
152 The variable @code{next-screen-context-lines} controls the number of
153lines of overlap left by the full-screen scroll commands; by default,
154it is 2. You can supply these commands with a numeric prefix argument
155@var{n}. This scrolls the window by @var{n} lines, while attempting
156to leave point unchanged (so that the text and point move up or down
157together). @kbd{C-v} with a negative argument is like @kbd{M-v} and
158vice versa.
159
160@vindex scroll-error-top-bottom
161 By default, the full-screen scroll commands signal an error (by
162beeping or flashing the screen) if no more scrolling is possible,
163because the window has reached the beginning or end of the buffer. If
164you change the variable @code{scroll-error-top-bottom} to @code{t},
165Emacs instead moves point to the farthest possible position. If point
166is already there, the command signals an error.
167
168@vindex scroll-preserve-screen-position
169 Some users like scroll commands to keep point at the same screen
170position. Then, scrolling back to the same screen also conveniently
171returns point to its original position. You can enable this via the
172variable @code{scroll-preserve-screen-position}. If the value is
173@code{t}, Emacs adjusts point to keep it at the same vertical position
174within the window, rather than the window edge, whenever a scroll
175command moves it off the window. With any other non-@code{nil} value,
176Emacs adjusts point this way even if the scroll command leaves point
177in the window.
178
179@vindex scroll-up
180@vindex scroll-down
181 The commands @code{scroll-up} and @code{scroll-down} behave
182similarly to @code{scroll-up-command} and @code{scroll-down-command},
183except they do not obey @code{scroll-error-top-bottom}. Prior to
184Emacs 24, these were the default commands for scrolling up and down.
185
186@kindex C-M-l 205@kindex C-M-l
187@findex reposition-window 206@findex reposition-window
188 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window 207 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window
@@ -554,7 +573,7 @@ Whitespace}).
554The face for displaying control characters and escape sequences 573The face for displaying control characters and escape sequences
555(@pxref{Text Display}). 574(@pxref{Text Display}).
556@item nobreak-space 575@item nobreak-space
557The face for displaying ``non-breaking'' space characters (@pxref{Text 576The face for displaying ``no-break'' space characters (@pxref{Text
558Display}). 577Display}).
559@end table 578@end table
560 579
@@ -599,7 +618,8 @@ displays. (The fringes are the narrow portions of the Emacs frame
599between the text area and the window's right and left borders.) 618between the text area and the window's right and left borders.)
600@xref{Fringes}. 619@xref{Fringes}.
601@item cursor 620@item cursor
602This face determines the color of the text cursor. 621The @code{:background} attribute of this face specifies the color of
622the text cursor. @xref{Cursor Display}.
603@item tooltip 623@item tooltip
604This face is used for tooltip text. By default, if Emacs is built 624This face is used for tooltip text. By default, if Emacs is built
605with GTK support, tooltips are drawn via GTK and this face has no 625with GTK support, tooltips are drawn via GTK and this face has no
@@ -702,16 +722,14 @@ file:
702(global-font-lock-mode 0) 722(global-font-lock-mode 0)
703@end example 723@end example
704 724
705@findex turn-on-font-lock
706@noindent 725@noindent
707If you have disabled Global Font Lock mode, you can still enable Font 726If you have disabled Global Font Lock mode, you can still enable Font
708Lock for specific major modes by adding the function 727Lock for specific major modes by adding the function
709@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For 728@code{font-lock-mode} to the mode hooks (@pxref{Hooks}). For example,
710example, to enable Font Lock mode for editing C files, you can do 729to enable Font Lock mode for editing C files, you can do this:
711this:
712 730
713@example 731@example
714(add-hook 'c-mode-hook 'turn-on-font-lock) 732(add-hook 'c-mode-hook 'font-lock-mode)
715@end example 733@end example
716 734
717 Font Lock mode uses several specifically named faces to do its job, 735 Font Lock mode uses several specifically named faces to do its job,
@@ -901,9 +919,14 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}.
901@section Window Fringes 919@section Window Fringes
902@cindex fringes 920@cindex fringes
903 921
904 On a graphical display, each Emacs window normally has narrow 922@findex set-fringe-style
923@findex fringe-mode
924 On graphical displays, each Emacs window normally has narrow
905@dfn{fringes} on the left and right edges. The fringes are used to 925@dfn{fringes} on the left and right edges. The fringes are used to
906display symbols that provide information about the text in the window. 926display symbols that provide information about the text in the window.
927You can type @kbd{M-x fringe-mode} to disable the fringes, or modify
928their width. This command affects fringes in all frames; to modify
929fringes on the selected frame only, use @kbd{M-x set-fringe-style}.
907 930
908 The most common use of the fringes is to indicate a continuation 931 The most common use of the fringes is to indicate a continuation
909line (@pxref{Continuation Lines}). When one line of text is split 932line (@pxref{Continuation Lines}). When one line of text is split
@@ -924,17 +947,18 @@ scrolls the display horizontally in the direction of the arrow.
924boundaries (@pxref{Displaying Boundaries}), and where a program you 947boundaries (@pxref{Displaying Boundaries}), and where a program you
925are debugging is executing (@pxref{Debuggers}). 948are debugging is executing (@pxref{Debuggers}).
926 949
927@findex set-fringe-style 950@vindex overflow-newline-into-fringe
928@findex fringe-mode 951 The fringe is also used for drawing the cursor, if the current line
929 You can enable and disable the fringes for all frames using 952is exactly as wide as the window and point is at the end of the line.
930@kbd{M-x fringe-mode}. To enable and disable the fringes 953To disable this, change the variable
931for the selected frame, use @kbd{M-x set-fringe-style}. 954@code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs
955to continue or truncate lines that are exactly as wide as the window.
932 956
933@node Displaying Boundaries 957@node Displaying Boundaries
934@section Displaying Boundaries 958@section Displaying Boundaries
935 959
936@vindex indicate-buffer-boundaries 960@vindex indicate-buffer-boundaries
937 On a graphical display, Emacs can indicate the buffer boundaries in 961 On graphical displays, Emacs can indicate the buffer boundaries in
938the fringes. If you enable this feature, the first line and the last 962the fringes. If you enable this feature, the first line and the last
939line are marked with angle images in the fringes. This can be 963line are marked with angle images in the fringes. This can be
940combined with up and down arrow images which say whether it is 964combined with up and down arrow images which say whether it is
@@ -1127,14 +1151,15 @@ set the variable @code{display-time-24hr-format} to @code{t}.
1127@vindex display-time-mail-file 1151@vindex display-time-mail-file
1128@vindex display-time-mail-directory 1152@vindex display-time-mail-directory
1129 The word @samp{Mail} appears after the load level if there is mail 1153 The word @samp{Mail} appears after the load level if there is mail
1130for you that you have not read yet. On a graphical display you can use 1154for you that you have not read yet. On graphical displays, you can
1131an icon instead of @samp{Mail} by customizing 1155use an icon instead of @samp{Mail} by customizing
1132@code{display-time-use-mail-icon}; this may save some space on the mode 1156@code{display-time-use-mail-icon}; this may save some space on the
1133line. You can customize @code{display-time-mail-face} to make the mail 1157mode line. You can customize @code{display-time-mail-face} to make
1134indicator prominent. Use @code{display-time-mail-file} to specify 1158the mail indicator prominent. Use @code{display-time-mail-file} to
1135the mail file to check, or set @code{display-time-mail-directory} 1159specify the mail file to check, or set
1136to specify the directory to check for incoming mail (any nonempty regular 1160@code{display-time-mail-directory} to specify the directory to check
1137file in the directory is considered as ``newly arrived mail''). 1161for incoming mail (any nonempty regular file in the directory is
1162considered as ``newly arrived mail'').
1138 1163
1139@cindex mail (on mode line) 1164@cindex mail (on mode line)
1140@findex display-battery-mode 1165@findex display-battery-mode
@@ -1152,7 +1177,7 @@ percentage of the total charge.
1152@cindex mode line, 3D appearance 1177@cindex mode line, 3D appearance
1153@cindex attributes of mode line, changing 1178@cindex attributes of mode line, changing
1154@cindex non-integral number of lines in a window 1179@cindex non-integral number of lines in a window
1155 On a graphical display, the mode line is drawn as a 3D box. If you 1180 On graphical displays, the mode line is drawn as a 3D box. If you
1156don't like this effect, you can disable it by customizing the 1181don't like this effect, you can disable it by customizing the
1157@code{mode-line} face and setting its @code{box} attribute to 1182@code{mode-line} face and setting its @code{box} attribute to
1158@code{nil}. @xref{Face Customization}. 1183@code{nil}. @xref{Face Customization}.
@@ -1218,17 +1243,23 @@ If you change the buffer-local variable @code{ctl-arrow} to
1218octal escape sequences instead of caret escape sequences. 1243octal escape sequences instead of caret escape sequences.
1219 1244
1220@vindex nobreak-char-display 1245@vindex nobreak-char-display
1221@cindex non-breaking space, display 1246@cindex non-breaking space
1222@cindex non-breaking hyphen, display 1247@cindex non-breaking hyphen
1223@cindex soft hyphen, display 1248@cindex soft hyphen
1224 There are two special ``non-breaking'' versions of the space and 1249 Some non-@acronym{ASCII} characters have the same appearance as an
1225hyphen characters, which are used where a line should not be broken. 1250@acronym{ASCII} space or hyphen (minus) character. Such characters
1226Emacs normally displays these characters with special faces 1251can cause problems if they are entered into a buffer without your
1227(respectively, @code{nobreak-space} and @code{escape-glyph}) to 1252realization, e.g. by yanking; for instance, source code compilers
1228distinguish them from ordinary spaces and hyphens. You can turn off 1253typically do not treat non-@acronym{ASCII} spaces as whitespace
1229this feature by setting the variable @code{nobreak-char-display} to 1254characters. To deal with this problem, Emacs displays such characters
1230@code{nil}. If you set the variable to any other value, that means to 1255specially: it displays @code{U+00A0} (no-break space) with the
1231prefix these characters with an escape character. 1256@code{nobreak-space} face, and it displays @code{U+00AD} (soft
1257hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking
1258hyphen) with the @code{escape-glyph} face. To disable this, change
1259the variable @code{nobreak-char-display} to @code{nil}. If you give
1260this variable a non-@code{nil} and non-@code{t} value, Emacs instead
1261displays such characters as a highlighted backslash followed by a
1262space or hyphen.
1232 1263
1233 You can customize the way any particular character code is displayed 1264 You can customize the way any particular character code is displayed
1234by means of a display table. @xref{Display Tables,, Display Tables, 1265by means of a display table. @xref{Display Tables,, Display Tables,
@@ -1246,48 +1277,61 @@ for details.
1246 1277
1247@node Cursor Display 1278@node Cursor Display
1248@section Displaying the Cursor 1279@section Displaying the Cursor
1249 1280@cindex text cursor
1250@findex blink-cursor-mode
1251@vindex blink-cursor-alist
1252@cindex cursor, locating visually
1253@cindex cursor, blinking
1254 You can customize the cursor's color, and whether it blinks, using
1255the @code{cursor} Custom group (@pxref{Easy Customization}). On
1256a graphical display, the command @kbd{M-x blink-cursor-mode} enables
1257or disables the blinking of the cursor. (On text terminals, the
1258terminal itself blinks the cursor, and Emacs has no control over it.)
1259You can control how the cursor appears when it blinks off by setting
1260the variable @code{blink-cursor-alist}.
1261
1262@vindex cursor-type
1263 You can change the shape of the cursor from the default ``box'' look
1264to a bar by altering the @code{cursor-type} variable.
1265 1281
1266@vindex visible-cursor 1282@vindex visible-cursor
1267 Some text terminals offer two different cursors: the normal cursor 1283 On a text terminal, the cursor's appearance is controlled by the
1268and the very visible cursor, where the latter may be e.g. bigger or 1284terminal, largely out of the control of Emacs. Some terminals offer
1269blinking. By default Emacs uses the very visible cursor, and switches 1285two different cursors: a ``visible'' static cursor, and a ``very
1270to it when you start or resume Emacs. If the variable 1286visible'' blinking cursor. By default, Emacs uses the very visible
1271@code{visible-cursor} is @code{nil} when Emacs starts or resumes, it 1287cursor, and switches to it when you start or resume Emacs. If the
1272doesn't switch, so it uses the normal cursor. 1288variable @code{visible-cursor} is @code{nil} when Emacs starts or
1289resumes, it uses the normal cursor.
1290
1291@cindex cursor face
1292@vindex cursor-type
1293 On a graphical display, many more properties of the text cursor can
1294be altered. To customize its color, change the @code{:background}
1295attribute of the face named @code{cursor} (@pxref{Face
1296Customization}). (The other attributes of this face have no effect;
1297the text shown under the cursor is drawn using the frame's background
1298color.) To change its shape, customize the buffer-local variable
1299@code{cursor-type}; possible values are @code{box} (the default),
1300@code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar
1301. @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a
1302horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n}
1303pixels tall), or @code{nil} (no cursor at all).
1273 1304
1274@cindex cursor in non-selected windows 1305@findex blink-cursor-mode
1275@vindex cursor-in-non-selected-windows 1306@cindex cursor, blinking
1276 Normally, the cursor appears in non-selected windows without 1307@cindex blinking cursor
1277blinking, with the same appearance as when the blinking cursor blinks 1308@vindex blink-cursor-alist
1278``off.'' For a box cursor, this is a hollow box; for a bar cursor, 1309 To disable cursor blinking, change the variable
1279this is a thinner bar. To turn off cursors in non-selected windows, 1310@code{blink-cursor-mode} to @code{nil} (@pxref{Easy Customization}),
1280customize the variable @code{cursor-in-non-selected-windows} and 1311or add the line @code{(blink-cursor-mode 0)} to your init file.
1281assign it a @code{nil} value. 1312Alternatively, you can change how the cursor looks when it ``blinks
1313off'' by customizing the list variable @code{blink-cursor-alist}.
1314Each element in the list should have the form @code{(@var{on-type}
1315. @var{off-type})}; this means that if the cursor is displayed as
1316@var{on-type} when it blinks on (where @var{on-type} is one of the
1317cursor types described above), then it is displayed as @var{off-type}
1318when it blinks off.
1282 1319
1283@vindex x-stretch-cursor 1320@vindex x-stretch-cursor
1284@cindex wide block cursor 1321@cindex wide block cursor
1285 On graphical displays, Emacs can optionally draw the block cursor 1322 Some characters, such as tab characters, are ``extra wide''. When
1286as wide as the character under the cursor---for example, if the cursor 1323the cursor is positioned over such a character, it is normally drawn
1287is on a tab character, it would cover the full width occupied by that 1324with the default character width. You can make the cursor stretch to
1288tab character. To enable this feature, set the variable 1325cover wide characters, by changing the variable
1289@code{x-stretch-cursor} to a non-@code{nil} value. 1326@code{x-stretch-cursor} to a non-@code{nil} value.
1290 1327
1328@cindex cursor in non-selected windows
1329@vindex cursor-in-non-selected-windows
1330 The cursor normally appears in non-selected windows as a
1331non-blinking hollow box. (For a bar cursor, it instead appears as a
1332thinner bar.) To turn off cursors in non-selected windows, change the
1333variable @code{cursor-in-non-selected-windows} to @code{nil}.
1334
1291@findex hl-line-mode 1335@findex hl-line-mode
1292@findex global-hl-line-mode 1336@findex global-hl-line-mode
1293@cindex highlight current line 1337@cindex highlight current line
@@ -1297,18 +1341,17 @@ hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
1297global-hl-line-mode} enables or disables the same mode globally. 1341global-hl-line-mode} enables or disables the same mode globally.
1298 1342
1299@node Line Truncation 1343@node Line Truncation
1300@section Truncation of Lines 1344@section Line Truncation
1301 1345
1302@cindex truncation 1346@cindex truncation
1303@cindex line truncation, and fringes 1347@cindex line truncation, and fringes
1304 As an alternative to continuation (@pxref{Continuation Lines}), Emacs 1348 As an alternative to continuation (@pxref{Continuation Lines}),
1305can display long lines by @dfn{truncation}. This means that all the 1349Emacs can display long lines by @dfn{truncation}. This means that all
1306characters that do not fit in the width of the screen or window do not 1350the characters that do not fit in the width of the screen or window do
1307appear at all. On graphical displays, a small straight arrow in the 1351not appear at all. On graphical displays, a small straight arrow in
1308fringe indicates truncation at either end of the line. On text-only 1352the fringe indicates truncation at either end of the line. On
1309terminals, @samp{$} appears in the leftmost column when there is text 1353text-only terminals, this is indicated with @samp{$} signs in the
1310truncated to the left, and in the rightmost column when there is text 1354leftmost and/or rightmost columns.
1311truncated to the right.
1312 1355
1313@vindex truncate-lines 1356@vindex truncate-lines
1314@findex toggle-truncate-lines 1357@findex toggle-truncate-lines
@@ -1320,21 +1363,12 @@ toggle-truncate-lines}. This works by locally changing the variable
1320are truncated; if it is @code{nil}, they are continued onto multiple 1363are truncated; if it is @code{nil}, they are continued onto multiple
1321screen lines. Setting the variable @code{truncate-lines} in any way 1364screen lines. Setting the variable @code{truncate-lines} in any way
1322makes it local to the current buffer; until that time, the default 1365makes it local to the current buffer; until that time, the default
1323value is in effect. The default value is normally @code{nil}. 1366value, which is normally @code{nil}, is in effect.
1324 1367
1325@c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. 1368@vindex truncate-partial-width-windows
1326 If the variable @code{truncate-partial-width-windows} is 1369 If a split window becomes too narrow, Emacs may automatically enable
1327non-@code{nil}, it forces truncation rather than continuation in any 1370line truncation. @xref{Split Window}, for the variable
1328window less than the full width of the screen or frame, regardless of 1371@code{truncate-partial-width-windows} which controls this.
1329the value of @code{truncate-lines}. See also @ref{Display,, Display,
1330elisp, The Emacs Lisp Reference Manual}.
1331
1332@vindex overflow-newline-into-fringe
1333 If the variable @code{overflow-newline-into-fringe} is
1334non-@code{nil} on a graphical display, then Emacs does not continue or
1335truncate a line which is exactly as wide as the window. Instead, the
1336newline overflows into the right fringe, and the cursor appears in the
1337fringe when positioned on that newline.
1338 1372
1339@node Visual Line Mode 1373@node Visual Line Mode
1340@section Visual Line Mode 1374@section Visual Line Mode
@@ -1387,11 +1421,8 @@ variable @code{visual-line-fringe-indicators}.
1387@node Display Custom 1421@node Display Custom
1388@section Customization of Display 1422@section Customization of Display
1389 1423
1390 This section describes variables (@pxref{Variables}) that you can 1424 This section describes variables that control miscellaneous aspects
1391change to customize how Emacs displays. Beginning users can skip 1425of the appearance of the Emacs screen. Beginning users can skip it.
1392it.
1393@c the reason for that pxref is because an xref early in the
1394@c ``echo area'' section leads here.
1395 1426
1396@vindex visible-bell 1427@vindex visible-bell
1397 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts 1428 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
@@ -1403,19 +1434,7 @@ to make the screen blink.
1403 The variable @code{echo-keystrokes} controls the echoing of multi-character 1434 The variable @code{echo-keystrokes} controls the echoing of multi-character
1404keys; its value is the number of seconds of pause required to cause echoing 1435keys; its value is the number of seconds of pause required to cause echoing
1405to start, or zero, meaning don't echo at all. The value takes effect when 1436to start, or zero, meaning don't echo at all. The value takes effect when
1406there is someting to echo. @xref{Echo Area}. 1437there is something to echo. @xref{Echo Area}.
1407
1408@vindex baud-rate
1409 The variable @anchor{baud-rate}@code{baud-rate} holds the output
1410speed of the terminal. Setting this variable does not change the
1411speed of actual data transmission, but the value is used for
1412calculations. On text-only terminals, it affects padding, and
1413decisions about whether to scroll part of the screen or redraw it
1414instead. It also affects the behavior of incremental search. On
1415graphical displays, @code{baud-rate} is only used to determine how
1416frequently to look for pending input during display updating. A
1417higher value of @code{baud-rate} means that check for pending input
1418will be done less frequently.
1419 1438
1420@cindex mouse pointer 1439@cindex mouse pointer
1421@cindex hourglass pointer display 1440@cindex hourglass pointer display
@@ -1458,15 +1477,3 @@ itself, in pixels; the default is 2.
1458result in text that is hard to read. Call the function 1477result in text that is hard to read. Call the function
1459@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} 1478@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil}
1460argument to suppress the effect of bold-face in this case. 1479argument to suppress the effect of bold-face in this case.
1461
1462@vindex no-redraw-on-reenter
1463 On a text-only terminal, when you reenter Emacs after suspending, Emacs
1464normally clears the screen and redraws the entire display. On some
1465terminals with more than one page of memory, it is possible to arrange
1466the termcap entry so that the @samp{ti} and @samp{te} strings (output
1467to the terminal when Emacs is entered and exited, respectively) switch
1468between pages of memory so as to use one page for Emacs and another
1469page for other output. On such terminals, you might want to set the variable
1470@code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to
1471assume, when resumed, that the screen page it is using still contains
1472what Emacs last wrote there.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 44f1aed134e..b25c09aa29d 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -281,7 +281,7 @@ Completion
281 281
282* Completion Example:: Examples of using completion. 282* Completion Example:: Examples of using completion.
283* Completion Commands:: A list of completion commands. 283* Completion Commands:: A list of completion commands.
284* Strict Completion:: Different types of completion. 284* Completion Exit:: Completion and minibuffer text submission.
285* Completion Styles:: How completion matches are chosen. 285* Completion Styles:: How completion matches are chosen.
286* Completion Options:: Options for completion. 286* Completion Options:: Options for completion.
287 287
@@ -342,6 +342,7 @@ Registers
342Controlling the Display 342Controlling the Display
343 343
344* Scrolling:: Commands to move text up and down in a window. 344* Scrolling:: Commands to move text up and down in a window.
345* Recentering:: A scrolling command that centers the current line.
345* Auto Scrolling:: Redisplay scrolls text automatically when needed. 346* Auto Scrolling:: Redisplay scrolls text automatically when needed.
346* Horizontal Scrolling:: Moving text left and right in a window. 347* Horizontal Scrolling:: Moving text left and right in a window.
347* Narrowing:: Restricting display and editing to a portion 348* Narrowing:: Restricting display and editing to a portion
@@ -388,7 +389,6 @@ Incremental Search
388 or else edit the search string. 389 or else edit the search string.
389* Isearch Scroll:: Scrolling during an incremental search. 390* Isearch Scroll:: Scrolling during an incremental search.
390* Isearch Minibuffer:: Incremental search of the minibuffer history. 391* Isearch Minibuffer:: Incremental search of the minibuffer history.
391* Slow Isearch:: Incremental search features for slow terminals.
392 392
393Replacement Commands 393Replacement Commands
394 394
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 433bf617598..2317f876b08 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -47,58 +47,58 @@ on file directories.
47@section File Names 47@section File Names
48@cindex file names 48@cindex file names
49 49
50 Many Emacs commands that operate on a file require you to specify
51the file name, using the minibuffer (@pxref{Minibuffer}). You can use
52@dfn{completion} to specify long file names (@pxref{Completion}).
53Note that file name completion ignores file names whose extensions
54appear in the variable @code{completion-ignored-extensions}
55(@pxref{Completion Options}).
56
57@cindex default file name 50@cindex default file name
58 For most operations, there is a @dfn{default file name} which is 51 Many Emacs commands that operate on a file require you to specify
59used if you type just @key{RET} to enter an empty argument. Normally, 52the file name, using the minibuffer (@pxref{Minibuffer File}).
60the default file name is the name of the file visited in the current 53
61buffer. 54 While in the minibuffer, you can use the usual completion and
55history commands (@pxref{Minibuffer}). Note that file name completion
56ignores file names whose extensions appear in the variable
57@code{completion-ignored-extensions} (@pxref{Completion Options}).
58Note also that most commands use ``permissive completion with
59confirmation'' for reading file names: you are allowed to submit a
60nonexistent file name, but if you type @key{RET} immediately after
61completing up to a nonexistent file name, Emacs prints
62@samp{[Confirm]} and you must type a second @key{RET} to confirm.
63@xref{Completion Exit}, for details.
62 64
63@cindex default directory 65@cindex default directory
64@vindex default-directory 66@vindex default-directory
65@vindex insert-default-directory 67@vindex insert-default-directory
66 Each buffer has a @dfn{default directory} which is normally the same 68 Each buffer has a @dfn{default directory}, stored in the
67as the directory of the file visited in that buffer. For example, if 69buffer-local variable @code{default-directory}. Whenever Emacs reads
68the default file name is @file{/u/rms/gnu/gnu.tasks}, the default 70a file name using the minibuffer, it usually inserts the default
69directory is normally @file{/u/rms/gnu/}. The default directory is 71directory into the minibuffer as the initial contents. You can
70kept in the variable @code{default-directory}, which has a separate 72inhibit this insertion by changing the variable
71value in every buffer. When a command reads a file name using the 73@code{insert-default-directory} to @code{nil} (@pxref{Minibuffer
72minibuffer, the default directory usually serves as the initial 74File}). Regardless, Emacs always assumes that any relative file name
73contents of the minibuffer. To inhibit the insertion of the default 75is relative to the default directory, e.g. entering a file name
74directory, set the variable @code{insert-default-directory} to 76without a directory specifies a file in the default directory.
75@code{nil}.
76 77
77 If you enter a file name without a directory, that specifies a file 78@findex cd
78in the default directory. If you specify a directory in a relative 79@findex pwd
79fashion, with a name that does not start with a slash, it is 80 When you visit a file, Emacs sets @code{default-directory} in the
80interpreted with respect to the default directory. For example, 81visiting buffer to the directory of its file. When you create a new
81suppose the default directory is @file{/u/rms/gnu/}. Entering just 82buffer that is not visiting a file, via a command like @kbd{C-x b},
82@samp{foo} in the minibuffer, with a directory omitted, specifies the 83its default directory is usually copied from the buffer that was
83file @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies 84current at the time (@pxref{Select Buffer}). You can use the command
85@kbd{M-x pwd} to see the value of @code{default-directory} in the
86current buffer. The command @kbd{M-x cd} prompts for a directory
87name, and sets the buffer's @code{default-directory} to that directory
88(doing this does not change the buffer's file name, if any).
89
90 As an example, when you visit the file @file{/u/rms/gnu/gnu.tasks},
91the default directory is set to @file{/u/rms/gnu/}. If you invoke a
92command that reads a file name, entering just @samp{foo} in the
93minibuffer, with a directory omitted, specifies the file
94@file{/u/rms/gnu/foo}; entering @samp{../.login} specifies
84@file{/u/rms/.login}; and entering @samp{new/foo} specifies 95@file{/u/rms/.login}; and entering @samp{new/foo} specifies
85@file{/u/rms/gnu/new/foo}. 96@file{/u/rms/gnu/new/foo}.
86 97
87 When typing a file name into the minibuffer, you can make use of a 98 When typing a file name into the minibuffer, you can make use of a
88couple of shortcuts: a double slash is interpreted as ``ignore 99couple of shortcuts: a double slash is interpreted as ``ignore
89everything before the second slash in the pair,'' and @samp{~/} is 100everything before the second slash in the pair,'' and @samp{~/} is
90interpreted as your home directory. @xref{Minibuffer File}, for more 101interpreted as your home directory. @xref{Minibuffer File}.
91information about these shortcuts.
92
93@findex cd
94@findex pwd
95 The command @kbd{M-x pwd} displays the default directory, and the
96command @kbd{M-x cd} sets it to a value read using the minibuffer. A
97buffer's default directory changes only when the @code{cd} command is
98used. A file-visiting buffer's default directory is initialized to
99the directory of the file it visits. If you create a buffer with
100@kbd{C-x b}, its default directory is copied from that of the buffer
101that was current at the time (@pxref{Select Buffer}).
102 102
103@cindex environment variables in file names 103@cindex environment variables in file names
104@cindex expansion of environment variables 104@cindex expansion of environment variables
@@ -113,10 +113,8 @@ the @samp{$}; alternatively, it can be enclosed in braces after the
113@file{/u/$@{FOO@}/test.c} are abbreviations for 113@file{/u/$@{FOO@}/test.c} are abbreviations for
114@file{/u/rms/hacks/test.c}. If the environment variable is not 114@file{/u/rms/hacks/test.c}. If the environment variable is not
115defined, no substitution occurs, so that the character @samp{$} stands 115defined, no substitution occurs, so that the character @samp{$} stands
116for itself. 116for itself. Note that environment variables affect Emacs only if they
117 117are applied before Emacs is started.
118 Note that environment variables affect Emacs only if they are
119applied before Emacs is started.
120 118
121 To access a file with @samp{$} in its name, if the @samp{$} causes 119 To access a file with @samp{$} in its name, if the @samp{$} causes
122expansion, type @samp{$$}. This pair is converted to a single 120expansion, type @samp{$$}. This pair is converted to a single
@@ -125,8 +123,7 @@ a single @samp{$}. Alternatively, quote the whole file name with
125@samp{/:} (@pxref{Quoted File Names}). File names which begin with a 123@samp{/:} (@pxref{Quoted File Names}). File names which begin with a
126literal @samp{~} should also be quoted with @samp{/:}. 124literal @samp{~} should also be quoted with @samp{/:}.
127 125
128 You can include non-@acronym{ASCII} characters in file names if you set the 126 You can include non-@acronym{ASCII} characters in file names.
129variable @code{file-name-coding-system} to a non-@code{nil} value.
130@xref{File Name Coding}. 127@xref{File Name Coding}.
131 128
132@node Visiting 129@node Visiting
@@ -159,48 +156,43 @@ Visit a file with no conversion of the contents.
159buffer so you can edit them. Emacs makes a new buffer for each file 156buffer so you can edit them. Emacs makes a new buffer for each file
160that you visit. 157that you visit.
161 158
162 Emacs normally constructs the buffer name from the file name, 159@kindex C-x C-f
163omitting the directory name. For example, a file named 160@findex find-file
164@file{/usr/rms/emacs.tex} is visited in a buffer named 161 To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the
165@samp{emacs.tex}. If there is already a buffer with that name, Emacs 162minibuffer to enter the name of the desired file. While in the
166constructs a unique name; the normal method is to append @samp{<2>}, 163minibuffer, you can abort the command by typing @kbd{C-g}. @xref{File
167@samp{<3>}, and so on, but you can select other methods. 164Names}, for details about entering file names into minibuffers.
165
166 If the specified file exists but the system does not allow you to
167read it, an error message is displayed in the echo area. Otherwise,
168you can tell that @kbd{C-x C-f} has completed successfully by the
169appearance of new text on the screen, and by the buffer name shown in
170the mode line (@pxref{Mode Line}). Emacs normally constructs the
171buffer name from the file name, omitting the directory name. For
172example, a file named @file{/usr/rms/emacs.tex} is visited in a buffer
173named @samp{emacs.tex}. If there is already a buffer with that name,
174Emacs constructs a unique name; the normal method is to append
175@samp{<2>}, @samp{<3>}, and so on, but you can select other methods.
168@xref{Uniquify}. 176@xref{Uniquify}.
169 177
170 Each window's mode line shows the name of the buffer that is being 178@cindex creating files
171displayed in that window, so you can always tell what buffer you are 179 To create a new file, just visit it using the same command, @kbd{C-x
172editing. @pxref{Mode Line}. 180C-f}. Emacs displays @samp{(New file)} in the echo area, but in other
173 181respects behaves as if you had visited an existing empty file.
174 The changes you make with editing commands are made in the Emacs
175buffer. They do not take effect in the file that you visited, or any
176permanent place, until you @dfn{save} the buffer (@pxref{Saving}).
177 182
178@cindex modified (buffer) 183@cindex modified (buffer)
179 If a buffer contains changes that have not been saved, we say the 184 After visiting a file, the changes you make with editing commands are
180buffer is @dfn{modified}. This implies that some changes will be lost 185made in the Emacs buffer. They do not take effect in the visited
181if the buffer is not saved. The mode line displays two stars near the 186file, until you @dfn{save} the buffer (@pxref{Saving}). If a buffer
182left margin to indicate that the buffer is modified. 187contains changes that have not been saved, we say the buffer is
183 188@dfn{modified}. This implies that some changes will be lost if the
184@kindex C-x C-f 189buffer is not saved. The mode line displays two stars near the left
185@findex find-file 190margin to indicate that the buffer is modified.
186 To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the 191
187minibuffer to enter the name of the desired file. The usual 192 If you visit a file that is already in Emacs, @kbd{C-x C-f} switches
188defaulting and completion behavior is available in this minibuffer 193to the existing buffer instead of making another copy. Before doing
189(@pxref{Minibuffer File}). Note, also, that completion ignores 194so, it checks whether the file has changed since you last visited or
190certain file names (@pxref{Completion Options}). While in the 195saved it. If the file has changed, Emacs offers to reread it.
191minibuffer, you can abort @kbd{C-x C-f} by typing @kbd{C-g}.
192
193 Your can tell that @kbd{C-x C-f} has completed successfully by the
194appearance of new text on the screen and a new buffer name in the mode
195line. If the specified file does not exist and you could not create
196it, or exists but you can't read it, an error message is displayed in
197the echo area.
198
199 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
200another copy. It selects the existing buffer containing that file.
201However, before doing so, it checks whether the file itself has changed
202since you visited or saved it last. If the file has changed, Emacs offers
203to reread it.
204 196
205@vindex large-file-warning-threshold 197@vindex large-file-warning-threshold
206@cindex file, warning when size is large 198@cindex file, warning when size is large
@@ -211,10 +203,10 @@ to reread it.
211about 10 megabytes), Emacs asks you for confirmation first. You can 203about 10 megabytes), Emacs asks you for confirmation first. You can
212answer @kbd{y} to proceed with visiting the file. Note, however, that 204answer @kbd{y} to proceed with visiting the file. Note, however, that
213Emacs cannot visit files that are larger than the maximum Emacs buffer 205Emacs cannot visit files that are larger than the maximum Emacs buffer
214size, which is limited by the amount of memory Emacs can allocate 206size, which is limited by the amount of memory Emacs can allocate and
215and by the integers that Emacs can represent 207by the integers that Emacs can represent (@pxref{Buffers}). If you
216(@pxref{Buffers}). If you try, Emacs will display an error message 208try, Emacs displays an error message saying that the maximum buffer
217saying that the maximum buffer size has been exceeded. 209size has been exceeded.
218 210
219@cindex wildcard characters in file names 211@cindex wildcard characters in file names
220@vindex find-file-wildcards 212@vindex find-file-wildcards
@@ -228,63 +220,21 @@ File Names}, for information on how to visit a file whose name
228actually contains wildcard characters. You can disable the wildcard 220actually contains wildcard characters. You can disable the wildcard
229feature by customizing @code{find-file-wildcards}. 221feature by customizing @code{find-file-wildcards}.
230 222
231@cindex file selection dialog
232 On graphical displays, there are two additional methods for visiting
233files. Firstly, when Emacs is built with a suitable GUI toolkit,
234commands invoked with the mouse (by clicking on the menu bar or tool
235bar) use the toolkit's standard ``File Selection'' dialog instead of
236prompting for the file name in the minibuffer. On GNU/Linux and Unix
237platforms, Emacs does this when built with GTK, LessTif, and Motif
238toolkits; on MS-Windows and Mac, the GUI version does that by default.
239For information on how to customize this, see @ref{Dialog Boxes}.
240
241 Secondly, Emacs supports ``drag and drop'': dropping a file into an
242ordinary Emacs window visits the file using that window. As an
243exception, dropping a file into a window displaying a Dired buffer
244moves or copies the file into the displayed directory. For details,
245see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
246
247@cindex creating files
248 What if you want to create a new file? Just visit it. Emacs
249displays @samp{(New file)} in the echo area, but in other respects
250behaves as if you had visited an existing empty file. If you make
251changes and save them, the file is created.
252
253@cindex minibuffer confirmation
254@cindex confirming in the minibuffer
255@vindex confirm-nonexistent-file-or-buffer
256 When @key{TAB} completion results in a nonexistent file name and you
257type @key{RET} immediately to visit it, Emacs asks for confirmation;
258this is because it's possible that you expected completion to go
259further and give you an existing file's name. The string
260@samp{[Confirm]} appears for a short time after the file name to
261indicate the need to confirm in this way. Type @key{RET} to confirm
262and visit the nonexistent file. The variable
263@code{confirm-nonexistent-file-or-buffer} controls whether Emacs asks
264for confirmation before visiting a new file. The default value,
265@code{after-completion}, gives the behavior we have just described.
266If the value is @code{nil}, Emacs never asks for confirmation; for any
267other non-@code{nil} value, Emacs always asks for confirmation. This
268variable also affects the @code{switch-to-buffer} command
269(@pxref{Select Buffer}). @xref{Completion}, for more information
270about completion.
271
272@kindex C-x C-v 223@kindex C-x C-v
273@findex find-alternate-file 224@findex find-alternate-file
274 If you visit a nonexistent file unintentionally (because you typed 225 If you visit the wrong file unintentionally by typing its name
275the wrong file name), type @kbd{C-x C-v} (@code{find-alternate-file}) 226incorrectly, type @kbd{C-x C-v} (@code{find-alternate-file}) to visit
276to visit the file you really wanted. @kbd{C-x C-v} is similar to 227the file you really wanted. @kbd{C-x C-v} is similar to @kbd{C-x
277@kbd{C-x C-f}, but it kills the current buffer (after first offering 228C-f}, but it kills the current buffer (after first offering to save it
278to save it if it is modified). When @kbd{C-x C-v} reads the file name 229if it is modified). When @kbd{C-x C-v} reads the file name to visit,
279to visit, it inserts the entire default file name in the buffer, with 230it inserts the entire default file name in the buffer, with point just
280point just after the directory part; this is convenient if you made a 231after the directory part; this is convenient if you made a slight
281slight error in typing the name. 232error in typing the name.
282 233
283@vindex find-file-run-dired 234@vindex find-file-run-dired
284 If you ``visit'' a file that is actually a directory, Emacs invokes 235 If you ``visit'' a file that is actually a directory, Emacs invokes
285Dired, the Emacs directory browser; this lets you ``edit'' the 236Dired, the Emacs directory browser. @xref{Dired}. You can disable
286contents of the directory. @xref{Dired}. You can disable this 237this behavior by setting the variable @code{find-file-run-dired} to
287behavior by setting the variable @code{find-file-run-dired} to
288@code{nil}; in that case, it is an error to try to visit a directory. 238@code{nil}; in that case, it is an error to try to visit a directory.
289 239
290 Files which are actually collections of other files, or @dfn{file 240 Files which are actually collections of other files, or @dfn{file
@@ -321,17 +271,28 @@ new frame, or makes visible any existing frame showing the file you
321seek. This feature is available only when you are using a window 271seek. This feature is available only when you are using a window
322system. @xref{Frames}. 272system. @xref{Frames}.
323 273
324 Emacs recognizes from the contents of a file which end-of-line 274@cindex file selection dialog
325convention it uses to separate lines---newline (used on GNU/Linux and 275 On graphical displays, there are two additional methods for visiting
326on Unix), carriage-return linefeed (used on Microsoft systems), or 276files. Firstly, when Emacs is built with a suitable GUI toolkit,
327just carriage-return (used on the Macintosh)---and automatically 277commands invoked with the mouse (by clicking on the menu bar or tool
328converts the contents to the normal Emacs convention, which is that 278bar) use the toolkit's standard ``File Selection'' dialog instead of
329the newline character separates lines. This is a part of the general 279prompting for the file name in the minibuffer. On GNU/Linux and Unix
330feature of coding system conversion (@pxref{Coding Systems}), and 280platforms, Emacs does this when built with GTK, LessTif, and Motif
331makes it possible to edit files imported from different operating 281toolkits; on MS-Windows and Mac, the GUI version does that by default.
332systems with equal convenience. If you change the text and save the 282For information on how to customize this, see @ref{Dialog Boxes}.
333file, Emacs performs the inverse conversion, changing newlines back 283
334into carriage-return linefeed or just carriage-return if appropriate. 284 Secondly, Emacs supports ``drag and drop'': dropping a file into an
285ordinary Emacs window visits the file using that window. As an
286exception, dropping a file into a window displaying a Dired buffer
287moves or copies the file into the displayed directory. For details,
288see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
289
290 Each time you visit a file, Emacs automatically scans its contents
291to detect what character encoding and end-of-line convention it uses,
292and converts these to Emacs' internal encoding and end-of-line
293convention within the buffer. When you save the buffer, Emacs
294performs the inverse conversion, writing the file to disk with its
295original encoding and end-of-line convention. @xref{Coding Systems}.
335 296
336@findex find-file-literally 297@findex find-file-literally
337 If you wish to edit a file as a sequence of @acronym{ASCII} 298 If you wish to edit a file as a sequence of @acronym{ASCII}
@@ -346,17 +307,17 @@ command asks you whether to visit it literally instead.
346 307
347@vindex find-file-hook 308@vindex find-file-hook
348@vindex find-file-not-found-functions 309@vindex find-file-not-found-functions
349 Two special hook variables allow extensions to modify the operation of 310 Two special hook variables allow extensions to modify the operation
350visiting files. Visiting a file that does not exist runs the functions 311of visiting files. Visiting a file that does not exist runs the
351in the list @code{find-file-not-found-functions}; this variable holds a list 312functions in @code{find-file-not-found-functions}; this variable holds
352of functions, and the functions are called one by one (with no 313a list of functions, which are called one by one (with no arguments)
353arguments) until one of them returns non-@code{nil}. This is not a 314until one of them returns non-@code{nil}. This is not a normal hook,
354normal hook, and the name ends in @samp{-functions} rather than @samp{-hook} 315and the name ends in @samp{-functions} rather than @samp{-hook} to
355to indicate that fact. 316indicate that fact.
356 317
357 Successful visiting of any file, whether existing or not, calls the 318 Successful visiting of any file, whether existing or not, calls the
358functions in the list @code{find-file-hook}, with no arguments. 319functions in @code{find-file-hook}, with no arguments. This variable
359This variable is a normal hook. In the case of a nonexistent file, the 320is a normal hook. In the case of a nonexistent file, the
360@code{find-file-not-found-functions} are run first. @xref{Hooks}. 321@code{find-file-not-found-functions} are run first. @xref{Hooks}.
361 322
362 There are several ways to specify automatically the major mode for 323 There are several ways to specify automatically the major mode for
@@ -386,9 +347,9 @@ that was visited in the buffer.
386 347
387@table @kbd 348@table @kbd
388@item C-x C-s 349@item C-x C-s
389Save the current buffer in its visited file on disk (@code{save-buffer}). 350Save the current buffer to its file (@code{save-buffer}).
390@item C-x s 351@item C-x s
391Save any or all buffers in their visited files (@code{save-some-buffers}). 352Save any or all buffers to their files (@code{save-some-buffers}).
392@item M-~ 353@item M-~
393Forget that the current buffer has been changed (@code{not-modified}). 354Forget that the current buffer has been changed (@code{not-modified}).
394With prefix argument (@kbd{C-u}), mark the current buffer as changed. 355With prefix argument (@kbd{C-u}), mark the current buffer as changed.
@@ -409,10 +370,10 @@ Wrote /u/rms/gnu/gnu.tasks
409@end example 370@end example
410 371
411@noindent 372@noindent
412If the selected buffer is not modified (no changes have been made in it 373If the current buffer is not modified (no changes have been made in it
413since the buffer was created or last saved), saving is not really done, 374since the buffer was created or last saved), saving is not really
414because it would have no effect. Instead, @kbd{C-x C-s} displays a message 375done, because it would have no effect. Instead, @kbd{C-x C-s}
415like this in the echo area: 376displays a message like this in the echo area:
416 377
417@example 378@example
418(No changes need to be saved) 379(No changes need to be saved)
@@ -597,8 +558,8 @@ Never make numbered backups; always make single backups.
597@end table 558@end table
598 559
599@noindent 560@noindent
600The usual way to set this variable is globally, through your 561The usual way to set this variable is globally, through your init file
601@file{.emacs} file or the customization buffer. However, you can set 562or the customization buffer. However, you can set
602@code{version-control} locally in an individual buffer to control the 563@code{version-control} locally in an individual buffer to control the
603making of backups for that buffer's file (@pxref{Locals}). You can 564making of backups for that buffer's file (@pxref{Locals}). You can
604have Emacs set @code{version-control} locally whenever you visit a 565have Emacs set @code{version-control} locally whenever you visit a
@@ -679,34 +640,38 @@ and group. If copying is used, these do not change. If renaming is used,
679you become the file's owner, and the file's group becomes the default 640you become the file's owner, and the file's group becomes the default
680(different operating systems have different defaults for the group). 641(different operating systems have different defaults for the group).
681 642
682 Having the owner change is usually a good idea, because then the owner
683always shows who last edited the file. Also, the owners of the backups
684show who produced those versions. Occasionally there is a file whose
685owner should not change; it is a good idea for such files to contain
686local variable lists to set @code{backup-by-copying-when-mismatch}
687locally (@pxref{File Variables}).
688
689@vindex backup-by-copying 643@vindex backup-by-copying
690@vindex backup-by-copying-when-linked 644@vindex backup-by-copying-when-linked
691@vindex backup-by-copying-when-mismatch 645@vindex backup-by-copying-when-mismatch
692@vindex backup-by-copying-when-privileged-mismatch 646@vindex backup-by-copying-when-privileged-mismatch
693@cindex file ownership, and backup 647@cindex file ownership, and backup
694@cindex backup, and user-id 648@cindex backup, and user-id
695 The choice of renaming or copying is controlled by four variables. 649 The choice of renaming or copying is made as follows:
696Renaming is the default choice. If the variable 650
697@code{backup-by-copying} is non-@code{nil}, copying is used. Otherwise, 651@itemize
698if the variable @code{backup-by-copying-when-linked} is non-@code{nil}, 652@item
699then copying is used for files that have multiple names, but renaming 653If the variable @code{backup-by-copying} is non-@code{nil} (the
700may still be used when the file being edited has only one name. If the 654default is @code{nil}), use copying.
701variable @code{backup-by-copying-when-mismatch} is non-@code{nil}, then 655
702copying is used if renaming would cause the file's owner or group to 656@item
703change. @code{backup-by-copying-when-mismatch} is @code{t} by default 657Otherwise, if the variable @code{backup-by-copying-when-linked} is
704if you start Emacs as the superuser. The fourth variable, 658non-@code{nil} (the default is @code{nil}), and the file has multiple
705@code{backup-by-copying-when-privileged-mismatch}, gives the highest 659names, use copying.
706numeric user-id for which @code{backup-by-copying-when-mismatch} will be 660
707forced on. This is useful when low-numbered user-ids are assigned to 661@item
708special system users, such as @code{root}, @code{bin}, @code{daemon}, 662Otherwise, if the variable @code{backup-by-copying-when-mismatch} is
709etc., which must maintain ownership of files. 663non-@code{nil} (the default is @code{t}), and renaming would change
664the file's owner or group, use copying.
665
666If you change @code{backup-by-copying-when-mismatch} to @code{nil},
667Emacs checks the numeric user-id of the file's owner. If this is
668higher than @code{backup-by-copying-when-privileged-mismatch}, then it
669behaves as though @code{backup-by-copying-when-mismatch} is
670non-@code{nil} anyway.
671
672@item
673Otherwise, renaming is the default choice.
674@end itemize
710 675
711 When a file is managed with a version control system (@pxref{Version 676 When a file is managed with a version control system (@pxref{Version
712Control}), Emacs does not normally make backups in the usual way for 677Control}), Emacs does not normally make backups in the usual way for
@@ -725,28 +690,28 @@ Emacs---the version control system does it.
725if there isn't already one there. If the value is @code{visit}, Emacs 690if there isn't already one there. If the value is @code{visit}, Emacs
726adds a newline at the end of any file that doesn't have one, just 691adds a newline at the end of any file that doesn't have one, just
727after it visits the file. (This marks the buffer as modified, and you 692after it visits the file. (This marks the buffer as modified, and you
728can undo it.) If the value is @code{visit-save}, that means to add 693can undo it.) If the value is @code{visit-save}, Emacs adds such
729newlines both on visiting and on saving. If the value is @code{nil}, 694newlines both on visiting and on saving. If the value is @code{nil},
730Emacs leaves the end of the file unchanged; if it's neither @code{nil} 695Emacs leaves the end of the file unchanged; any other non-@code{nil}
731nor @code{t}, Emacs asks you whether to add a newline. The default is 696value means to asks you whether to add a newline. The default is
732@code{nil}. 697@code{nil}.
733 698
734@vindex mode-require-final-newline 699@vindex mode-require-final-newline
735 Many major modes are designed for specific kinds of files that are 700 Some major modes are designed for specific kinds of files that are
736always supposed to end in newlines. These major modes set the 701always supposed to end in newlines. Such major modes set the variable
737variable @code{require-final-newline} according to 702@code{require-final-newline} to the value of
738@code{mode-require-final-newline}. By setting the latter variable, 703@code{mode-require-final-newline}, which defaults to @code{t}. By
739you can control how these modes handle final newlines. 704setting the latter variable, you can control how these modes handle
705final newlines.
740 706
741@vindex write-region-inhibit-fsync 707@vindex write-region-inhibit-fsync
742 When Emacs saves a file, it invokes the @code{fsync} system call to 708 When Emacs saves a file, it invokes the @code{fsync} system call to
743force the data immediately out to disk. This is important for safety 709force the data immediately out to disk. This is important for safety
744if the system crashes or in case of power outage. However, it can be 710if the system crashes or in case of power outage. However, it can be
745disruptive on laptops using power saving, because it requires the disk 711disruptive on laptops using power saving, as it may force a disk
746to spin up each time you save a file. Setting 712spin-up each time you save a file. If you accept an increased risk of
747@code{write-region-inhibit-fsync} to a non-@code{nil} value disables 713data loss, you can set @code{write-region-inhibit-fsync} to a
748this synchronization. Be careful---this means increased risk of data 714non-@code{nil} value to disable the synchronization.
749loss.
750 715
751@node Interlocking 716@node Interlocking
752@subsection Protection against Simultaneous Editing 717@subsection Protection against Simultaneous Editing
@@ -754,9 +719,9 @@ loss.
754@cindex file dates 719@cindex file dates
755@cindex simultaneous editing 720@cindex simultaneous editing
756 Simultaneous editing occurs when two users visit the same file, both 721 Simultaneous editing occurs when two users visit the same file, both
757make changes, and then both save them. If nobody were informed that 722make changes, and then both save them. If nobody is informed that
758this was happening, whichever user saved first would later find that his 723this is happening, whichever user saves first would later find that
759changes were lost. 724his changes were lost.
760 725
761 On some systems, Emacs notices immediately when the second user starts 726 On some systems, Emacs notices immediately when the second user starts
762to change the file, and issues an immediate warning. On all systems, 727to change the file, and issues an immediate warning. On all systems,
@@ -794,38 +759,28 @@ contents remain unchanged---the modification you were trying to make
794does not actually take place. 759does not actually take place.
795@end table 760@end table
796 761
797 Note that locking works on the basis of a file name; if a file has
798multiple names, Emacs does not realize that the two names are the same file
799and cannot prevent two users from editing it simultaneously under different
800names. However, basing locking on names means that Emacs can interlock the
801editing of new files that will not really exist until they are saved.
802
803 Some systems are not configured to allow Emacs to make locks, and
804there are cases where lock files cannot be written. In these cases,
805Emacs cannot detect trouble in advance, but it still can detect the
806collision when you try to save a file and overwrite someone else's
807changes. Every time Emacs saves a buffer, it first checks the
808last-modification date of the existing file on disk to verify that it
809has not changed since the file was last visited or saved. If the date
810does not match, it implies that changes were made in the file in some
811other way, and these changes are about to be lost if Emacs actually
812does save. To prevent this, Emacs displays a warning message and asks
813for confirmation before saving. Occasionally you will know why the
814file was changed and know that it does not matter; then you can answer
815@kbd{yes} and proceed. Otherwise, you should cancel the save with
816@kbd{C-g} and investigate the situation.
817
818 If Emacs or the operating system crashes, this may leave behind lock 762 If Emacs or the operating system crashes, this may leave behind lock
819files which are stale, so you may occasionally get warnings about 763files which are stale, so you may occasionally get warnings about
820spurious collisions. When you determine that the collision is spurious, 764spurious collisions. When you determine that the collision is
821just use @kbd{p} to tell Emacs to go ahead anyway. 765spurious, just use @kbd{p} to tell Emacs to go ahead anyway.
822 766
823 The first thing you should do when notified that simultaneous editing 767 Note that locking works on the basis of a file name; if a file has
824has already taken place is to list the directory with @kbd{C-u C-x C-d} 768multiple names, Emacs does not prevent two users from editing it
825(@pxref{Directories}). This shows the file's current author. You 769simultaneously under different names.
826should attempt to contact him to warn him not to continue editing. 770
827Often the next step is to save the contents of your Emacs buffer under a 771 A lock file cannot be written in some circumstances, e.g. if Emacs
828different name, and use @code{diff} to compare the two files.@refill 772lacks the system permissions or the system does not support symbolic
773links. In these cases, Emacs can still detect the collision when you
774try to save a file, by checking the file's last-modification date. If
775the file has changed since the last time Emacs visited or saved it,
776that implies that changes have been made in some other way, and will
777be lost if Emacs proceeds with saving. Emacs then displays a warning
778message and asks for confirmation before saving; answer @kbd{yes} to
779save, and @kbd{no} or @kbd{C-g} cancel the save.
780
781 If you are notified that simultaneous editing has already taken
782place, one way to compare the buffer to its file is the @kbd{M-x
783diff-buffer-with-file} command. @xref{Comparing Files}.
829 784
830@node File Shadowing 785@node File Shadowing
831@subsection Shadowing Files 786@subsection Shadowing Files
@@ -881,10 +836,10 @@ shadow-define-cluster}.
881@cindex modification dates 836@cindex modification dates
882@cindex locale, date format 837@cindex locale, date format
883 838
884You can arrange to put a time stamp in a file, so that it will be updated 839You can arrange to put a time stamp in a file, so that it is updated
885automatically each time you edit and save the file. The time stamp 840automatically each time you edit and save the file. The time stamp
886has to be in the first eight lines of the file, and you should 841must be in the first eight lines of the file, and you should insert it
887insert it like this: 842like this:
888 843
889@example 844@example
890Time-stamp: <> 845Time-stamp: <>
@@ -898,13 +853,13 @@ Time-stamp: " "
898@end example 853@end example
899 854
900@findex time-stamp 855@findex time-stamp
901 Then add the hook function @code{time-stamp} to the hook 856 Then add the function @code{time-stamp} to the hook
902@code{before-save-hook}; that hook function will automatically update 857@code{before-save-hook} (@pxref{Hooks}). When you save the file, this
903the time stamp, inserting the current date and time when you save the 858function then automatically updates the time stamp with the current
904file. You can also use the command @kbd{M-x time-stamp} to update the 859date and time. You can also use the command @kbd{M-x time-stamp} to
905time stamp manually. For other customizations, see the Custom group 860update the time stamp manually. For other customizations, see the
906@code{time-stamp}. Note that non-numeric fields in the time stamp are 861Custom group @code{time-stamp}. Note that the time stamp is formatted
907formatted according to your locale setting (@pxref{Environment}). 862according to your locale setting (@pxref{Environment}).
908 863
909@node Reverting 864@node Reverting
910@section Reverting a Buffer 865@section Reverting a Buffer
@@ -912,18 +867,21 @@ formatted according to your locale setting (@pxref{Environment}).
912@cindex drastic changes 867@cindex drastic changes
913@cindex reread a file 868@cindex reread a file
914 869
915 If you have made extensive changes to a file and then change your mind 870 If you have made extensive changes to a file-visiting buffer and
916about them, you can get rid of them by reading in the previous version 871then change your mind, you can @dfn{revert} the changes and go back to
917of the file. To do this, use @kbd{M-x revert-buffer}, which operates on 872the saved version of the file. To do this, type @kbd{M-x
918the current buffer. Since reverting a buffer unintentionally could lose 873revert-buffer}. Since reverting unintentionally could lose a lot of
919a lot of work, you must confirm this command with @kbd{yes}. 874work, Emacs asks for confirmation first.
920 875
921 @code{revert-buffer} tries to position point in such a way that, if 876 The @code{revert-buffer} command tries to position point in such a
922the file was edited only slightly, you will be at approximately the 877way that, if the file was edited only slightly, you will be at
923same piece of text after reverting as before. However, if you have made 878approximately the same part of the text as before. But if you have
924drastic changes, point may wind up in a totally different piece of text. 879made major changes, point may end up in a totally different location.
925 880
926 Reverting marks the buffer as ``not modified''. 881 Reverting marks the buffer as ``not modified''. It also clears the
882buffer's undo history (@pxref{Undo}). Thus, the reversion cannot be
883undone---if you change your mind yet again, you can't use the undo
884commands to bring the reverted changes back.
927 885
928 Some kinds of buffers that are not associated with files, such as 886 Some kinds of buffers that are not associated with files, such as
929Dired buffers, can also be reverted. For them, reverting means 887Dired buffers, can also be reverted. For them, reverting means
@@ -950,15 +908,14 @@ discard your changes.)
950@findex auto-revert-mode 908@findex auto-revert-mode
951@findex auto-revert-tail-mode 909@findex auto-revert-tail-mode
952@vindex auto-revert-interval 910@vindex auto-revert-interval
953 911 You can also tell Emacs to revert buffers periodically. To do this
954 In addition, you can tell Emacs to periodically revert a buffer by 912for a specific buffer, enable the minor mode Auto-Revert mode by
955typing @kbd{M-x auto-revert-mode}. This turns on Auto-Revert mode, a 913typing @kbd{M-x auto-revert-mode}. This automatically reverts the
956minor mode that makes Emacs automatically revert the current buffer 914current buffer every five seconds; you can change the interval through
957every five seconds. You can change this interval through the variable 915the variable @code{auto-revert-interval}. To do the same for all file
958@code{auto-revert-interval}. Typing @kbd{M-x global-auto-revert-mode} 916buffers, type @kbd{M-x global-auto-revert-mode} to enable Global
959enables Global Auto-Revert mode, which does the same for all file 917Auto-Revert mode. These minor modes do not check or revert remote
960buffers. Auto-Revert mode and Global Auto-Revert modes do not check 918files, because that is usually too slow.
961or revert remote files, because that is usually too slow.
962 919
963 One use of Auto-Revert mode is to ``tail'' a file such as a system 920 One use of Auto-Revert mode is to ``tail'' a file such as a system
964log, so that changes made to that file by other programs are 921log, so that changes made to that file by other programs are
@@ -969,8 +926,9 @@ the end, use Auto-Revert Tail mode instead
969(@code{auto-revert-tail-mode}). It is more efficient for this. 926(@code{auto-revert-tail-mode}). It is more efficient for this.
970Auto-Revert Tail mode works also for remote files. 927Auto-Revert Tail mode works also for remote files.
971 928
972 @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that 929 @xref{VC Undo}, for commands to revert to earlier versions of files
973visit files under version control. 930under version control. @xref{VC Mode Line}, for Auto Revert
931peculiarities when visiting files under version control.
974 932
975@ifnottex 933@ifnottex
976@include arevert-xtra.texi 934@include arevert-xtra.texi
@@ -1061,40 +1019,41 @@ any auto-save file to go with the new visited name.
1061@vindex auto-save-default 1019@vindex auto-save-default
1062@findex auto-save-mode 1020@findex auto-save-mode
1063 Each time you visit a file, auto-saving is turned on for that file's 1021 Each time you visit a file, auto-saving is turned on for that file's
1064buffer if the variable @code{auto-save-default} is non-@code{nil} (but not 1022buffer if the variable @code{auto-save-default} is non-@code{nil} (but
1065in batch mode; @pxref{Entering Emacs}). The default for this variable is 1023not in batch mode; @pxref{Initial Options}). The default for this
1066@code{t}, so auto-saving is the usual practice for file-visiting buffers. 1024variable is @code{t}, so auto-saving is the usual practice for
1067Auto-saving can be turned on or off for any existing buffer with the 1025file-visiting buffers. To toggle auto-saving in the current buffer,
1068command @kbd{M-x auto-save-mode}. Like other minor mode commands, @kbd{M-x 1026type @kbd{M-x auto-save-mode}. Auto Save mode acts as a buffer-local
1069auto-save-mode} turns auto-saving on with a positive argument, off with a 1027minor mode (@pxref{Minor Modes}).
1070zero or negative argument; with no argument, it toggles.
1071 1028
1072@vindex auto-save-interval 1029@vindex auto-save-interval
1073 Emacs does auto-saving periodically based on counting how many characters 1030 Emacs auto-saves periodically based on how many characters you have
1074you have typed since the last time auto-saving was done. The variable 1031typed since the last auto-save. The variable
1075@code{auto-save-interval} specifies how many characters there are between 1032@code{auto-save-interval} specifies how many characters there are
1076auto-saves. By default, it is 300. Emacs doesn't accept values that are 1033between auto-saves. By default, it is 300. Emacs doesn't accept
1077too small: if you customize @code{auto-save-interval} to a value less 1034values that are too small: if you customize @code{auto-save-interval}
1078than 20, Emacs will behave as if the value is 20. 1035to a value less than 20, Emacs will behave as if the value is 20.
1079 1036
1080@vindex auto-save-timeout 1037@vindex auto-save-timeout
1081 Auto-saving also takes place when you stop typing for a while. The 1038 Auto-saving also takes place when you stop typing for a while. By
1082variable @code{auto-save-timeout} says how many seconds Emacs should 1039default, it does this after 30 seconds of idleness (at this time,
1083wait before it does an auto save (and perhaps also a garbage 1040Emacs may also perform garbage collection; @pxref{Garbage
1084collection). (The actual time period is longer if the current buffer is 1041Collection,,, elisp, The Emacs Lisp Reference Manual}). To change
1085long; this is a heuristic which aims to keep out of your way when you 1042this interval, customize the variable @code{auto-save-timeout}. The
1086are editing long buffers, in which auto-save takes an appreciable amount 1043actual time period is longer if the current buffer is long; this is a
1087of time.) Auto-saving during idle periods accomplishes two things: 1044heuristic which aims to keep out of your way when you are editing long
1088first, it makes sure all your work is saved if you go away from the 1045buffers, in which auto-save takes an appreciable amount of time.
1089terminal for a while; second, it may avoid some auto-saving while you 1046Auto-saving during idle periods accomplishes two things: first, it
1090are actually typing. 1047makes sure all your work is saved if you go away from the terminal for
1048a while; second, it may avoid some auto-saving while you are actually
1049typing.
1091 1050
1092 Emacs also does auto-saving whenever it gets a fatal error. This 1051 Emacs also does auto-saving whenever it gets a fatal error. This
1093includes killing the Emacs job with a shell command such as @samp{kill 1052includes killing the Emacs job with a shell command such as @samp{kill
1094%emacs}, or disconnecting a phone line or network connection. 1053%emacs}, or disconnecting a phone line or network connection.
1095 1054
1096@findex do-auto-save 1055@findex do-auto-save
1097 You can request an auto-save explicitly with the command @kbd{M-x 1056 You can perform an auto-save explicitly with the command @kbd{M-x
1098do-auto-save}. 1057do-auto-save}.
1099 1058
1100@node Recover 1059@node Recover
@@ -1138,13 +1097,11 @@ this---saving them---updates the files themselves.
1138 1097
1139@vindex auto-save-list-file-prefix 1098@vindex auto-save-list-file-prefix
1140 Emacs records information about interrupted sessions for later 1099 Emacs records information about interrupted sessions for later
1141recovery in files named 1100recovery in files named @file{.saves-@var{pid}-@var{hostname}} in the
1142@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}. The 1101directory @file{~/.emacs.d/auto-save-list/}. This directory is
1143directory used, @file{~/.emacs.d/auto-save-list/}, is determined by 1102determined by the variable @code{auto-save-list-file-prefix}. If you
1144the variable @code{auto-save-list-file-prefix}. You can record 1103set @code{auto-save-list-file-prefix} to @code{nil}, sessions are not
1145sessions in a different place by customizing that variable. If you 1104recorded for recovery.
1146set @code{auto-save-list-file-prefix} to @code{nil} in your
1147@file{.emacs} file, sessions are not recorded for recovery.
1148 1105
1149@node File Aliases 1106@node File Aliases
1150@section File Name Aliases 1107@section File Name Aliases
@@ -1292,8 +1249,8 @@ buffer named @samp{*diff*}. This works by running the @command{diff}
1292program, using options taken from the variable @code{diff-switches}. 1249program, using options taken from the variable @code{diff-switches}.
1293The value of @code{diff-switches} should be a string; the default is 1250The value of @code{diff-switches} should be a string; the default is
1294@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, 1251@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff,
1295Comparing and Merging Files}, for more information about 1252Comparing and Merging Files}, for more information about the
1296@command{diff} output formats. 1253@command{diff} program.
1297 1254
1298 The output of the @code{diff} command is shown using a major mode 1255 The output of the @code{diff} command is shown using a major mode
1299called Diff mode. @xref{Diff Mode}. 1256called Diff mode. @xref{Diff Mode}.
@@ -1361,11 +1318,10 @@ merging files.
1361@cindex patches, editing 1318@cindex patches, editing
1362 1319
1363 Diff mode is a major mode used for the output of @kbd{M-x diff} and 1320 Diff mode is a major mode used for the output of @kbd{M-x diff} and
1364other similar commands, as well as the output of the @command{diff} 1321other similar commands. This kind of output is called a @dfn{patch},
1365program. This kind of output is called a @dfn{patch}, because it can 1322because it can be passed to the @command{patch} command to
1366be passed to the @command{patch} command to automatically apply the 1323automatically apply the specified changes. To select Diff mode
1367specified changes. To select Diff mode manually, type @kbd{M-x 1324manually, type @kbd{M-x diff-mode}.
1368diff-mode}.
1369 1325
1370@cindex hunk, diff 1326@cindex hunk, diff
1371 The changes specified in a patch are grouped into @dfn{hunks}, which 1327 The changes specified in a patch are grouped into @dfn{hunks}, which
@@ -1659,21 +1615,18 @@ Tar mode is used also for compressed archives---files with extensions
1659 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file 1615 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
1660into its own buffer. You can edit it there, and if you save the 1616into its own buffer. You can edit it there, and if you save the
1661buffer, the edited version will replace the version in the Tar buffer. 1617buffer, the edited version will replace the version in the Tar buffer.
1662@kbd{v} extracts a file into a buffer in View mode (@pxref{View 1618Clicking with the mouse on the file name in the Tar buffer does
1663Mode}). @kbd{o} extracts the file and displays it in another window, 1619likewise. @kbd{v} extracts a file into a buffer in View mode
1664so you could edit the file and operate on the archive simultaneously. 1620(@pxref{View Mode}). @kbd{o} extracts the file and displays it in
1665@kbd{d} marks a file for deletion when you later use @kbd{x}, and 1621another window, so you could edit the file and operate on the archive
1622simultaneously.
1623
1624 @kbd{d} marks a file for deletion when you later use @kbd{x}, and
1666@kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the 1625@kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the
1667archive to disk and @kbd{R} renames a file within the archive. 1626archive to disk and @kbd{R} renames a file within the archive.
1668@kbd{g} reverts the buffer from the archive on disk. 1627@kbd{g} reverts the buffer from the archive on disk. The keys
1669 1628@kbd{M}, @kbd{G}, and @kbd{O} change the file's permission bits,
1670 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission 1629group, and owner, respectively.
1671bits, group, and owner, respectively.
1672
1673 If your display supports colors and the mouse, moving the mouse
1674pointer across a file name highlights that file name, indicating that
1675you can click on it. Clicking @kbd{Mouse-2} on the highlighted file
1676name extracts the file into a buffer and displays that buffer.
1677 1630
1678 Saving the Tar buffer writes a new version of the archive to disk with 1631 Saving the Tar buffer writes a new version of the archive to disk with
1679the changes you made to the components. 1632the changes you made to the components.
@@ -1690,19 +1643,20 @@ requires the appropriate uncompression program.
1690@cindex @code{zip} 1643@cindex @code{zip}
1691@cindex @code{lzh} 1644@cindex @code{lzh}
1692@cindex @code{zoo} 1645@cindex @code{zoo}
1646@cindex @code{7z}
1693@pindex arc 1647@pindex arc
1694@pindex jar 1648@pindex jar
1695@pindex zip 1649@pindex zip
1696@pindex rar 1650@pindex rar
1697@pindex lzh 1651@pindex lzh
1698@pindex zoo 1652@pindex zoo
1653@pindex 7z
1699@cindex Java class archives 1654@cindex Java class archives
1700@cindex unzip archives 1655@cindex unzip archives
1701 A separate but similar Archive mode is used for archives produced by 1656 A separate but similar Archive mode is used for @code{arc},
1702the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, 1657@code{jar}, @code{lzh}, @code{zip}, @code{rar}, @code{7z}, and
1703@code{rar}, and @code{zoo}, which have extensions corresponding to the 1658@code{zoo} archives, as well as @code{exe} files that are
1704program names. Archive mode also works for those @code{exe} files 1659self-extracting executables.
1705that are self-extracting executables.
1706 1660
1707 The key bindings of Archive mode are similar to those in Tar mode, 1661 The key bindings of Archive mode are similar to those in Tar mode,
1708with the addition of the @kbd{m} key which marks a file for subsequent 1662with the addition of the @kbd{m} key which marks a file for subsequent
@@ -1712,11 +1666,11 @@ information, for those archive types where it won't fit in a single
1712line. Operations such as renaming a subfile, or changing its mode or 1666line. Operations such as renaming a subfile, or changing its mode or
1713owner, are supported only for some of the archive formats. 1667owner, are supported only for some of the archive formats.
1714 1668
1715 Unlike Tar mode, Archive mode runs the archiving program to unpack 1669 Unlike Tar mode, Archive mode runs the archiving programs to unpack
1716and repack archives. Details of the program names and their options 1670and repack archives. However, you don't need these programs to look
1717can be set in the @samp{Archive} Customize group. However, you don't 1671at the archive table of contents, only to extract or manipulate the
1718need these programs to look at the archive table of contents, only to 1672subfiles in the archive. Details of the program names and their
1719extract or manipulate the subfiles in the archive. 1673options can be set in the @samp{Archive} Customize group.
1720 1674
1721@node Remote Files 1675@node Remote Files
1722@section Remote Files 1676@section Remote Files
@@ -1748,16 +1702,14 @@ Emacs chooses the method as follows:
1748 1702
1749@enumerate 1703@enumerate
1750@item 1704@item
1751If the host name starts with @samp{ftp.} (with dot), then Emacs uses 1705If the host name starts with @samp{ftp.} (with dot), Emacs uses FTP.
1752FTP.
1753@item 1706@item
1754If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses 1707If the user name is @samp{ftp} or @samp{anonymous}, Emacs uses FTP.
1755FTP.
1756@item 1708@item
1757If the variable @code{tramp-default-method} is set to @samp{ftp}, 1709If the variable @code{tramp-default-method} is set to @samp{ftp},
1758then Emacs uses FTP. 1710Emacs uses FTP.
1759@item 1711@item
1760If @command{ssh-agent} is running, then Emacs uses @command{scp}. 1712If @command{ssh-agent} is running, Emacs uses @command{scp}.
1761@item 1713@item
1762Otherwise, Emacs uses @command{ssh}. 1714Otherwise, Emacs uses @command{ssh}.
1763@end enumerate 1715@end enumerate
@@ -1769,32 +1721,31 @@ variable @code{tramp-mode} to @code{nil}. You can turn off the
1769feature in individual cases by quoting the file name with @samp{/:} 1721feature in individual cases by quoting the file name with @samp{/:}
1770(@pxref{Quoted File Names}). 1722(@pxref{Quoted File Names}).
1771 1723
1724@cindex ange-ftp
1772 Remote file access through FTP is handled by the Ange-FTP package, which 1725 Remote file access through FTP is handled by the Ange-FTP package, which
1773is documented in the following. Remote file access through the other 1726is documented in the following. Remote file access through the other
1774methods is handled by the Tramp package, which has its own manual. 1727methods is handled by the Tramp package, which has its own manual.
1775@xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. 1728@xref{Top, The Tramp Manual,, tramp, The Tramp Manual}.
1776 1729
1777When the Ange-FTP package is used, Emacs logs in through FTP using 1730@vindex ange-ftp-default-user
1778your user name or the name @var{user}. It may ask you for a password 1731@cindex user name for remote file access
1779from time to time (@pxref{Passwords}); this is used for logging in on 1732 When the Ange-FTP package is used, Emacs logs in through FTP using
1780@var{host}. The form using @var{port} allows you to access servers 1733the name @var{user}, if that is specified in the remote file name. If
1781running on a non-default TCP port. 1734@var{user} is unspecified, Emacs logs in using your user name on the
1735local system; but if you set the variable @code{ange-ftp-default-user}
1736to a string, that string is used instead. When logging in, Emacs may
1737also ask for a password.
1782 1738
1783@cindex backups for remote files 1739@cindex backups for remote files
1784@vindex ange-ftp-make-backup-files 1740@vindex ange-ftp-make-backup-files
1785 If you want to disable backups for remote files, set the variable 1741 For performance reasons, Emacs does not make backup files for files
1786@code{ange-ftp-make-backup-files} to @code{nil}. 1742accessed via FTP by default. To make it do so, change the variable
1743@code{ange-ftp-make-backup-files} to a non-@code{nil} value.
1787 1744
1788 By default, the auto-save files (@pxref{Auto Save Files}) for remote 1745 By default, auto-save files for remote files are made in the
1789files are made in the temporary file directory on the local machine. 1746temporary file directory on the local machine, as specified by the
1790This is achieved using the variable @code{auto-save-file-name-transforms}. 1747variable @code{auto-save-file-name-transforms}. @xref{Auto Save
1791 1748Files}.
1792@cindex ange-ftp
1793@vindex ange-ftp-default-user
1794@cindex user name for remote file access
1795 Normally, if you do not specify a user name in a remote file name,
1796that means to use your own user name. But if you set the variable
1797@code{ange-ftp-default-user} to a string, that string is used instead.
1798 1749
1799@cindex anonymous FTP 1750@cindex anonymous FTP
1800@vindex ange-ftp-generate-anonymous-password 1751@vindex ange-ftp-generate-anonymous-password
@@ -1950,10 +1901,10 @@ images as thumbnails.
1950@findex filesets-init 1901@findex filesets-init
1951 If you regularly edit a certain group of files, you can define them 1902 If you regularly edit a certain group of files, you can define them
1952as a @dfn{fileset}. This lets you perform certain operations, such as 1903as a @dfn{fileset}. This lets you perform certain operations, such as
1953visiting, @code{query-replace}, and shell commands on all the files 1904visiting, @code{query-replace}, and shell commands on all the files at
1954at once. To make use of filesets, you must first add the expression 1905once. To make use of filesets, you must first add the expression
1955@code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}). 1906@code{(filesets-init)} to your init file (@pxref{Init File}). This
1956This adds a @samp{Filesets} menu to the menu bar. 1907adds a @samp{Filesets} menu to the menu bar.
1957 1908
1958@findex filesets-add-buffer 1909@findex filesets-add-buffer
1959@findex filesets-remove-buffer 1910@findex filesets-remove-buffer
@@ -1980,7 +1931,7 @@ files in a fileset, and @kbd{M-x filesets-close} to close them. Use
1980a fileset. These commands are also available from the @samp{Filesets} 1931a fileset. These commands are also available from the @samp{Filesets}
1981menu, where each existing fileset is represented by a submenu. 1932menu, where each existing fileset is represented by a submenu.
1982 1933
1983 Emacs uses the concept of a fileset elsewhere @pxref{Version 1934 @xref{Version Control}, for a different concept of ``filesets'':
1984Control} to describe sets of files to be treated as a group for 1935groups of files bundled together for version control operations.
1985purposes of version control operations. Those filesets are unnamed 1936Filesets of that type are unnamed, and do not persist across Emacs
1986and do not persist across Emacs sessions. 1937sessions.
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 7a605100796..bae78d94744 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -7,17 +7,14 @@
7@cindex typos, fixing 7@cindex typos, fixing
8@cindex mistakes, correcting 8@cindex mistakes, correcting
9 9
10 In this chapter we describe the commands that are especially useful 10 In this chapter we describe commands that are useful when you catch
11when you catch a mistake in your text after you have made it, or 11a mistake while editing. The most fundamental command for correcting
12change your mind while composing text on the fly. 12erroneous editing is the undo command @kbd{C-/} (which is also bound
13 13to @kbd{C-x u} and @kbd{C-_}). This undoes a single command, or a
14 The most fundamental command for correcting erroneous editing is the 14part of a command (as in the case of @code{query-replace}), or several
15undo command @kbd{C-/} (which is also bound to @kbd{C-x u} and 15consecutive character insertions. Consecutive repetitions of
16@kbd{C-_}). This undoes a single command, or a part of a command (as 16@kbd{C-/} undo earlier and earlier changes, back to the limit of the
17in the case of @code{query-replace}), or several consecutive 17undo information available.
18self-inserting characters. Consecutive repetitions of @kbd{C-/} undo
19earlier and earlier changes, back to the limit of the undo information
20available.
21 18
22 Aside from the commands described here, you can erase text using 19 Aside from the commands described here, you can erase text using
23deletion commands such as @key{DEL} (@code{delete-backward-char}). 20deletion commands such as @key{DEL} (@code{delete-backward-char}).
@@ -231,18 +228,19 @@ case-convert it and go on typing. @xref{Case}.@refill
231 This section describes the commands to check the spelling of a 228 This section describes the commands to check the spelling of a
232single word or of a portion of a buffer. These commands only work if 229single word or of a portion of a buffer. These commands only work if
233the spelling checker program Aspell, Ispell or Hunspell is installed. 230the spelling checker program Aspell, Ispell or Hunspell is installed.
234Aspell, Ispell or Hunspell are not part of Emacs, but one or the other 231These programs are not part of Emacs, but one of them is usually
235is usually installed in GNU/Linux and other free operating systems. 232installed in GNU/Linux and other free operating systems.
236@ifnottex 233@ifnottex
237@xref{Top, Aspell,, aspell, The Aspell Manual}. 234@xref{Top, Aspell,, aspell, The Aspell Manual}.
238@end ifnottex 235@end ifnottex
239 236
240@table @kbd 237@table @kbd
241@item M-$ 238@item M-$
242Check and correct spelling of the active region or the word at point 239Check and correct spelling of the word at point (@code{ispell-word}).
243(@code{ispell-word}). 240If the region is active, do it for all words in the region instead.
244@item M-x ispell 241@item M-x ispell
245Check and correct spelling in the active region or the entire buffer. 242Check and correct spelling of all words in the buffer. If the region
243is active, do it for all words in the region instead.
246@item M-x ispell-buffer 244@item M-x ispell-buffer
247Check and correct spelling in the buffer. 245Check and correct spelling in the buffer.
248@item M-x ispell-region 246@item M-x ispell-region
@@ -355,14 +353,13 @@ Show the list of options.
355@end table 353@end table
356 354
357@findex ispell-complete-word 355@findex ispell-complete-word
358 In Text mode and related modes, the command @kbd{M-@key{TAB}} 356 In Text mode and related modes, @kbd{M-@key{TAB}}
359(@code{ispell-complete-word}) shows a list of completions based on 357(@code{ispell-complete-word}) performs in-buffer completion based on
360spelling correction. Insert the beginning of a word, and then type 358spelling correction. Insert the beginning of a word, and then type
361@kbd{M-@key{TAB}}; the command displays a completion list window. (If 359@kbd{M-@key{TAB}}; this shows shows a list of completions. (If your
362your window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC} 360window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC}
363@key{TAB}} or @kbd{C-M-i}.) To choose one of the completions listed, 361@key{TAB}} or @kbd{C-M-i}.) Each completion is listed with a digit or
364click @kbd{Mouse-2} or @kbd{Mouse-1} fast on it, or move the cursor 362character; type that digit or character to choose it.
365there in the completions window and type @key{RET}. @xref{Text Mode}.
366 363
367@cindex @code{ispell} program 364@cindex @code{ispell} program
368@findex ispell-kill-ispell 365@findex ispell-kill-ispell
@@ -370,29 +367,27 @@ there in the completions window and type @key{RET}. @xref{Text Mode}.
370to run, waiting for something to do, so that subsequent spell checking 367to run, waiting for something to do, so that subsequent spell checking
371commands complete more quickly. If you want to get rid of the 368commands complete more quickly. If you want to get rid of the
372process, use @kbd{M-x ispell-kill-ispell}. This is not usually 369process, use @kbd{M-x ispell-kill-ispell}. This is not usually
373necessary, since the process uses no time except when you do spelling 370necessary, since the process uses no processor time except when you do
374correction. 371spelling correction.
375 372
376@vindex ispell-dictionary 373@vindex ispell-dictionary
377@vindex ispell-local-dictionary 374@vindex ispell-local-dictionary
378@vindex ispell-personal-dictionary 375@vindex ispell-personal-dictionary
379@vindex ispell-complete-word-dict 376@findex ispell-change-dictionary
380 Ispell, Aspell and Hunspell use two dictionaries together for spell checking: 377 Ispell, Aspell and Hunspell look up spelling in two dictionaries:
381the standard dictionary and your private dictionary. The standard 378the standard dictionary and your personal dictionary. The standard
382dictionary is specified by @code{ispell-local-dictionary} or, 379dictionary is specified by the variable @code{ispell-local-dictionary}
383if @code{nil}, by @code{ispell-dictionary}. If both are @code{nil} 380or, if that is @code{nil}, by the variable @code{ispell-dictionary}.
384the default dictionary is selected. The command 381If both are @code{nil}, the spelling program's default dictionary is
385@kbd{M-x ispell-change-dictionary} sets the standard dictionary for 382used. The command @kbd{M-x ispell-change-dictionary} sets the
386the buffer and then restarts the subprocess, so that it will use a 383standard dictionary for the buffer and then restarts the subprocess,
387different standard dictionary. Personal dictionary is specified by 384so that it will use a different standard dictionary. Your personal
388@code{ispell-personal-dictionary}. If @code{nil}, default value is 385dictionary is specified by the variable
389used. 386@code{ispell-personal-dictionary}. If that is @code{nil}, the
390 387spelling program looks for a personal dictionary in a default
391 Set variable @code{ispell-dictionary} to select a specific default 388location.
392dictionary for all your documents. Set variable
393@code{ispell-local-dictionary} in the local variables section to
394select a specific dictionary for a given document.
395 389
390@vindex ispell-complete-word-dict
396 A separate dictionary is used for word completion. The variable 391 A separate dictionary is used for word completion. The variable
397@code{ispell-complete-word-dict} specifies the file name of this 392@code{ispell-complete-word-dict} specifies the file name of this
398dictionary. The completion dictionary must be different because it 393dictionary. The completion dictionary must be different because it
@@ -400,16 +395,14 @@ cannot use root and affix information. For some languages, there
400is a spell checking dictionary but no word completion dictionary. 395is a spell checking dictionary but no word completion dictionary.
401 396
402@cindex Flyspell mode 397@cindex Flyspell mode
398@cindex mode, Flyspell
403@findex flyspell-mode 399@findex flyspell-mode
404@findex turn-on-flyspell 400 Flyspell mode is a minor mode that performs automatic spell checking
405 Flyspell mode is a fully-automatic way to check spelling as you edit 401as you type. When it finds a word that it does not recognize, it
406in Emacs. It operates by checking words as you change or insert them. 402highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell
407When it finds a word that it does not recognize, it highlights that 403mode in the current buffer. To enable Flyspell mode in all text mode
408word. This does not interfere with your editing, but when you see the 404buffers, add @code{flyspell-mode} to @code{text-mode-hook}.
409highlighted word, you can move to it and fix it. Type @kbd{M-x 405@xref{Hooks}.
410flyspell-mode} to enable or disable this mode in the current buffer.
411To enable Flyspell mode in all text mode buffers, add
412@code{turn-on-flyspell} to @code{text-mode-hook}.
413 406
414 When Flyspell mode highlights a word as misspelled, you can click on 407 When Flyspell mode highlights a word as misspelled, you can click on
415it with @kbd{Mouse-2} to display a menu of possible corrections and 408it with @kbd{Mouse-2} to display a menu of possible corrections and
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi
index ee417624120..e5853a17dd0 100644
--- a/doc/emacs/fortran-xtra.texi
+++ b/doc/emacs/fortran-xtra.texi
@@ -479,7 +479,7 @@ variable @code{fortran-break-before-delimiters} is @code{nil}.
479Otherwise (and by default), the break comes before the delimiter. 479Otherwise (and by default), the break comes before the delimiter.
480 480
481 To enable Auto Fill in all Fortran buffers, add 481 To enable Auto Fill in all Fortran buffers, add
482@code{turn-on-auto-fill} to @code{fortran-mode-hook}. 482@code{auto-fill-mode} to @code{fortran-mode-hook}.
483@iftex 483@iftex
484@xref{Hooks,,, emacs, the Emacs Manual}. 484@xref{Hooks,,, emacs, the Emacs Manual}.
485@end iftex 485@end iftex
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 4c239d364f0..49222451cce 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -956,55 +956,43 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
956@cindex Scroll Bar mode 956@cindex Scroll Bar mode
957@cindex mode, Scroll Bar 957@cindex mode, Scroll Bar
958 958
959 On graphical displays, Emacs normally makes a @dfn{scroll bar} at 959 On graphical displays, there is a @dfn{scroll bar} on the side of
960the left of each Emacs window, running the height of the 960each Emacs window. Clicking @kbd{Mouse-1} on the scroll bar's up and
961window.@footnote{Placing it at the left is usually more useful with 961down buttons scrolls the window by one line at a time. Clicking
962overlapping frames with text starting at the left margin.} 962@kbd{Mouse-1} above or below the scroll bar's inner box scrolls the
963 963window by nearly the entire height of the window, like @kbd{M-v} and
964 When Emacs is compiled with GTK+ support on the X Window System, or 964@kbd{C-v} respectively (@pxref{Moving Point}). Dragging the inner box
965in operating systems such as Microsoft Windows or Mac OS, you can use 965scrolls continuously.
966the scroll bar as you do in other graphical applications. If you 966
967click @kbd{Mouse-1} on the scroll bar's up and down buttons, that 967 If Emacs is compiled on the X Window System without X toolkit
968scrolls the window by one line at a time. Clicking @kbd{Mouse-1} 968support, the scroll bar behaves differently. Clicking @kbd{Mouse-1}
969above or below the scroll bar's inner box scrolls the window by nearly 969anywhere on the scroll bar scrolls forward like @kbd{C-v}, while
970the entire height of the window, like @kbd{M-v} and @kbd{C-v} 970@kbd{Mouse-3} scrolls backward like @kbd{M-v}. Clicking @kbd{Mouse-2}
971respectively (@pxref{Moving Point}). Dragging the inner box with 971in the scroll bar lets you drag the inner box up and down.
972@kbd{Mouse-1} scrolls the window continuously.
973
974 If Emacs is compiled without GTK+ support on the X Window System,
975the scroll bar behaves differently. The scroll bar's inner box is
976drawn to represent the portion of the buffer currently displayed, with
977the entire height of the scroll bar representing the entire length of
978the buffer. @kbd{Mouse-1} anywhere on the scroll bar scrolls forward
979like @kbd{C-v}, and @kbd{Mouse-3} scrolls backward like @kbd{M-v}.
980Clicking @kbd{Mouse-2} in the scroll bar lets you move or drag the
981inner box up and down.
982
983 You can also click @kbd{C-Mouse-2} in the scroll bar to split a
984window vertically. The split occurs on the line where you click.
985 972
986@findex scroll-bar-mode 973@findex scroll-bar-mode
987@vindex scroll-bar-mode
988 You can toggle the use of the scroll bar with the command @kbd{M-x
989scroll-bar-mode}. With a prefix argument, this command turns use of
990scroll bars on if and only if the argument is positive. This command
991applies to all frames, including frames yet to be created. Customize
992the variable @code{scroll-bar-mode} to control the use of scroll bars
993at startup. You can use it to specify that they are placed at the
994right of windows if you prefer that. You have to set this variable
995through the @samp{Customize} interface (@pxref{Easy Customization}),
996or it will not work properly. You can also use the X resource
997@samp{verticalScrollBars} to control the initial setting of Scroll Bar
998mode. @xref{Resources}.
999
1000@findex toggle-scroll-bar 974@findex toggle-scroll-bar
1001 To enable or disable scroll bars for just the selected frame, use the 975 To toggle the use of scroll bars, type @kbd{M-x scroll-bar-mode}.
976This command applies to all frames, including frames yet to be
977created. To toggle scroll bars for just the selected frame, use the
1002command @kbd{M-x toggle-scroll-bar}. 978command @kbd{M-x toggle-scroll-bar}.
1003 979
980@vindex scroll-bar-mode
981 To control the use of scroll bars at startup, customize the variable
982@code{scroll-bar-mode}. Its value should be either @code{right} (put
983scroll bars on the right side of windows), @code{left} (put them on
984the left), or @code{nil} (disable scroll bars). By default, Emacs
985puts scroll bars on the right if it was compiled with GTK+ support on
986the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
987bars on the left if compiled on the X Window system without GTK+
988support (following the old convention for X applications).
989
1004@vindex scroll-bar-width 990@vindex scroll-bar-width
1005@cindex width of the scroll bar 991@cindex width of the scroll bar
1006 You can control the scroll bar width by changing the value of the 992 You can also use the X resource @samp{verticalScrollBars} to enable
1007@code{scroll-bar-width} frame parameter. 993or disable the scroll bars (@pxref{Resources}). To control the scroll
994bar width, change the @code{scroll-bar-width} frame parameter
995(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
1008 996
1009@node Wheeled Mice 997@node Wheeled Mice
1010@section Scrolling With ``Wheeled'' Mice 998@section Scrolling With ``Wheeled'' Mice
@@ -1082,36 +1070,33 @@ menus' visual appearance.
1082@cindex mode, Tool Bar 1070@cindex mode, Tool Bar
1083@cindex icons, toolbar 1071@cindex icons, toolbar
1084 1072
1085 The @dfn{tool bar} is a line (or lines) of icons at the top of the 1073 On graphical displays, Emacs puts a @dfn{tool bar} at the top of
1086Emacs window, just below the menu bar. You can click on these icons 1074each frame, just below the menu bar. This is a row of icons which you
1087with the mouse to do various jobs. 1075can click on with the mouse to invoke various commands.
1088
1089 The global tool bar contains general commands. Some major modes
1090define their own tool bars to replace it. A few ``special'' modes
1091that are not designed for ordinary editing remove some items from the
1092global tool bar.
1093 1076
1094 Tool bars work only on a graphical display. The tool bar uses colored 1077 The global (default) tool bar contains general commands. Some major
1095XPM icons if Emacs was built with XPM support. Otherwise, the tool 1078modes define their own tool bars; whenever a buffer with such a major
1096bar uses monochrome icons (PBM or XBM format). 1079mode is current, the mode's tool bar replaces the global tool bar.
1097 1080
1098@findex tool-bar-mode 1081@findex tool-bar-mode
1099@vindex tool-bar-mode 1082@vindex tool-bar-mode
1100 You can turn display of tool bars on or off with @kbd{M-x 1083 To toggle the use of tool bars, type @kbd{M-x tool-bar-mode}. This
1101tool-bar-mode} or by customizing the option @code{tool-bar-mode}. 1084command applies to all frames, including frames yet to be created. To
1085control the use of tool bars at startup, customize the variable
1086@code{tool-bar-mode}.
1102 1087
1103@vindex tool-bar-style 1088@vindex tool-bar-style
1104@cindex Tool Bar style 1089@cindex Tool Bar style
1105 When Emacs is compiled with GTK+ support, tool bars can have text and images. 1090 When Emacs is compiled with GTK+ support, each tool bar item can
1106Customize @code{tool-bar-style} to select style. The default style is 1091consist of an image, or a text label, or both. By default, Emacs
1107the same as for the desktop in the Gnome case. If no default is found, 1092follows the Gnome desktop's tool bar style setting; if none is
1108the tool bar uses just images. 1093defined, it displays tool bar items as just images. To impose a
1094specific tool bar style, customize the variable @code{tool-bar-style}.
1109 1095
1110@cindex Tool Bar position 1096@cindex Tool Bar position
1111 You can also control the placement of the tool bar for the GTK+ tool bar 1097 You can also control the placement of the tool bar for the GTK+ tool
1112with the frame parameter @code{tool-bar-position}. 1098bar with the frame parameter @code{tool-bar-position}. @xref{Frame
1113For a detailed description of frame parameters and customization, 1099Parameters,,, elisp, The Emacs Lisp Reference Manual}.
1114see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}.
1115 1100
1116@node Dialog Boxes 1101@node Dialog Boxes
1117@section Using Dialog Boxes 1102@section Using Dialog Boxes
@@ -1186,11 +1171,11 @@ options for displaying tooltips, use @kbd{M-x customize-group
1186customizing the windows that display tooltips. 1171customizing the windows that display tooltips.
1187 1172
1188@vindex x-gtk-use-system-tooltips 1173@vindex x-gtk-use-system-tooltips
1189 If Emacs is built with GTK support, it displays tooltips via GTK, 1174 If Emacs is built with GTK+ support, it displays tooltips via GTK+,
1190using the default appearance of GTK tooltips. To disable this, change 1175using the default appearance of GTK+ tooltips. To disable this,
1191the variable @code{x-gtk-use-system-tooltips} to @code{nil}. If you 1176change the variable @code{x-gtk-use-system-tooltips} to @code{nil}.
1192do this, or if Emacs is built without GTK support, the @code{tooltip} 1177If you do this, or if Emacs is built without GTK+ support, the
1193face specifies most attributes of the tooltip text. 1178@code{tooltip} face specifies most attributes of the tooltip text.
1194 1179
1195@node Mouse Avoidance 1180@node Mouse Avoidance
1196@section Mouse Avoidance 1181@section Mouse Avoidance
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index a85edf101e5..c024d428511 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -70,7 +70,7 @@ meanings for it, but they all support @key{F1} for help.)
70* Package Keywords:: Finding Lisp libraries by keywords (topics). 70* Package Keywords:: Finding Lisp libraries by keywords (topics).
71* Language Help:: Help relating to international language support. 71* Language Help:: Help relating to international language support.
72* Misc Help:: Other help commands. 72* Misc Help:: Other help commands.
73* Help Files:: Commands to display auxilliary help files. 73* Help Files:: Commands to display auxiliary help files.
74* Help Echo:: Help on active text and tooltips (`balloon help'). 74* Help Echo:: Help on active text and tooltips (`balloon help').
75@end menu 75@end menu
76 76
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 8689e9c8324..6237b00c2ee 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -736,7 +736,7 @@ insert rectangles, and commands to make blank rectangles.
736k} (@code{kill-rectangle}) to remove the text and and save it as the 736k} (@code{kill-rectangle}) to remove the text and and save it as the
737@dfn{last killed rectangle}. In both cases, erasing the 737@dfn{last killed rectangle}. In both cases, erasing the
738region-rectangle is like erasing the specified text on each line of 738region-rectangle is like erasing the specified text on each line of
739the rectange; if there is any following text on the line, it moves 739the rectangle; if there is any following text on the line, it moves
740backwards to fill the gap. 740backwards to fill the gap.
741 741
742 ``Killing'' a rectangle is not killing in the usual sense; the 742 ``Killing'' a rectangle is not killing in the usual sense; the
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index ac81377aec9..4676983fc67 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -147,7 +147,7 @@ beginning of the line and then executing the macro.
147@findex kmacro-start-macro 147@findex kmacro-start-macro
148@findex kmacro-end-macro 148@findex kmacro-end-macro
149 In addition to the @key{F3} and @key{F4} commands described above, 149 In addition to the @key{F3} and @key{F4} commands described above,
150Emacs also supports an older set of keybindings for defining and 150Emacs also supports an older set of key bindings for defining and
151executing keyboard macros. To begin a macro definition, type @kbd{C-x 151executing keyboard macros. To begin a macro definition, type @kbd{C-x
152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument 152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument
153appends this definition to the last keyboard macro. To end a macro 153appends this definition to the last keyboard macro. To end a macro
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index f4a5a2858cf..5a97fa8460b 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -36,7 +36,7 @@ Support}), but we hope to improve it in the future.
36 36
37 By default, the @key{alt} and @key{option} keys are the same as 37 By default, the @key{alt} and @key{option} keys are the same as
38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and 38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and
39Emacs provides a set of keybindings using this modifier key that mimic 39Emacs provides a set of key bindings using this modifier key that mimic
40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You 40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
41can change these bindings in the usual way (@pxref{Key Bindings}). 41can change these bindings in the usual way (@pxref{Key Bindings}).
42 42
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index e84b4c9f080..bbe42551345 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -219,11 +219,11 @@ is sometimes available in ordinary buffers too. @xref{Symbol
219Completion}. 219Completion}.
220 220
221@menu 221@menu
222* Example: Completion Example. Examples of using completion. 222* Completion Example:: Examples of using completion.
223* Commands: Completion Commands. A list of completion commands. 223* Completion Commands:: A list of completion commands.
224* Strict Completion:: Different types of completion. 224* Completion Exit:: Completion and minibuffer text submission.
225* Completion Styles:: How completion matches are chosen. 225* Completion Styles:: How completion matches are chosen.
226* Options: Completion Options. Options for completion. 226* Completion Options:: Options for completion.
227@end menu 227@end menu
228 228
229@node Completion Example 229@node Completion Example
@@ -274,7 +274,7 @@ Complete up to one word from the minibuffer text before point
274arguments that often include spaces, such as file names. 274arguments that often include spaces, such as file names.
275@item @key{RET} 275@item @key{RET}
276Submit the text in the minibuffer as the argument, possibly completing 276Submit the text in the minibuffer as the argument, possibly completing
277first (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. 277first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}.
278@item ? 278@item ?
279Display a list of completions (@code{minibuffer-completion-help}). 279Display a list of completions (@code{minibuffer-completion-help}).
280@end table 280@end table
@@ -337,42 +337,68 @@ While in the completion list buffer, this moves point to the previous
337completion alternative (@code{previous-completion}). 337completion alternative (@code{previous-completion}).
338@end table 338@end table
339 339
340@node Strict Completion 340@node Completion Exit
341@subsection Strict Completion 341@subsection Completion Exit
342 342
343 There are three ways that the @key{RET} 343@kindex RET @r{(completion in minibuffer)}
344(@code{minibuffer-complete-and-exit}) completion command can act, 344@findex minibuffer-complete-and-exit
345depending on how the argument will be used. 345 When a command reads an argument using the minibuffer with
346completion, it also controls what happens when you type @key{RET}
347(@code{minibuffer-complete-and-exit}) to submit the argument. There
348are four types of behavior:
346 349
347@itemize @bullet 350@itemize @bullet
348@item 351@item
349@dfn{Strict} completion accepts only known completion candidates. For 352@dfn{Strict completion} accepts only exact completion matches. Typing
350example, when @kbd{C-x k} reads the name of a buffer to kill, only the 353@key{RET} exits the minibuffer only if the minibuffer text is an exact
351name of an existing buffer makes sense. In strict completion, 354match, or completes to one. Otherwise, Emacs refuses to exit the
352@key{RET} refuses to exit if the text in the minibuffer does not 355minibuffer; instead it tries to complete, and if no completion can be
353complete to an exact match. 356done it momentarily displays @samp{[No match]} after the minibuffer
357text. (You can still leave the minibuffer by typing @kbd{C-g} to
358cancel the command.)
359
360An example of a command that uses this behavior is @kbd{M-x}, since it
361is meaningless for it to accept a non-existent command name.
354 362
355@item 363@item
356@dfn{Cautious} completion is similar to strict completion, except that 364@dfn{Cautious completion} is like strict completion, except @key{RET}
357@key{RET} exits only if the text is an already exact match. 365exits only if the text is already an exact match. If the text
358Otherwise, @key{RET} does not exit, but it does complete the text. If 366completes to an exact match, @key{RET} performs that completion but
359that completes to an exact match, a second @key{RET} will exit. 367does not exit yet; you must type a second @key{RET} to exit.
360 368
361Cautious completion is used for reading file names for files that must 369Cautious completion is used for reading file names for files that must
362already exist, for example. 370already exist, for example.
363 371
364@item 372@item
365@dfn{Permissive} completion allows any input; the completion 373@dfn{Permissive completion} allows any input; the completion
366candidates are just suggestions. For example, when @kbd{C-x C-f} 374candidates are just suggestions. Typing @key{RET} does not complete,
367reads the name of a file to visit, any file name is allowed, including 375it just submits the argument as you have entered it.
368nonexistent file (in case you want to create a file). In permissive
369completion, @key{RET} does not complete, it just submits the argument
370as you have entered it.
371@end itemize
372 376
373 Like the other completion commands, @key{RET} displays a list of all 377@cindex minibuffer confirmation
374possible completions whenever it is supposed to complete but is unable 378@cindex confirming in the minibuffer
375to complete any further. 379@item
380@dfn{Permissive completion with confirmation} is like permissive
381completion, with an exception: if you typed @key{TAB} and this
382completed the text up to some intermediate state (i.e. one that is not
383yet an exact completion match), typing @key{RET} right afterward does
384not submit the argument. Instead, Emacs asks for confirmation by
385momentarily displaying @samp{[Confirm]} after the text; type @key{RET}
386again to confirm and submit the text. This catches a common mistake,
387in which one types @key{RET} before realizing that @key{TAB} did not
388complete as far as desired.
389
390@vindex confirm-nonexistent-file-or-buffer
391You can tweak the confirmation behavior by customizing the variable
392@code{confirm-nonexistent-file-or-buffer}. The default value,
393@code{after-completion}, gives the behavior we have just described.
394If you change it to @code{nil}, Emacs does not ask for confirmation,
395falling back on permissive completion. If you change it to any other
396non-@code{nil} value, Emacs asks for confirmation whether or not the
397preceding command was @key{TAB}.
398
399This behavior is used by most commands that read file names, like
400@kbd{C-x C-f}, and commands that read buffer names, like @kbd{C-x b}.
401@end itemize
376 402
377@node Completion Styles 403@node Completion Styles
378@subsection How Completion Alternatives Are Chosen 404@subsection How Completion Alternatives Are Chosen
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 5745dd7c66c..2357902341e 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1441,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}).
1441@kindex C-c , @key{SPC} 1441@kindex C-c , @key{SPC}
1442Display a list of possible completions for the symbol at point 1442Display a list of possible completions for the symbol at point
1443(@code{semantic-complete-analyze-inline}). This also activates a set 1443(@code{semantic-complete-analyze-inline}). This also activates a set
1444of special keybindings for choosing a completion: @key{RET} accepts 1444of special key bindings for choosing a completion: @key{RET} accepts
1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible 1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible
1446completions, @key{TAB} completes as far as possible and then cycles, 1446completions, @key{TAB} completes as far as possible and then cycles,
1447and @kbd{C-g} or any other key aborts completion. 1447and @kbd{C-g} or any other key aborts completion.
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index b894d01b9bb..71c23655608 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1198,7 +1198,7 @@ Address mode:
1198 1198
1199@c FIXME goto-addr.el commentary says to use goto-address instead. 1199@c FIXME goto-addr.el commentary says to use goto-address instead.
1200@smallexample 1200@smallexample
1201(add-hook 'rmail-show-message-hook (lambda () (goto-address-mode 1))) 1201(add-hook 'rmail-show-message-hook 'goto-address-mode)
1202@end smallexample 1202@end smallexample
1203 1203
1204@noindent 1204@noindent
@@ -1242,11 +1242,12 @@ coding system, the result should be readable.
1242@node Rmail Editing 1242@node Rmail Editing
1243@section Editing Within a Message 1243@section Editing Within a Message
1244 1244
1245 Most of the usual Emacs keybindings are available in Rmail mode, though a 1245 Most of the usual Emacs key bindings are available in Rmail mode,
1246few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by Rmail for 1246though a few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by
1247other purposes. However, the Rmail buffer is normally read only, and 1247Rmail for other purposes. However, the Rmail buffer is normally read
1248most of the letters are redefined as Rmail commands. If you want to 1248only, and most of the letters are redefined as Rmail commands. If you
1249edit the text of a message, you must use the Rmail command @kbd{e}. 1249want to edit the text of a message, you must use the Rmail command
1250@kbd{e}.
1250 1251
1251@table @kbd 1252@table @kbd
1252@item e 1253@item e
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 14d4c678085..fcc31e30988 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -189,7 +189,7 @@ is sometimes useful to have this information.
189 189
190 @var{cs} describes the character set of the text in the buffer 190 @var{cs} describes the character set of the text in the buffer
191(@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates 191(@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates
192no special character set handling (with the possible expection of 192no special character set handling (with the possible exception of
193end-of-line conventions, described in the next paragraph). @samp{=} 193end-of-line conventions, described in the next paragraph). @samp{=}
194means no conversion whatsoever, and is usually used for files 194means no conversion whatsoever, and is usually used for files
195containing non-textual data. Other characters represent various 195containing non-textual data. Other characters represent various
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index caf03291fbc..a8bd1cdf18d 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -60,7 +60,6 @@ Incremental search backward (@code{isearch-backward}).
60 or else edit the search string. 60 or else edit the search string.
61* Isearch Scroll:: Scrolling during an incremental search. 61* Isearch Scroll:: Scrolling during an incremental search.
62* Isearch Minibuffer:: Incremental search of the minibuffer history. 62* Isearch Minibuffer:: Incremental search of the minibuffer history.
63* Slow Isearch:: Incremental search features for slow terminals.
64@end menu 63@end menu
65 64
66@node Basic Isearch 65@node Basic Isearch
@@ -167,23 +166,27 @@ going past the original starting point of the search, it changes to
167you have already seen. 166you have already seen.
168 167
169@cindex search ring 168@cindex search ring
169@kindex M-n @r{(Incremental search)}
170@kindex M-p @r{(Incremental search)}
170 To reuse earlier search strings, use the @dfn{search ring}. The 171 To reuse earlier search strings, use the @dfn{search ring}. The
171commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a 172commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a
172search string to reuse. These commands leave the selected search ring 173search string to reuse. These commands leave the selected search ring
173element in the minibuffer, where you can edit it. To edit the current 174element in the minibuffer, where you can edit it.
174search string in the minibuffer without replacing it with items from 175
175the search ring, type @kbd{M-e}. Type @kbd{C-s} or @kbd{C-r} to 176@kindex M-e @r{(Incremental search)}
176terminate editing the string and search for it. 177 To edit the current search string in the minibuffer without
178replacing it with items from the search ring, type @kbd{M-e}. Type
179@kbd{C-s} or @kbd{C-r} to finish editing the string and search for it.
177 180
178@node Error in Isearch 181@node Error in Isearch
179@subsection Errors in Incremental Search 182@subsection Errors in Incremental Search
180 183
181 If your string is not found at all, the echo area says @samp{Failing 184 If your string is not found at all, the echo area says @samp{Failing
182I-Search}. The cursor is after the place where Emacs found as much of 185I-Search}, and the cursor moves past the place where Emacs found as
183your string as it could. Thus, if you search for @samp{FOOT}, and 186much of your string as it could. Thus, if you search for @samp{FOOT},
184there is no @samp{FOOT}, you might see the cursor after the @samp{FOO} 187and there is no @samp{FOOT}, you might see the cursor after the
185in @samp{FOOL}. In the echo area, the part of the search string that 188@samp{FOO} in @samp{FOOL}. In the echo area, the part of the search
186failed to match is highlighted using the customizable face 189string that failed to match is highlighted using the face
187@code{isearch-fail}. 190@code{isearch-fail}.
188 191
189 At this point, there are several things you can do. If your string 192 At this point, there are several things you can do. If your string
@@ -196,6 +199,7 @@ search string the characters that could not be found (the @samp{T} in
196entirely, returning point to where it was when the search started. 199entirely, returning point to where it was when the search started.
197 200
198@cindex quitting (in search) 201@cindex quitting (in search)
202@kindex C-g @r{(Incremental search)}
199 The quit command, @kbd{C-g}, does special things during searches; 203 The quit command, @kbd{C-g}, does special things during searches;
200just what it does depends on the status of the search. If the search 204just what it does depends on the status of the search. If the search
201has found what you specified and is waiting for input, @kbd{C-g} 205has found what you specified and is waiting for input, @kbd{C-g}
@@ -264,69 +268,77 @@ use it (@pxref{Rebinding}).
264 268
265@vindex isearch-mode-map 269@vindex isearch-mode-map
266 When incremental search is active, you can type @kbd{C-h C-h} to 270 When incremental search is active, you can type @kbd{C-h C-h} to
267access interactive help options, including a list of special 271access interactive help options, including a list of special key
268keybindings. These keybindings are part of the keymap 272bindings. These key bindings are part of the keymap
269@code{isearch-mode-map} (@pxref{Keymaps}). 273@code{isearch-mode-map} (@pxref{Keymaps}).
270 274
271@node Isearch Yank 275@node Isearch Yank
272@subsection Isearch Yanking 276@subsection Isearch Yanking
273 277
278@kindex C-y @r{(Incremental search)}
279@kindex M-y @r{(Incremental search)}
280@findex isearch-yank-kill
281@findex isearch-yank-pop
274 Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) 282 Within incremental search, @kbd{C-y} (@code{isearch-yank-kill})
275copies text from the kill ring into the search string. It uses the 283appends the current kill to the search string. @kbd{M-y}
276same text that @kbd{C-y}, outside of incremental search, would 284(@code{isearch-yank-pop}), if called after @kbd{C-y}, replaces that
277normally yank into the buffer. @kbd{Mouse-2} in the echo area does 285appended text with an earlier kill, similar to the usual @kbd{M-y}
278the same. @xref{Yanking}. 286(@code{yank-pop}) command (@pxref{Yanking}). @kbd{Mouse-2} appends
279 287the current X selection (@pxref{Primary Selection}).
280 @kbd{C-w} (@code{isearch-yank-word-or-char}) grabs the next 288
281character or word at point, and adds it to the search string. This is 289@kindex C-w @r{(Incremental search)}
282convenient for searching for another occurrence of the text at point. 290@findex isearch-yank-word-or-char
283(The decision, whether to copy a character or a word, is heuristic.) 291 @kbd{C-w} (@code{isearch-yank-word-or-char}) appends the next
284 292character or word at point to the search string. This is an easy way
285 Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) grabs the rest 293to search for another occurrence of the text at point. (The decision
286of the current line, and adds it to the search string. If point is 294of whether to copy a character or a word is heuristic.)
287already at the end of a line, it grabs the entire next line. 295
296@kindex M-s C-e @r{(Incremental search)}
297@findex isearch-yank-line
298 Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) appends the rest
299of the current line to the search string. If point is already at the
300end of a line, it appends the next line.
288 301
289 If the search is currently case-insensitive, both @kbd{C-w} and 302 If the search is currently case-insensitive, both @kbd{C-w} and
290@kbd{M-s C-e} convert the text they copy to lower case, so that the 303@kbd{M-s C-e} convert the text they copy to lower case, so that the
291search remains case-insensitive. 304search remains case-insensitive.
292 305
293 @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one 306@kindex C-M-w @r{(Incremental search)}
294character at a time: @kbd{C-M-w} deletes the last character from the 307@kindex C-M-y @r{(Incremental search)}
295search string and @kbd{C-M-y} copies the character after point to the 308@findex isearch-del-char
296end of the search string. An alternative method to add the character 309@findex isearch-yank-char
297after point into the search string is to enter the minibuffer by 310 @kbd{C-M-w} (@code{isearch-del-char}) deletes the last character
298@kbd{M-e} and to type @kbd{C-f} at the end of the search string in the 311from the search string, and @kbd{C-M-y} (@code{isearch-yank-char})
299minibuffer. 312appends the character after point to the the search string. An
313alternative method to add the character after point is to enter the
314minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f}
315at the end of the search string in the minibuffer.
300 316
301@node Isearch Scroll 317@node Isearch Scroll
302@subsection Scrolling During Incremental Search 318@subsection Scrolling During Incremental Search
303 319
304@vindex isearch-allow-scroll 320@vindex isearch-allow-scroll
305 You can enable the use of vertical scrolling during incremental 321 Normally, scrolling commands exit incremental search. If you change
306search (without exiting the search) by setting the customizable 322the variable @code{isearch-allow-scroll} to a non-@code{nil} value,
307variable @code{isearch-allow-scroll} to a non-@code{nil} value. This 323that enables the use of the scroll-bar, as well as keyboard scrolling
308applies to using the vertical scroll-bar and to certain keyboard 324commands like @kbd{C-v}, @kbd{M-v}, and @kbd{C-l} (@pxref{Scrolling}).
309commands such as @code{scroll-down-command}, @code{scroll-up-command} 325This applies only to calling these commands via their bound key
310and @code{recenter} (@pxref{Scrolling}). You must run these commands 326sequences---typing @kbd{M-x} will still exit the search. You can give
311via their key sequences to stay in the search---typing @kbd{M-x} will 327prefix arguments to these commands in the usual way. This feature
312terminate the search. You can give prefix arguments to these commands 328won't let you scroll the current match out of visibility, however.
313in the usual way. 329
314 330 The @code{isearch-allow-scroll} feature also affects some other
315 This feature won't let you scroll the current match out of visibility, 331commands, such as @kbd{C-x 2} (@code{split-window-vertically}) and
316however. 332@kbd{C-x ^} (@code{enlarge-window}), which don't exactly scroll but do
317 333affect where the text appears on the screen. It applies to any
318 The feature also affects some other commands, such as @kbd{C-x 2} 334command whose name has a non-@code{nil} @code{isearch-scroll}
319(@code{split-window-vertically}) and @kbd{C-x ^} 335property. So you can control which commands are affected by changing
320(@code{enlarge-window}) which don't exactly scroll but do affect where 336these properties.
321the text appears on the screen. In general, it applies to any command
322whose name has a non-@code{nil} @code{isearch-scroll} property. So you
323can control which commands are affected by changing these properties.
324 337
325 For example, to make @kbd{C-h l} usable within an incremental search 338 For example, to make @kbd{C-h l} usable within an incremental search
326in all future Emacs sessions, use @kbd{C-h c} to find what command it 339in all future Emacs sessions, use @kbd{C-h c} to find what command it
327runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.) 340runs (@pxref{Key Help}), which is @code{view-lossage}. Then you can
328Then you can put the following line in your @file{.emacs} file 341put the following line in your init file (@pxref{Init File}):
329(@pxref{Init File}):
330 342
331@example 343@example
332(put 'view-lossage 'isearch-scroll t) 344(put 'view-lossage 'isearch-scroll t)
@@ -359,33 +371,9 @@ wrap around, going from the last page to the first page or vice versa.
359When the current match is on a history element, that history element 371When the current match is on a history element, that history element
360is pulled into the minibuffer. If you exit the incremental search 372is pulled into the minibuffer. If you exit the incremental search
361normally (e.g. by typing @key{RET}), it remains in the minibuffer 373normally (e.g. by typing @key{RET}), it remains in the minibuffer
362afterwards. Cancelling the search, with @kbd{C-g}, restores the 374afterwards. Canceling the search, with @kbd{C-g}, restores the
363contents of the minibuffer when you began the search. 375contents of the minibuffer when you began the search.
364 376
365@node Slow Isearch
366@subsection Slow Terminal Incremental Search
367
368 Incremental search on a slow terminal uses a modified style of display
369that is designed to take less time. Instead of redisplaying the buffer at
370each place the search gets to, it creates a new single-line window and uses
371that to display the line that the search has found. The single-line window
372comes into play as soon as point moves outside of the text that is already
373on the screen.
374
375 When you terminate the search, the single-line window is removed.
376Emacs then redisplays the window in which the search was done, to show
377its new position of point.
378
379@vindex search-slow-speed
380 The slow terminal style of display is used when the terminal baud rate is
381less than or equal to the value of the variable @code{search-slow-speed},
382initially 1200. See also the discussion of the variable @code{baud-rate}
383(@pxref{baud-rate,, Customization of Display}).
384
385@vindex search-slow-window-lines
386 The number of lines to use in slow terminal search display is controlled
387by the variable @code{search-slow-window-lines}. Its normal value is 1.
388
389@node Nonincremental Search 377@node Nonincremental Search
390@section Nonincremental Search 378@section Nonincremental Search
391@cindex nonincremental search 379@cindex nonincremental search
@@ -405,18 +393,14 @@ This enters the minibuffer to read the search string; terminate the
405string with @key{RET}, and then the search takes place. If the string 393string with @key{RET}, and then the search takes place. If the string
406is not found, the search command signals an error. 394is not found, the search command signals an error.
407 395
408 When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental
409search as usual. That command is specially programmed to invoke
410nonincremental search, @code{search-forward}, if the string you
411specify is empty. (Such an empty argument would otherwise be
412useless.) @kbd{C-r @key{RET}} does likewise, for a reverse
413incremental search.
414
415@findex search-forward 396@findex search-forward
416@findex search-backward 397@findex search-backward
417 Forward and backward nonincremental searches are implemented by the 398 When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental
418commands @code{search-forward} and @code{search-backward}. These 399search as usual. That command is specially programmed to invoke the
419commands may be bound to other keys in the usual manner. 400command for nonincremental search, @code{search-forward}, if the
401string you specify is empty. (Such an empty argument would otherwise
402be useless.) @kbd{C-r @key{RET}} does likewise, invoking the command
403@code{search-backward}.
420 404
421@node Word Search 405@node Word Search
422@section Word Search 406@section Word Search
@@ -476,7 +460,7 @@ apply to the lazy highlight, which always matches whole words.
476that denotes a class of alternative strings to match. GNU Emacs 460that denotes a class of alternative strings to match. GNU Emacs
477provides both incremental and nonincremental ways to search for a 461provides both incremental and nonincremental ways to search for a
478match for a regexp. The syntax of regular expressions is explained in 462match for a regexp. The syntax of regular expressions is explained in
479the following section. 463the next section.
480 464
481@table @kbd 465@table @kbd
482@item C-M-s 466@item C-M-s
@@ -531,7 +515,7 @@ starting position. These search methods are not mirror images.
531 515
532@findex re-search-forward 516@findex re-search-forward
533@findex re-search-backward 517@findex re-search-backward
534 Nonincremental search for a regexp is done by the functions 518 Nonincremental search for a regexp is done with the commands
535@code{re-search-forward} and @code{re-search-backward}. You can 519@code{re-search-forward} and @code{re-search-backward}. You can
536invoke these with @kbd{M-x}, or by way of incremental regexp search 520invoke these with @kbd{M-x}, or by way of incremental regexp search
537with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. 521with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}.
@@ -941,9 +925,9 @@ close-brackets, quotes, or parentheses, repeated zero or more times.
941 Searches in Emacs normally ignore the case of the text they are 925 Searches in Emacs normally ignore the case of the text they are
942searching through, if you specify the text in lower case. Thus, if 926searching through, if you specify the text in lower case. Thus, if
943you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} 927you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo}
944are also considered a match. Regexps, and in particular character 928also match. Regexps, and in particular character sets, behave
945sets, are included: @samp{[ab]} would match @samp{a} or @samp{A} or 929likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} or
946@samp{b} or @samp{B}.@refill 930@samp{B}.@refill
947 931
948 An upper-case letter anywhere in the incremental search string makes 932 An upper-case letter anywhere in the incremental search string makes
949the search case-sensitive. Thus, searching for @samp{Foo} does not find 933the search case-sensitive. Thus, searching for @samp{Foo} does not find
@@ -985,8 +969,8 @@ command, there is @kbd{M-%} (@code{query-replace}), which presents
985each occurrence of the pattern and asks you whether to replace it. 969each occurrence of the pattern and asks you whether to replace it.
986 970
987 The replace commands normally operate on the text from point to the 971 The replace commands normally operate on the text from point to the
988end of the buffer. When the mark is active, they operate on the 972end of the buffer. When the region is active, they operate on it
989region instead (@pxref{Mark}). The basic replace commands replace one 973instead (@pxref{Mark}). The basic replace commands replace one
990@dfn{search string} (or regexp) with one @dfn{replacement string}. It 974@dfn{search string} (or regexp) with one @dfn{replacement string}. It
991is possible to perform several replacements in parallel, using the 975is possible to perform several replacements in parallel, using the
992command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). 976command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}).
@@ -1023,7 +1007,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there.
1023@xref{Mark Ring}. 1007@xref{Mark Ring}.
1024 1008
1025 A prefix argument restricts replacement to matches that are 1009 A prefix argument restricts replacement to matches that are
1026surrounded by word boundaries. The argument's value doesn't matter. 1010surrounded by word boundaries.
1027 1011
1028 @xref{Replacement and Case}, for details about case-sensitivity in 1012 @xref{Replacement and Case}, for details about case-sensitivity in
1029replace commands. 1013replace commands.
@@ -1153,10 +1137,8 @@ replacement is done without case conversion.
1153 1137
1154@table @kbd 1138@table @kbd
1155@item M-% @var{string} @key{RET} @var{newstring} @key{RET} 1139@item M-% @var{string} @key{RET} @var{newstring} @key{RET}
1156@itemx M-x query-replace @key{RET} @var{string} @key{RET} @var{newstring} @key{RET}
1157Replace some occurrences of @var{string} with @var{newstring}. 1140Replace some occurrences of @var{string} with @var{newstring}.
1158@item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} 1141@item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET}
1159@itemx M-x query-replace-regexp @key{RET} @var{regexp} @key{RET} @var{newstring} @key{RET}
1160Replace some matches for @var{regexp} with @var{newstring}. 1142Replace some matches for @var{regexp} with @var{newstring}.
1161@end table 1143@end table
1162 1144
@@ -1169,7 +1151,7 @@ occurrence and asks you whether to replace it. Aside from querying,
1169@code{query-replace} works just like @code{replace-string} 1151@code{query-replace} works just like @code{replace-string}
1170(@pxref{Unconditional Replace}). In particular, it preserves case 1152(@pxref{Unconditional Replace}). In particular, it preserves case
1171provided @code{case-replace} is non-@code{nil}, as it normally is 1153provided @code{case-replace} is non-@code{nil}, as it normally is
1172(@pxref{Replacement and Case}). A numeric argument means consider 1154(@pxref{Replacement and Case}). A numeric argument means to consider
1173only occurrences that are bounded by word-delimiter characters. 1155only occurrences that are bounded by word-delimiter characters.
1174 1156
1175@kindex C-M-% 1157@kindex C-M-%
@@ -1182,7 +1164,7 @@ like @code{query-replace}.
1182 These commands highlight the current match using the face 1164 These commands highlight the current match using the face
1183@code{query-replace}. They highlight other matches using 1165@code{query-replace}. They highlight other matches using
1184@code{lazy-highlight} just like incremental search (@pxref{Incremental 1166@code{lazy-highlight} just like incremental search (@pxref{Incremental
1185Search}). By default, @code{query-replace-regexp} will show 1167Search}). By default, @code{query-replace-regexp} will show the
1186substituted replacement string for the current match in the 1168substituted replacement string for the current match in the
1187minibuffer. If you want to keep special sequences @samp{\&} and 1169minibuffer. If you want to keep special sequences @samp{\&} and
1188@samp{\@var{n}} unexpanded, customize 1170@samp{\@var{n}} unexpanded, customize
@@ -1315,6 +1297,8 @@ matching that regexp.
1315This command is just like @code{multi-isearch-buffers}, except it 1297This command is just like @code{multi-isearch-buffers}, except it
1316performs an incremental regexp search. 1298performs an incremental regexp search.
1317 1299
1300@cindex Occur mode
1301@cindex mode, Occur
1318@item M-x occur 1302@item M-x occur
1319Prompt for a regexp, and display a list showing each line in the 1303Prompt for a regexp, and display a list showing each line in the
1320buffer that contains a match for it. To limit the search to part of 1304buffer that contains a match for it. To limit the search to part of
@@ -1325,16 +1309,22 @@ displayed before and after each matching line.
1325@kindex RET @r{(Occur mode)} 1309@kindex RET @r{(Occur mode)}
1326@kindex o @r{(Occur mode)} 1310@kindex o @r{(Occur mode)}
1327@kindex C-o @r{(Occur mode)} 1311@kindex C-o @r{(Occur mode)}
1328The buffer @samp{*Occur*} containing the output serves as a menu for 1312In the @samp{*Occur*} buffer, you can click on each entry, or move
1329finding the occurrences in their original context. Click 1313point there and type @key{RET}, to visit the corresponding position in
1330@kbd{Mouse-2} on an occurrence listed in @samp{*Occur*}, or position 1314the buffer that was searched. @kbd{o} and @kbd{C-o} display the match
1331point there and type @key{RET}; this switches to the buffer that was 1315in another window; @kbd{C-o} does not select it. Alternatively, you
1332searched and moves point to the original of the chosen occurrence. 1316can use the @kbd{C-x `} (@code{next-error}) command to visit the
1333@kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o} 1317occurrences one by one (@pxref{Compilation Mode}).
1334does not select it. 1318
1335 1319@cindex Occur Edit mode
1336After using @kbd{M-x occur}, you can use @code{next-error} to visit 1320@cindex mode, Occur Edit
1337the occurrences found, one by one. @ref{Compilation Mode}. 1321Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit
1322mode, in which edits made to the entries are also applied to the text
1323in the originating buffer. Type @kbd{C-c C-c} to return to Occur
1324mode.
1325
1326The command @kbd{M-x list-matching-lines} is a synonym for @kbd{M-x
1327occur}.
1338 1328
1339@kindex M-s o 1329@kindex M-s o
1340@item M-s o 1330@item M-s o
@@ -1342,9 +1332,6 @@ Run @code{occur} using the search string of the last incremental
1342string search. You can also run @kbd{M-s o} when an incremental 1332string search. You can also run @kbd{M-s o} when an incremental
1343search is active; this uses the current search string. 1333search is active; this uses the current search string.
1344 1334
1345@item M-x list-matching-lines
1346Synonym for @kbd{M-x occur}.
1347
1348@item M-x multi-occur 1335@item M-x multi-occur
1349This command is just like @code{occur}, except it is able to search 1336This command is just like @code{occur}, except it is able to search
1350through multiple buffers. It asks you to specify the buffer names one 1337through multiple buffers. It asks you to specify the buffer names one
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index dc92e4a519c..600d0b07818 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -343,8 +343,8 @@ details.
343additionally select the displaying window so that you can begin 343additionally select the displaying window so that you can begin
344editing its buffer. The command @kbd{C-x `} (@code{next-error}) is 344editing its buffer. The command @kbd{C-x `} (@code{next-error}) is
345one example (@pxref{Compilation Mode}). Such commands work by calling 345one example (@pxref{Compilation Mode}). Such commands work by calling
346@code{pop-to-buffer} internally. @xref{Displaying Buffers,,Displaying 346@code{pop-to-buffer} internally. @xref{Switching Buffers,,Switching
347Buffers in Windows, elisp, The Emacs Lisp Reference Manual}. 347to a Buffer in a Window, elisp, The Emacs Lisp Reference Manual}.
348 348
349 Commands with names ending in @code{-other-window} behave like 349 Commands with names ending in @code{-other-window} behave like
350@code{display-buffer}, except that they never display in the selected 350@code{display-buffer}, except that they never display in the selected
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 02c2d2b8750..6b0ef9c5d8b 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
12011-10-23 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.2.3.
4
5 * trampver.texi: Update release number.
6
12011-10-14 Glenn Morris <rgm@gnu.org> 72011-10-14 Glenn Morris <rgm@gnu.org>
2 8
3 * ert.texi (Introduction, How to Run Tests) 9 * ert.texi (Introduction, How to Run Tests)
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 31d3ac0204f..63dc78dc4e8 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
8@c In the Tramp CVS, the version number is auto-frobbed from 8@c In the Tramp CVS, the version number is auto-frobbed from
9@c configure.ac, so you should edit that file and run 9@c configure.ac, so you should edit that file and run
10@c "autoconf && ./configure" to change the version number. 10@c "autoconf && ./configure" to change the version number.
11@set trampver 2.2.3-pre 11@set trampver 2.2.3-24.1
12 12
13@c Other flags from configuration 13@c Other flags from configuration
14@set instprefix /usr/local 14@set instprefix /usr/local
diff --git a/etc/NEWS b/etc/NEWS
index 330ada4bf73..d6b0bdb484c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -109,9 +109,9 @@ and pops down the *Completions* buffer accordingly.
109*** Completion can cycle, depending on completion-cycle-threshold. 109*** Completion can cycle, depending on completion-cycle-threshold.
110+++ 110+++
111*** New completion style `substring'. 111*** New completion style `substring'.
112 112+++
113*** Completion style can be set per-category `completion-category-overrides'. 113*** Completion style can be set per-category `completion-category-overrides'.
114 114+++
115*** Completion of buffers now uses substring completion by default. 115*** Completion of buffers now uses substring completion by default.
116 116
117** Mail changes 117** Mail changes
@@ -225,15 +225,19 @@ cannot be encoded by the `terminal-coding-system'.
225--- 225---
226*** New input methods for Farsi: farsi and farsi-translit. 226*** New input methods for Farsi: farsi and farsi-translit.
227 227
228** Improved GTK integration 228+++
229*** `nobreak-char-display' now also highlights Unicode hyphen chars
230(U+2010 and U+2011).
229 231
232** Improved GTK integration
233+++
230*** GTK scroll-bars are now placed on the right by default. 234*** GTK scroll-bars are now placed on the right by default.
231Use `set-scroll-bar-mode' to change this. 235Use `set-scroll-bar-mode' to change this.
232 236+++
233*** GTK tool bars can have just text, just images or images and text. 237*** GTK tool bars can have just text, just images or images and text.
234Customize `tool-bar-style' to choose style. On a Gnome desktop, the default 238Customize `tool-bar-style' to choose style. On a Gnome desktop, the default
235is taken from the desktop settings. 239is taken from the desktop settings.
236 240---
237*** GTK tool bars can be placed on the left/right or top/bottom of the frame. 241*** GTK tool bars can be placed on the left/right or top/bottom of the frame.
238The frame-parameter tool-bar-position controls this. It takes the values 242The frame-parameter tool-bar-position controls this. It takes the values
239top, left, right or bottom. The Options => Show/Hide menu has entries 243top, left, right or bottom. The Options => Show/Hide menu has entries
@@ -268,14 +272,10 @@ context in their return values.
268 272
269*** The new functions file-selinux-context and set-file-selinux-context 273*** The new functions file-selinux-context and set-file-selinux-context
270get and set the SELinux context of a file. 274get and set the SELinux context of a file.
271 275---
272*** Tramp offers handlers for file-selinux-context and set-file-selinux-context 276*** Tramp offers handlers for file-selinux-context and set-file-selinux-context
273for remote machines which support SELinux. 277for remote machines which support SELinux.
274 278
275+++
276** The function format-time-string now supports the %N directive, for
277higher-resolution time stamps.
278
279** Changes for exiting Emacs 279** Changes for exiting Emacs
280+++ 280+++
281*** The function kill-emacs is now run upon receipt of the signals 281*** The function kill-emacs is now run upon receipt of the signals
@@ -291,24 +291,20 @@ consider if it is still appropriate to add it in the noninteractive case.
291(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom 291(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
292of buffer at first key-press (instead move to top/bottom of buffer) 292of buffer at first key-press (instead move to top/bottom of buffer)
293when `scroll-error-top-bottom' is non-nil. 293when `scroll-error-top-bottom' is non-nil.
294
295+++ 294+++
296*** New variable `scroll-error-top-bottom' (see above). 295*** New variable `scroll-error-top-bottom' (see above).
297 296+++
298*** New scrolling commands `scroll-up-line' and `scroll-down-line' 297*** New scrolling commands `scroll-up-line' and `scroll-down-line'
299scroll a line instead of full screen. 298scroll a line instead of full screen.
300
301+++ 299+++
302*** New property `scroll-command' should be set on a command's symbol to 300*** New property `scroll-command' should be set on a command's symbol to
303define it as a scroll command affected by `scroll-preserve-screen-position'. 301define it as a scroll command affected by `scroll-preserve-screen-position'.
304
305+++ 302+++
306*** If you customize `scroll-conservatively' to a value greater than 100, 303*** If you customize `scroll-conservatively' to a value greater than 100,
307Emacs will never recenter point in the window when it scrolls due to 304Emacs will never recenter point in the window when it scrolls due to
308cursor motion commands or commands that move point (e.f., `M-g M-g'). 305cursor motion commands or commands that move point (e.f., `M-g M-g').
309Previously, you needed to use `most-positive-fixnum' as the value of 306Previously, you needed to use `most-positive-fixnum' as the value of
310`scroll-conservatively' to achieve the same effect. 307`scroll-conservatively' to achieve the same effect.
311
312--- 308---
313*** ``Aggressive'' scrolling now honors the scroll margins. 309*** ``Aggressive'' scrolling now honors the scroll margins.
314If you customize `scroll-up-aggressively' or 310If you customize `scroll-up-aggressively' or
@@ -370,7 +366,6 @@ Affected modes include dired, vc-dir, and log-edit. For example,
370adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will 366adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
371turn on `whitespace-mode' for *vc-diff* buffers. Modes should call 367turn on `whitespace-mode' for *vc-diff* buffers. Modes should call
372`hack-dir-local-variables-non-file-buffer' to support this. 368`hack-dir-local-variables-non-file-buffer' to support this.
373
374+++ 369+++
375*** Using "mode: MINOR-MODE" to enable a minor mode is deprecated. 370*** Using "mode: MINOR-MODE" to enable a minor mode is deprecated.
376Instead, use "eval: (minor-mode 1)". 371Instead, use "eval: (minor-mode 1)".
@@ -444,7 +439,7 @@ pops up *Messages*" feature, which can now easily be changed.
444+++ 439+++
445*** C-y in Isearch is now bound to isearch-yank-kill, instead of 440*** C-y in Isearch is now bound to isearch-yank-kill, instead of
446isearch-yank-line. 441isearch-yank-line.
447--- 442+++
448*** M-y in Isearch is now bound to isearch-yank-pop, instead of 443*** M-y in Isearch is now bound to isearch-yank-pop, instead of
449isearch-yank-kill. 444isearch-yank-kill.
450+++ 445+++
@@ -456,6 +451,7 @@ isearch-yank-kill.
456*** `count-lines-region' is now an alias for `count-words-region', 451*** `count-lines-region' is now an alias for `count-words-region',
457bound to M-=, which shows the number of lines, words, and characters. 452bound to M-=, which shows the number of lines, words, and characters.
458 453
454+++
459** The default value of `backup-by-copying-when-mismatch' is now t. 455** The default value of `backup-by-copying-when-mismatch' is now t.
460 456
461+++ 457+++
@@ -556,6 +552,7 @@ updates later on, and Emacs appears to be unable to keep up.
556 552
557* Changes in Specialized Modes and Packages in Emacs 24.1 553* Changes in Specialized Modes and Packages in Emacs 24.1
558 554
555+++
559** Archive Mode has basic support for browsing and updating 7z archives. 556** Archive Mode has basic support for browsing and updating 7z archives.
560 557
561** browse-url has a new variable `browse-url-mailto-function' 558** browse-url has a new variable `browse-url-mailto-function'
@@ -800,12 +797,12 @@ additional details about each column.
800*** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. 797*** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
801 798
802** Tramp 799** Tramp
803 800---
804*** There exists a new inline access method "ksu" (kerberized su). 801*** There exists a new inline access method "ksu" (kerberized su).
805 802---
806*** The following access methods are discontinued: "ssh1_old", 803*** The following access methods are discontinued: "ssh1_old",
807"ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish". 804"ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish".
808 805---
809*** The option `ange-ftp-binary-file-name-regexp' has changed its 806*** The option `ange-ftp-binary-file-name-regexp' has changed its
810default value to "". 807default value to "".
811 808
@@ -847,7 +844,12 @@ binding `log-view-expanded-log-entry-function' to a suitable function.
847of a file similar to `vc-diff', but using ediff backend. 844of a file similar to `vc-diff', but using ediff backend.
848 845
849+++ 846+++
850*** The option vc-initial-comment was removed in Emacs 23.2, but 847*** The option `vc-initial-comment' was removed in Emacs 23.2, but
848this was not advertised at the time.
849
850+++
851*** `vc-toggle-read-only' is an obsolete alias for `toggle-read-only'.
852Since Emacs 23, it has done the same thing as `toggle-read-only', but
851this was not advertised at the time. 853this was not advertised at the time.
852 854
853** FIXME: xdg-open for browse-url and reportbug, 2010/08. 855** FIXME: xdg-open for browse-url and reportbug, 2010/08.
@@ -879,6 +881,7 @@ They are superseded by shift-select-mode enabled by default in 23.1.
879 881
880* New Modes and Packages in Emacs 24.1 882* New Modes and Packages in Emacs 24.1
881 883
884+++
882** Occur Edit mode applies edits made in *Occur* buffers to the 885** Occur Edit mode applies edits made in *Occur* buffers to the
883original buffers. It is bound to "e" in Occur mode. 886original buffers. It is bound to "e" in Occur mode.
884 887
@@ -1180,6 +1183,10 @@ Also the debugger can now "continue" from an error, which means it will jump
1180to the error handler as if the debugger had not been invoked instead of 1183to the error handler as if the debugger had not been invoked instead of
1181jumping all the way to the top-level. 1184jumping all the way to the top-level.
1182 1185
1186+++
1187** The function format-time-string now supports the %N directive, for
1188higher-resolution time stamps.
1189
1183** New function `read-char-choice' reads a restricted set of characters, 1190** New function `read-char-choice' reads a restricted set of characters,
1184discarding any inputs not inside the set. 1191discarding any inputs not inside the set.
1185 1192
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 9e473156a78..e85972f0bfd 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -171,6 +171,14 @@ optimization. To do this, configure Emacs with
171 171
172 CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure 172 CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure
173 173
174** Emacs compiled with GCC 4.6.1 crashes on MS-Windows when C-g is pressed
175
176This is known to happen when Emacs is compiled with MinGW GCC 4.6.1
177with the -O2 option (which is the default in the Windows build). The
178reason is a bug in MinGW GCC 4.6.1; to work around, either add the
179`-fno-omit-frame-pointer' switch to GCC or compile without
180optimizations (`--no-opt' switch to the configure.bat script).
181
174** Emacs crashes in x-popup-dialog. 182** Emacs crashes in x-popup-dialog.
175 183
176This can happen if the dialog widget cannot find the font it wants to 184This can happen if the dialog widget cannot find the font it wants to
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e058f387a93..b20ebccea89 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,237 @@
12011-10-24 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to
4 `search-whitespace-regexp' only when `isearch-regexp' is non-nil.
5 (Bug#9364)
6
72011-10-24 Juri Linkov <juri@jurta.org>
8
9 * info.el (Info-following-node-name-re): Add newline to the list
10 of allowed characters for leading space. (Bug#9824)
11
122011-10-24 Stefan Monnier <monnier@iro.umontreal.ca>
13
14 * progmodes/octave-inf.el (inferior-octave-mode-map): Fix C-c C-h binding.
15 * progmodes/octave-mod.el (octave-help): Remove.
16
172011-10-23 Michael Albinus <michael.albinus@gmx.de>
18
19 Sync with Tramp 2.2.3.
20
21 * net/tramp-cache.el (top): Pacify byte-compiler using
22 `init-file-user' and `site-run-file'.
23
24 * net/trampver.el: Update release number.
25
262011-10-23 Chong Yidong <cyd@gnu.org>
27
28 * files.el (toggle-read-only): Remove obsolete comment about
29 version control.
30
31 * vc/vc-hooks.el (vc-toggle-read-only): Make it an obsolete alias
32 for toggle-read-only. Note that this hasn't called vc-next-action
33 since 2008-05-02, though it wasn't documented at the time.
34
35 * vc/ediff-init.el (ediff-toggle-read-only-function):
36 Use toggle-read-only.
37
382011-10-22 Alan Mackenzie <bug-cc-mode@gnu.org>
39
40 Fix bug #9560, sporadic wrong indentation; improve instrumentation
41 of c-parse-state.
42
43 * cc-engine.el (c-append-lower-brace-pair-to-state-cache):
44 correct faulty logical expression.
45 (c-parse-state-state, c-record-parse-state-state):
46 (c-replay-parse-state-state): New defvar/defuns.
47 (c-debug-parse-state): Use new functions.
48
492011-10-22 Martin Rudalics <rudalics@gmx.at>
50
51 * mouse.el (mouse-drag-line): Fix minibuffer resizing broken by
52 last fix. Use window-in-direction correctly.
53
542011-10-21 Chong Yidong <cyd@gnu.org>
55
56 * progmodes/idlwave.el (idlwave-mode):
57 * progmodes/vera-mode.el (vera-mode): No need to set
58 require-final-newline; that's done in prog-mode.
59 Suggested by Stefan Monnier.
60
612011-10-21 Martin Rudalics <rudalics@gmx.at>
62
63 * mouse.el (mouse-drag-window-above)
64 (mouse-drag-move-window-bottom, mouse-drag-move-window-top)
65 (mouse-drag-mode-line-1, mouse-drag-header-line)
66 (mouse-drag-vertical-line-rightward-window): Remove.
67 (mouse-drag-line): New function.
68 (mouse-drag-mode-line, mouse-drag-header-line)
69 (mouse-drag-vertical-line): Call mouse-drag-line.
70 * window.el (window-at-side-p, windows-at-side): New functions.
71
722011-10-21 Ulrich Mueller <ulm@gentoo.org>
73
74 * tar-mode.el (tar-grind-file-mode):
75 Fix handling of setuid/setgid, handle sticky bit. (Bug#9817)
76
772011-10-21 Chong Yidong <cyd@gnu.org>
78
79 * progmodes/idlwave.el (idlwave-mode):
80 * progmodes/vera-mode.el (vera-mode):
81 Use mode-require-final-newline.
82
832011-10-20 Glenn Morris <rgm@gnu.org>
84
85 * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781)
86
872011-10-20 Christoph Scholtes <cschol2112@googlemail.com>
88
89 * emulation/cua-base.el (cua-set-mark): Fix case of string.
90
912011-10-20 Chong Yidong <cyd@gnu.org>
92
93 * emulation/cua-base.el (cua-mode):
94 * mail/footnote.el (footnote-mode):
95 * mail/mailabbrev.el (mail-abbrevs-mode):
96 * net/xesam.el (xesam-minor-mode):
97 * progmodes/bug-reference.el (bug-reference-mode):
98 * progmodes/cap-words.el (capitalized-words-mode):
99 * progmodes/compile.el (compilation-minor-mode)
100 (compilation-shell-minor-mode):
101 * progmodes/gud.el (gud-tooltip-mode):
102 * progmodes/hideif.el (hide-ifdef-mode):
103 * progmodes/idlw-shell.el (idlwave-shell-electric-debug-mode):
104 * progmodes/subword.el (subword-mode):
105 * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
106 * progmodes/which-func.el (which-function-mode):
107 * term/tvi970.el (tvi970-set-keypad-mode):
108 * term/vt100.el (vt100-wide-mode):
109 * textmodes/flyspell.el (flyspell-mode):
110 * textmodes/ispell.el (ispell-minor-mode):
111 * textmodes/nroff-mode.el (nroff-electric-mode):
112 * textmodes/paragraphs.el (use-hard-newlines):
113 * textmodes/refill.el (refill-mode):
114 * textmodes/reftex.el (reftex-mode):
115 * textmodes/rst.el (rst-minor-mode):
116 * textmodes/sgml-mode.el (html-autoview-mode)
117 (sgml-electric-tag-pair-mode):
118 * textmodes/tex-mode.el (latex-electric-env-pair-mode):
119 * vc/diff-mode.el (diff-auto-refine-mode, diff-minor-mode):
120 * emulation/crisp.el (crisp-mode):
121 * emacs-lisp/eldoc.el (eldoc-mode):
122 * emacs-lisp/checkdoc.el (checkdoc-minor-mode): Doc fixes for new
123 minor mode behavior.
124
1252011-10-19 Juri Linkov <juri@jurta.org>
126
127 * descr-text.el (describe-char): Add #x2010 and #x2011 to
128 the list of hard-coded chars with escape-glyph face.
129
1302011-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
131
132 * vc/log-edit.el (log-edit-empty-buffer-p): Ignore empty headers.
133
1342011-10-19 Michael Albinus <michael.albinus@gmx.de>
135
136 * net/tramp.el (tramp-connectable-p): Make a stronger check on a
137 running process.
138
1392011-10-19 Glenn Morris <rgm@gnu.org>
140
141 * vc/vc-bzr.el (vc-bzr-after-dir-status):
142 Ignore ignored files. (Bug#9726)
143
1442011-10-19 Chong Yidong <cyd@gnu.org>
145
146 Doc fix for minor modes, stating that an omitted argument enables
147 the mode unconditionally when called from Lisp.
148
149 * abbrev.el (abbrev-mode):
150 * allout.el (allout-mode):
151 * autoinsert.el (auto-insert-mode):
152 * autoarg.el (autoarg-mode, autoarg-kp-mode):
153 * autorevert.el (auto-revert-mode, auto-revert-tail-mode)
154 (global-auto-revert-mode):
155 * battery.el (display-battery-mode):
156 * composite.el (global-auto-composition-mode)
157 (auto-composition-mode):
158 * delsel.el (delete-selection-mode):
159 * desktop.el (desktop-save-mode):
160 * dired-x.el (dired-omit-mode):
161 * dirtrack.el (dirtrack-mode):
162 * doc-view.el (doc-view-minor-mode):
163 * double.el (double-mode):
164 * electric.el (electric-indent-mode, electric-pair-mode):
165 * emacs-lock.el (emacs-lock-mode):
166 * epa-hook.el (auto-encryption-mode):
167 * follow.el (follow-mode):
168 * font-core.el (font-lock-mode):
169 * frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
170 * help.el (temp-buffer-resize-mode):
171 * hilit-chg.el (highlight-changes-mode)
172 (highlight-changes-visible-mode):
173 * hi-lock.el (hi-lock-mode):
174 * hl-line.el (hl-line-mode, global-hl-line-mode):
175 * icomplete.el (icomplete-mode):
176 * ido.el (ido-everywhere):
177 * image-file.el (auto-image-file-mode):
178 * image-mode.el (image-minor-mode):
179 * iswitchb.el (iswitchb-mode):
180 * jka-cmpr-hook.el (auto-compression-mode):
181 * linum.el (linum-mode):
182 * longlines.el (longlines-mode):
183 * master.el (master-mode):
184 * mb-depth.el (minibuffer-depth-indicate-mode):
185 * menu-bar.el (menu-bar-mode):
186 * minibuf-eldef.el (minibuffer-electric-default-mode):
187 * mouse-sel.el (mouse-sel-mode):
188 * msb.el (msb-mode):
189 * mwheel.el (mouse-wheel-mode):
190 * outline.el (outline-minor-mode):
191 * paren.el (show-paren-mode):
192 * recentf.el (recentf-mode):
193 * reveal.el (reveal-mode, global-reveal-mode):
194 * rfn-eshadow.el (file-name-shadow-mode):
195 * ruler-mode.el (ruler-mode):
196 * savehist.el (savehist-mode):
197 * scroll-all.el (scroll-all-mode):
198 * scroll-bar.el (scroll-bar-mode):
199 * server.el (server-mode):
200 * shell.el (shell-dirtrack-mode):
201 * simple.el (auto-fill-mode, transient-mark-mode)
202 (visual-line-mode, overwrite-mode, binary-overwrite-mode)
203 (line-number-mode, column-number-mode, size-indication-mode)
204 (auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
205 * strokes.el (strokes-mode):
206 * time.el (display-time-mode):
207 * t-mouse.el (gpm-mouse-mode):
208 * tool-bar.el (tool-bar-mode):
209 * tooltip.el (tooltip-mode):
210 * type-break.el (type-break-mode-line-message-mode)
211 (type-break-query-mode):
212 * view.el (view-mode):
213 * whitespace.el (whitespace-mode, whitespace-newline-mode)
214 (global-whitespace-mode, global-whitespace-newline-mode):
215 * xt-mouse.el (xterm-mouse-mode): Doc fix.
216
217 * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
218 Fix autogenerated docstring.
219
2202011-10-19 Juri Linkov <juri@jurta.org>
221
222 * net/browse-url.el (browse-url-can-use-xdg-open): Support LXDE
223 by checking environment variables "DESKTOP_SESSION" and
224 "XDG_CURRENT_DESKTOP". (Bug#9779)
225
2262011-10-19 Juri Linkov <juri@jurta.org>
227
228 * net/browse-url.el (browse-url-browser-function): Add "Chromium".
229 (browse-url-chromium-program, browse-url-chromium-arguments):
230 New defcustoms.
231 (browse-url-default-browser): Check for `browse-url-chromium' and
232 call `browse-url-chromium-program'.
233 (browse-url-chromium): New command. (Bug#9779)
234
12011-10-18 Juanma Barranquero <lekktu@gmail.com> 2352011-10-18 Juanma Barranquero <lekktu@gmail.com>
2 236
3 * facemenu.el (list-colors-duplicates): On Windows, detect more 237 * facemenu.el (list-colors-duplicates): On Windows, detect more
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 5a7a741a3a6..395810772c5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -54,9 +54,12 @@ define global abbrevs instead."
54 54
55(define-minor-mode abbrev-mode 55(define-minor-mode abbrev-mode
56 "Toggle Abbrev mode in the current buffer. 56 "Toggle Abbrev mode in the current buffer.
57With optional argument ARG, turn abbrev mode on if ARG is 57With a prefix argument ARG, enable Abbrev mode if ARG is
58positive, otherwise turn it off. In Abbrev mode, inserting an 58positive, and disable it otherwise. If called from Lisp, enable
59abbreviation causes it to expand and be replaced by its expansion." 59Abbrev mode if ARG is omitted or nil.
60
61In Abbrev mode, inserting an abbreviation causes it to expand and
62be replaced by its expansion."
60 ;; It's defined in C, this stops the d-m-m macro defining it again. 63 ;; It's defined in C, this stops the d-m-m macro defining it again.
61 :variable abbrev-mode) 64 :variable abbrev-mode)
62 65
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index ef75e7157e6..162da1f4815 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -486,13 +486,14 @@ happens in the buffer.")
486;;;_ > define-minor-mode allout-widgets-mode (arg) 486;;;_ > define-minor-mode allout-widgets-mode (arg)
487;;;###autoload 487;;;###autoload
488(define-minor-mode allout-widgets-mode 488(define-minor-mode allout-widgets-mode
489 "Allout-mode extension, providing graphical decoration of outline structure. 489 "Toggle Allout Widgets mode.
490 490With a prefix argument ARG, enable Allout Widgets mode if ARG is
491This is meant to operate along with allout-mode, via `allout-mode-hook'. 491positive, and disable it otherwise. If called from Lisp, enable
492 492the mode if ARG is omitted or nil.
493If optional argument ARG is greater than 0, enable. 493
494If optional argument ARG is less than 0, disable. 494Allout Widgets mode is an extension of Allout mode that provides
495Anything else, toggle between active and inactive. 495graphical decoration of outline structure. It is meant to
496operate along with `allout-mode', via `allout-mode-hook'.
496 497
497The graphics include: 498The graphics include:
498 499
diff --git a/lisp/allout.el b/lisp/allout.el
index 4002f12e264..18cc3c80dc6 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1702,17 +1702,19 @@ valid values."
1702;;;###autoload 1702;;;###autoload
1703(define-minor-mode allout-mode 1703(define-minor-mode allout-mode
1704;;;_ . Doc string: 1704;;;_ . Doc string:
1705 "Toggle minor mode for controlling exposure and editing of text outlines. 1705 "Toggle Allout outline mode.
1706\\<allout-mode-map-value> 1706With a prefix argument ARG, enable Allout outline mode if ARG is
1707 1707positive, and disable it otherwise. If called from Lisp, enable
1708Allout outline mode always runs as a minor mode. 1708the mode if ARG is omitted or nil.
1709 1709
1710Allout outline mode provides extensive outline oriented 1710\\<allout-mode-map-value>
1711formatting and manipulation. It enables structural editing of 1711Allout outline mode is a minor mode that provides extensive
1712outlines, as well as navigation and exposure. It also is 1712outline oriented formatting and manipulation. It enables
1713specifically aimed at accommodating syntax-sensitive text like 1713structural editing of outlines, as well as navigation and
1714programming languages. \(For example, see the allout code itself, 1714exposure. It also is specifically aimed at accommodating
1715which is organized as an allout outline.) 1715syntax-sensitive text like programming languages. \(For example,
1716see the allout code itself, which is organized as an allout
1717outline.)
1716 1718
1717In addition to typical outline navigation and exposure, allout includes: 1719In addition to typical outline navigation and exposure, allout includes:
1718 1720
diff --git a/lisp/autoarg.el b/lisp/autoarg.el
index 378ec1318b1..57f5bcd809c 100644
--- a/lisp/autoarg.el
+++ b/lisp/autoarg.el
@@ -90,15 +90,19 @@
90 90
91;;;###autoload 91;;;###autoload
92(define-minor-mode autoarg-mode 92(define-minor-mode autoarg-mode
93 "Toggle Autoarg minor mode globally. 93 "Toggle Autoarg mode, a global minor mode.
94With ARG, turn Autoarg mode on if ARG is positive, off otherwise. 94With a prefix argument ARG, enable Autoarg mode if ARG is
95positive, and disable it otherwise. If called from Lisp, enable
96the mode if ARG is omitted or nil.
97
95\\<autoarg-mode-map> 98\\<autoarg-mode-map>
96In Autoarg mode digits are bound to `digit-argument' -- i.e. they 99In Autoarg mode, digits are bound to `digit-argument', i.e. they
97supply prefix arguments as C-DIGIT and M-DIGIT normally do -- and 100supply prefix arguments as C-DIGIT and M-DIGIT normally do.
98C-DIGIT inserts DIGIT. \\[autoarg-terminate] terminates the prefix sequence 101Furthermore, C-DIGIT inserts DIGIT.
99and inserts the digits of the autoarg sequence into the buffer. 102\\[autoarg-terminate] terminates the prefix sequence and inserts
100Without a numeric prefix arg the normal binding of \\[autoarg-terminate] is 103the digits of the autoarg sequence into the buffer.
101invoked, i.e. what it would be with Autoarg mode off. 104Without a numeric prefix arg, the normal binding of \\[autoarg-terminate]
105is invoked, i.e. what it would be with Autoarg mode off.
102 106
103For example: 107For example:
104`6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'. 108`6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'.
@@ -112,11 +116,14 @@ then invokes the normal binding of \\[autoarg-terminate].
112 116
113;;;###autoload 117;;;###autoload
114(define-minor-mode autoarg-kp-mode 118(define-minor-mode autoarg-kp-mode
115 "Toggle Autoarg-KP minor mode globally. 119 "Toggle Autoarg-KP mode, a global minor mode.
116With ARG, turn Autoarg mode on if ARG is positive, off otherwise. 120With a prefix argument ARG, enable Autoarg-KP mode if ARG is
121positive, and disable it otherwise. If called from Lisp, enable
122the mode if ARG is omitted or nil.
123
117\\<autoarg-kp-mode-map> 124\\<autoarg-kp-mode-map>
118This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1' 125This is similar to `autoarg-mode' but rebinds the keypad keys
119etc. to supply digit arguments. 126`kp-1' etc. to supply digit arguments.
120 127
121\\{autoarg-kp-mode-map}" 128\\{autoarg-kp-mode-map}"
122 nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard 129 nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 5793c3180be..6d002f4a217 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -397,9 +397,10 @@ or if CONDITION had no actions, after all other CONDITIONs."
397 397
398;;;###autoload 398;;;###autoload
399(define-minor-mode auto-insert-mode 399(define-minor-mode auto-insert-mode
400 "Toggle Auto-insert mode. 400 "Toggle Auto-insert mode, a global minor mode.
401With prefix ARG, turn Auto-insert mode on if and only if ARG is positive. 401With a prefix argument ARG, enable Auto-insert mode if ARG is
402Returns the new status of Auto-insert mode (non-nil means on). 402positive, and disable it otherwise. If called from Lisp, enable
403the mode if ARG is omitted or nil.
403 404
404When Auto-insert mode is enabled, when new files are created you can 405When Auto-insert mode is enabled, when new files are created you can
405insert a template for the file depending on the mode of the buffer." 406insert a template for the file depending on the mode of the buffer."
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index c67b6663bd0..817aaff55ca 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -284,10 +284,15 @@ the list of old buffers.")
284 284
285;;;###autoload 285;;;###autoload
286(define-minor-mode auto-revert-mode 286(define-minor-mode auto-revert-mode
287 "Toggle reverting buffer when file on disk changes. 287 "Toggle reverting buffer when the file changes (Auto Revert mode).
288With a prefix argument ARG, enable Auto Revert mode if ARG is
289positive, and disable it otherwise. If called from Lisp, enable
290the mode if ARG is omitted or nil.
291
292Auto Revert mode is a minor mode that affects only the current
293buffer. When enabled, it reverts the buffer when the file on
294disk changes.
288 295
289With arg, turn Auto Revert mode on if and only if arg is positive.
290This is a minor mode that affects only the current buffer.
291Use `global-auto-revert-mode' to automatically revert all buffers. 296Use `global-auto-revert-mode' to automatically revert all buffers.
292Use `auto-revert-tail-mode' if you know that the file will only grow 297Use `auto-revert-tail-mode' if you know that the file will only grow
293without being changed in the part that is already in the buffer." 298without being changed in the part that is already in the buffer."
@@ -314,14 +319,16 @@ This function is designed to be added to hooks, for example:
314 319
315;;;###autoload 320;;;###autoload
316(define-minor-mode auto-revert-tail-mode 321(define-minor-mode auto-revert-tail-mode
317 "Toggle reverting tail of buffer when file on disk grows. 322 "Toggle reverting tail of buffer when the file grows.
318With arg, turn Tail mode on if arg is positive, otherwise turn it off. 323With a prefix argument ARG, enable Auto-Revert Tail mode if ARG
324is positive, and disable it otherwise. If called from Lisp,
325enable the mode if ARG is omitted or nil.
319 326
320When Tail mode is enabled, the tail of the file is constantly 327When Auto Revert Tail mode is enabled, the tail of the file is
321followed, as with the shell command `tail -f'. This means that 328constantly followed, as with the shell command `tail -f'. This
322whenever the file grows on disk (presumably because some 329means that whenever the file grows on disk (presumably because
323background process is appending to it from time to time), this is 330some background process is appending to it from time to time),
324reflected in the current buffer. 331this is reflected in the current buffer.
325 332
326You can edit the buffer and turn this mode off and on again as 333You can edit the buffer and turn this mode off and on again as
327you please. But make sure the background process has stopped 334you please. But make sure the background process has stopped
@@ -367,7 +374,7 @@ Perform a full revert? ")
367 374
368;;;###autoload 375;;;###autoload
369(defun turn-on-auto-revert-tail-mode () 376(defun turn-on-auto-revert-tail-mode ()
370 "Turn on Auto-Revert Tail Mode. 377 "Turn on Auto-Revert Tail mode.
371 378
372This function is designed to be added to hooks, for example: 379This function is designed to be added to hooks, for example:
373 (add-hook 'my-logfile-mode-hook 'turn-on-auto-revert-tail-mode)" 380 (add-hook 'my-logfile-mode-hook 'turn-on-auto-revert-tail-mode)"
@@ -377,12 +384,13 @@ This function is designed to be added to hooks, for example:
377;;;###autoload 384;;;###autoload
378(define-minor-mode global-auto-revert-mode 385(define-minor-mode global-auto-revert-mode
379 "Toggle Global Auto Revert mode. 386 "Toggle Global Auto Revert mode.
380With optional prefix argument ARG, enable Global Auto Revert Mode 387With a prefix argument ARG, enable Global Auto Revert mode if ARG
381if ARG > 0, else disable it. 388is positive, and disable it otherwise. If called from Lisp,
389enable the mode if ARG is omitted or nil.
382 390
383This is a global minor mode that reverts any buffer associated 391Global Auto Revert mode is a global minor mode that reverts any
384with a file when the file changes on disk. Use `auto-revert-mode' 392buffer associated with a file when the file changes on disk. Use
385to revert a particular buffer. 393`auto-revert-mode' to revert a particular buffer.
386 394
387If `global-auto-revert-non-file-buffers' is non-nil, this mode 395If `global-auto-revert-non-file-buffers' is non-nil, this mode
388may also revert some non-file buffers, as described in the 396may also revert some non-file buffers, as described in the
diff --git a/lisp/battery.el b/lisp/battery.el
index f5c01fbef58..3b245ed644d 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -164,10 +164,14 @@ The text being displayed in the echo area is controlled by the variables
164 164
165;;;###autoload 165;;;###autoload
166(define-minor-mode display-battery-mode 166(define-minor-mode display-battery-mode
167 "Display battery status information in the mode line. 167 "Toggle battery status display in mode line (Display Battery mode).
168The text being displayed in the mode line is controlled by the variables 168With a prefix argument ARG, enable Display Battery mode if ARG is
169positive, and disable it otherwise. If called from Lisp, enable
170the mode if ARG is omitted or nil.
171
172The text displayed in the mode line is controlled by
169`battery-mode-line-format' and `battery-status-function'. 173`battery-mode-line-format' and `battery-status-function'.
170The mode line will be updated automatically every `battery-update-interval' 174The mode line is be updated every `battery-update-interval'
171seconds." 175seconds."
172 :global t :group 'battery 176 :global t :group 'battery
173 (setq battery-mode-line-string "") 177 (setq battery-mode-line-string "")
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index 093e592c475..3dd0e6f78fd 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,20 @@
12011-10-23 Chong Yidong <cyd@gnu.org>
2
3 * ede.el (ede-maybe-checkout): Function deleted;
4 vc-toggle-read-only does not do version control now.
5
6 * ede/util.el (ede-make-buffer-writable): Don't use
7 vc-toggle-read-only.
8
9 * ede/project-am.el (project-remove-file, project-add-file)
10 (project-new-target): Don't call ede-maybe-checkout.
11
122011-10-19 Chong Yidong <cyd@gnu.org>
13
14 * ede.el (ede-minor-mode,global-ede-mode):
15 * semantic.el (semantic-mode): Doc fix to reflect new
16 define-minor-mode calling behavior.
17
12011-07-30 Chong Yidong <cyd@stupidchicken.com> 182011-07-30 Chong Yidong <cyd@stupidchicken.com>
2 19
3 * semantic/grammar.el (semantic-grammar-insert-defanalyzers): Fix 20 * semantic/grammar.el (semantic-grammar-insert-defanalyzers): Fix
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 307ccfdadd7..14f09517b1d 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -398,8 +398,9 @@ To be used in hook functions."
398 398
399(define-minor-mode ede-minor-mode 399(define-minor-mode ede-minor-mode
400 "Toggle EDE (Emacs Development Environment) minor mode. 400 "Toggle EDE (Emacs Development Environment) minor mode.
401With non-nil argument ARG, enable EDE minor mode if ARG is 401With a prefix argument ARG, enable EDE minor mode if ARG is
402positive; otherwise, disable it. 402positive, and disable it otherwise. If called from Lisp, enable
403EDE minor mode if ARG is omitted or nil.
403 404
404If this file is contained, or could be contained in an EDE 405If this file is contained, or could be contained in an EDE
405controlled project, then this mode is activated automatically 406controlled project, then this mode is activated automatically
@@ -458,8 +459,9 @@ ONOFF indicates enabling or disabling the mode."
458;;;###autoload 459;;;###autoload
459(define-minor-mode global-ede-mode 460(define-minor-mode global-ede-mode
460 "Toggle global EDE (Emacs Development Environment) mode. 461 "Toggle global EDE (Emacs Development Environment) mode.
461With non-nil argument ARG, enable global EDE mode if ARG is 462With a prefix argument ARG, enable global EDE mode if ARG is
462positive; otherwise, disable it. 463positive, and disable it otherwise. If called from Lisp, enable
464the mode if ARG is omitted or nil.
463 465
464This global minor mode enables `ede-minor-mode' in all buffers in 466This global minor mode enables `ede-minor-mode' in all buffers in
465an EDE controlled project." 467an EDE controlled project."
@@ -1177,16 +1179,6 @@ See also `ede-map-subprojects'."
1177Return the first non-nil value returned by PROC." 1179Return the first non-nil value returned by PROC."
1178 (eval (cons 'or (ede-map-targets this proc)))) 1180 (eval (cons 'or (ede-map-targets this proc))))
1179 1181
1180;;; VC Handling
1181;;
1182(defun ede-maybe-checkout (&optional buffer)
1183 "Check BUFFER out of VC if necessary."
1184 (save-excursion
1185 (if buffer (set-buffer buffer))
1186 (if (and buffer-read-only vc-mode
1187 (y-or-n-p "Checkout Makefile.am from VC? "))
1188 (vc-toggle-read-only))))
1189
1190 1182
1191;;; Some language specific methods. 1183;;; Some language specific methods.
1192;; 1184;;
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el
index 88cf67e22ed..ec54d8151bc 100644
--- a/lisp/cedet/ede/project-am.el
+++ b/lisp/cedet/ede/project-am.el
@@ -214,7 +214,6 @@ OT is the object target. DIR is the directory to start in."
214 target (project-am-preferred-target-type (buffer-file-name))))) 214 target (project-am-preferred-target-type (buffer-file-name)))))
215 (ede-with-projectfile ot 215 (ede-with-projectfile ot
216 (makefile-move-to-macro (project-am-macro ot)) 216 (makefile-move-to-macro (project-am-macro ot))
217 (ede-maybe-checkout)
218 (makefile-end-of-command) 217 (makefile-end-of-command)
219 (insert " " ofn) 218 (insert " " ofn)
220 (makefile-fill-paragraph nil) 219 (makefile-fill-paragraph nil)
@@ -226,10 +225,6 @@ OT is the object target. DIR is the directory to start in."
226 "Remove the current buffer from any project targets." 225 "Remove the current buffer from any project targets."
227 (ede-with-projectfile ot 226 (ede-with-projectfile ot
228 (makefile-move-to-macro (project-am-macro ot)) 227 (makefile-move-to-macro (project-am-macro ot))
229 (if (and buffer-read-only vc-mode
230 (y-or-n-p "Checkout Makefile.am from VC? "))
231 (vc-toggle-read-only t))
232 (ede-maybe-checkout)
233 (makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd)))) 228 (makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd))))
234 (replace-match "" t t nil 0) 229 (replace-match "" t t nil 0)
235 (makefile-fill-paragraph nil) 230 (makefile-fill-paragraph nil)
@@ -271,7 +266,6 @@ buffer being in order to provide a smart default target type."
271 (if (not ot) (error "Error creating target object %S" ntype)) 266 (if (not ot) (error "Error creating target object %S" ntype))
272 (ede-with-projectfile ot 267 (ede-with-projectfile ot
273 (goto-char (point-min)) 268 (goto-char (point-min))
274 (ede-maybe-checkout)
275 (makefile-next-dependency) 269 (makefile-next-dependency)
276 (if (= (point) (point-min)) 270 (if (= (point) (point-min))
277 (goto-char (point-max)) 271 (goto-char (point-max))
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el
index fc4536ba88a..053180d4a8b 100644
--- a/lisp/cedet/ede/util.el
+++ b/lisp/cedet/ede/util.el
@@ -87,12 +87,7 @@ their sources to VERSION."
87If BUFFER isn't specified, use the current buffer." 87If BUFFER isn't specified, use the current buffer."
88 (save-excursion 88 (save-excursion
89 (if buffer (set-buffer buffer)) 89 (if buffer (set-buffer buffer))
90 (if buffer-read-only 90 (toggle-read-only -1)))
91 (if (and vc-mode
92 (y-or-n-p (format "Check out %s? " (buffer-file-name))))
93 (vc-toggle-read-only)
94 (if (not vc-mode)
95 (toggle-read-only -1))))))
96 91
97(provide 'ede/util) 92(provide 'ede/util)
98 93
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index ce9af0e12b5..34d886b6807 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -1055,8 +1055,10 @@ The possible elements of this list include the following:
1055 1055
1056;;;###autoload 1056;;;###autoload
1057(define-minor-mode semantic-mode 1057(define-minor-mode semantic-mode
1058 "Toggle Semantic mode. 1058 "Toggle parser features (Semantic mode).
1059With ARG, turn Semantic mode on if ARG is positive, off otherwise. 1059With a prefix argument ARG, enable Semantic mode if ARG is
1060positive, and disable it otherwise. If called from Lisp, enable
1061Semantic mode if ARG is omitted or nil.
1060 1062
1061In Semantic mode, Emacs parses the buffers you visit for their 1063In Semantic mode, Emacs parses the buffers you visit for their
1062semantic content. This information is used by a variety of 1064semantic content. This information is used by a variety of
diff --git a/lisp/composite.el b/lisp/composite.el
index 11a3d5ba388..487962ee07c 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -728,12 +728,13 @@ This function is the default value of `auto-composition-function' (which see)."
728;;;###autoload 728;;;###autoload
729(define-minor-mode auto-composition-mode 729(define-minor-mode auto-composition-mode
730 "Toggle Auto Composition mode. 730 "Toggle Auto Composition mode.
731With ARG, turn Auto Composition mode off if and only if ARG is a non-positive 731With a prefix argument ARG, enable Auto Composition mode if ARG
732number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto 732is positive, and disable it otherwise. If called from Lisp,
733Composition on. 733enable the mode if ARG is omitted or nil.
734 734
735When Auto Composition is enabled, text characters are automatically composed 735When Auto Composition mode is enabled, text characters are
736by functions registered in `composition-function-table' (which see). 736automatically composed by functions registered in
737`composition-function-table'.
737 738
738You can use `global-auto-composition-mode' to turn on 739You can use `global-auto-composition-mode' to turn on
739Auto Composition mode in all buffers (this is the default)." 740Auto Composition mode in all buffers (this is the default)."
@@ -744,10 +745,13 @@ Auto Composition mode in all buffers (this is the default)."
744 745
745;;;###autoload 746;;;###autoload
746(define-minor-mode global-auto-composition-mode 747(define-minor-mode global-auto-composition-mode
747 "Toggle Auto-Composition mode in every possible buffer. 748 "Toggle Auto Composition mode in all buffers.
748With prefix arg, turn Global-Auto-Composition mode on if and only if arg 749With a prefix argument ARG, enable it if ARG is positive, and
749is positive. 750disable it otherwise. If called from Lisp, enable it if ARG is
750See `auto-composition-mode' for more information on Auto-Composition mode." 751omitted or nil.
752
753For more information on Auto Composition mode, see
754`auto-composition-mode' ."
751 :variable (default-value 'auto-composition-mode)) 755 :variable (default-value 'auto-composition-mode))
752 756
753(defalias 'toggle-auto-composition 'auto-composition-mode) 757(defalias 'toggle-auto-composition 'auto-composition-mode)
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 705b64be89d..6d2c47f3957 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -56,8 +56,9 @@
56;;;###autoload 56;;;###autoload
57(define-minor-mode delete-selection-mode 57(define-minor-mode delete-selection-mode
58 "Toggle Delete Selection mode. 58 "Toggle Delete Selection mode.
59With prefix ARG, turn Delete Selection mode on if ARG is 59With a prefix argument ARG, enable Delete Selection mode if ARG
60positive, off if ARG is not positive. 60is positive, and disable it otherwise. If called from Lisp,
61enable the mode if ARG is omitted or nil.
61 62
62When Delete Selection mode is enabled, Transient Mark mode is also 63When Delete Selection mode is enabled, Transient Mark mode is also
63enabled and typed text replaces the selection if the selection is 64enabled and typed text replaces the selection if the selection is
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 7d267cec480..c175bd7c3c7 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -606,7 +606,8 @@ as well as widgets, buttons, overlays, and text properties."
606 'trailing-whitespace) 606 'trailing-whitespace)
607 ((and nobreak-char-display char (eq char '#xa0)) 607 ((and nobreak-char-display char (eq char '#xa0))
608 'nobreak-space) 608 'nobreak-space)
609 ((and nobreak-char-display char (eq char '#xad)) 609 ((and nobreak-char-display char
610 (memq char '(#xad #x2010 #x2011)))
610 'escape-glyph) 611 'escape-glyph)
611 ((and (< char 32) (not (memq char '(9 10)))) 612 ((and (< char 32) (not (memq char '(9 10))))
612 'escape-glyph))))) 613 'escape-glyph)))))
diff --git a/lisp/desktop.el b/lisp/desktop.el
index c60745a6b16..cdc787dfde9 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -147,11 +147,14 @@ backward compatibility.")
147 147
148;;;###autoload 148;;;###autoload
149(define-minor-mode desktop-save-mode 149(define-minor-mode desktop-save-mode
150 "Toggle desktop saving mode. 150 "Toggle desktop saving (Desktop Save mode).
151With numeric ARG, turn desktop saving on if ARG is positive, off 151With a prefix argument ARG, enable Desktop Save mode if ARG is
152otherwise. If desktop saving is turned on, the state of Emacs is 152positive, and disable it otherwise. If called from Lisp, enable
153saved from one session to another. See variable `desktop-save' 153the mode if ARG is omitted or nil.
154and function `desktop-read' for details." 154
155If Desktop Save mode is enabled, the state of Emacs is saved from
156one session to another. See variable `desktop-save' and function
157`desktop-read' for details."
155 :global t 158 :global t
156 :group 'desktop) 159 :group 'desktop)
157 160
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 0f2cfd4973f..aaddc479b2a 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -133,16 +133,20 @@ If nil, there is no maximum size."
133 :group 'dired-x) 133 :group 'dired-x)
134 134
135(define-minor-mode dired-omit-mode 135(define-minor-mode dired-omit-mode
136 "Toggle Dired-Omit mode. 136 "Toggle omission of uninteresting files in Dired (Dired-Omit mode).
137With numeric ARG, enable Dired-Omit mode if ARG is positive, disable 137With a prefix argument ARG, enable Dired-Omit mode if ARG is
138otherwise. Enabling and disabling is buffer-local. 138positive, and disable it otherwise. If called from Lisp, enable
139If enabled, \"uninteresting\" files are not listed. 139the mode if ARG is omitted or nil.
140Uninteresting files are those whose filenames match regexp `dired-omit-files',
141plus those ending with extensions in `dired-omit-extensions'.
142 140
143To enable omitting in every Dired buffer, you can put in your ~/.emacs 141Dired-Omit mode is a buffer-local minor mode. When enabled in a
142Dired buffer, Dired does not list files whose filenames match
143regexp `dired-omit-files', nor files ending with extensions in
144`dired-omit-extensions'.
144 145
145 (add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1))) 146To enable omitting in every Dired buffer, you can put this in
147your init file:
148
149 (add-hook 'dired-mode-hook (lambda () (dired-omit-mode)))
146 150
147See Info node `(dired-x) Omitting Variables' for more information." 151See Info node `(dired-x) Omitting Variables' for more information."
148 :group 'dired-x 152 :group 'dired-x
diff --git a/lisp/dired.el b/lisp/dired.el
index 60ba14ade84..3ff86869a78 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4128,7 +4128,7 @@ instead.
4128;;;*** 4128;;;***
4129 4129
4130;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) 4130;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
4131;;;;;; "dired-x" "dired-x.el" "219648338c42c7912fa336680b434db0") 4131;;;;;; "dired-x" "dired-x.el" "0a19e4cb2cadf007be715af1035c9c36")
4132;;; Generated autoloads from dired-x.el 4132;;; Generated autoloads from dired-x.el
4133 4133
4134(autoload 'dired-jump "dired-x" "\ 4134(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 23a05816a2d..eef8c111da5 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -183,7 +183,11 @@ and ends with a forward slash."
183 183
184;;;###autoload 184;;;###autoload
185(define-minor-mode dirtrack-mode 185(define-minor-mode dirtrack-mode
186 "Enable or disable Dirtrack directory tracking in a shell buffer. 186 "Toggle directory tracking in shell buffers (Dirtrack mode).
187With a prefix argument ARG, enable Dirtrack mode if ARG is
188positive, and disable it otherwise. If called from Lisp, enable
189the mode if ARG is omitted or nil.
190
187This method requires that your shell prompt contain the full 191This method requires that your shell prompt contain the full
188current working directory at all times, and that `dirtrack-list' 192current working directory at all times, and that `dirtrack-list'
189is set to match the prompt. This is an alternative to 193is set to match the prompt. This is an alternative to
@@ -199,7 +203,7 @@ and similar commands which change the shell working directory."
199 203
200 204
201(define-minor-mode dirtrack-debug-mode 205(define-minor-mode dirtrack-debug-mode
202 "Enable or disable Dirtrack debugging." 206 "Toggle Dirtrack debugging."
203 nil nil nil 207 nil nil nil
204 (if dirtrack-debug-mode 208 (if dirtrack-debug-mode
205 (display-buffer (get-buffer-create dirtrack-debug-buffer)))) 209 (display-buffer (get-buffer-create dirtrack-debug-buffer))))
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 872b2172c7e..ceaad83cd7c 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1502,8 +1502,11 @@ to the next best mode."
1502 1502
1503;;;###autoload 1503;;;###autoload
1504(define-minor-mode doc-view-minor-mode 1504(define-minor-mode doc-view-minor-mode
1505 "Toggle Doc view minor mode. 1505 "Toggle displaying buffer via Doc View (Doc View minor mode).
1506With arg, turn Doc view minor mode on if arg is positive, off otherwise. 1506With a prefix argument ARG, enable Doc View minor mode if ARG is
1507positive, and disable it otherwise. If called from Lisp, enable
1508the mode if ARG is omitted or nil.
1509
1507See the command `doc-view-mode' for more information on this mode." 1510See the command `doc-view-mode' for more information on this mode."
1508 nil " DocView" doc-view-minor-mode-map 1511 nil " DocView" doc-view-minor-mode-map
1509 :group 'doc-view 1512 :group 'doc-view
diff --git a/lisp/double.el b/lisp/double.el
index 4aa8da72af7..2a845f61942 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -146,12 +146,13 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
146 146
147;;;###autoload 147;;;###autoload
148(define-minor-mode double-mode 148(define-minor-mode double-mode
149 "Toggle Double mode. 149 "Toggle special insertion on double keypresses (Double mode).
150With prefix argument ARG, turn Double mode on if ARG is positive, otherwise 150With a prefix argument ARG, enable Double mode if ARG is
151turn it off. 151positive, and disable it otherwise. If called from Lisp, enable
152the mode if ARG is omitted or nil.
152 153
153When Double mode is on, some keys will insert different strings 154When Double mode is enabled, some keys will insert different
154when pressed twice. See variable `double-map' for details." 155strings when pressed twice. See `double-map' for details."
155 :lighter " Double" 156 :lighter " Double"
156 :link '(emacs-commentary-link "double") 157 :link '(emacs-commentary-link "double")
157 (kill-local-variable 'key-translation-map) 158 (kill-local-variable 'key-translation-map)
diff --git a/lisp/electric.el b/lisp/electric.el
index 17c33c7d5cd..26fba20ea12 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -241,8 +241,14 @@ Returns nil when we can't find this char."
241 241
242;;;###autoload 242;;;###autoload
243(define-minor-mode electric-indent-mode 243(define-minor-mode electric-indent-mode
244 "Automatically reindent lines of code when inserting particular chars. 244 "Toggle on-the-fly reindentation (Electric Indent mode).
245`electric-indent-chars' specifies the set of chars that should cause reindentation." 245With a prefix argument ARG, enable Electric Indent mode if ARG is
246positive, and disable it otherwise. If called from Lisp, enable
247the mode if ARG is omitted or nil.
248
249Electric Indent mode is a global minor mode. When enabled,
250reindentation is triggered whenever you insert a character listed
251in `electric-indent-chars'."
246 :global t 252 :global t
247 :group 'electricity 253 :group 'electricity
248 (if electric-indent-mode 254 (if electric-indent-mode
@@ -330,7 +336,14 @@ This can be convenient for people who find it easier to hit ) than C-f."
330 336
331;;;###autoload 337;;;###autoload
332(define-minor-mode electric-pair-mode 338(define-minor-mode electric-pair-mode
333 "Automatically pair-up parens when inserting an open paren." 339 "Toggle automatic parens pairing (Electric Pair mode).
340With a prefix argument ARG, enable Electric Pair mode if ARG is
341positive, and disable it otherwise. If called from Lisp, enable
342the mode if ARG is omitted or nil.
343
344Electric Pair mode is a global minor mode. When enabled, typing
345an open parenthesis automatically inserts the corresponding
346closing parenthesis. \(Likewise for brackets, etc.)"
334 :global t 347 :global t
335 :group 'electricity 348 :group 'electricity
336 (if electric-pair-mode 349 (if electric-pair-mode
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 7eb6e6ef765..c9e32023187 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1237,9 +1237,10 @@ generating a buffered list of errors."
1237 1237
1238;;;###autoload 1238;;;###autoload
1239(define-minor-mode checkdoc-minor-mode 1239(define-minor-mode checkdoc-minor-mode
1240 "Toggle Checkdoc minor mode, a mode for checking Lisp doc strings. 1240 "Toggle automatic docstring checking (Checkdoc minor mode).
1241With prefix ARG, turn Checkdoc minor mode on if ARG is positive, otherwise 1241With a prefix argument ARG, enable Checkdoc minor mode if ARG is
1242turn it off. 1242positive, and disable it otherwise. If called from Lisp, enable
1243the mode if ARG is omitted or nil.
1243 1244
1244In Checkdoc minor mode, the usual bindings for `eval-defun' which is 1245In Checkdoc minor mode, the usual bindings for `eval-defun' which is
1245bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include 1246bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 46dc1f162ba..b1cb0615e43 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -350,14 +350,16 @@ call another major mode in their body."
350 (define-minor-mode ,global-mode 350 (define-minor-mode ,global-mode
351 ;; Very short lines to avoid too long lines in the generated 351 ;; Very short lines to avoid too long lines in the generated
352 ;; doc string. 352 ;; doc string.
353 ,(format "Toggle %s in every possible buffer. 353 ,(format "Toggle %s in all buffers.
354With prefix ARG, turn %s on if and only if 354With prefix ARG, enable %s if ARG is positive;
355ARG is positive. 355otherwise, disable it. If called from Lisp, enable the mode if
356ARG is omitted or nil.
357
356%s is enabled in all buffers where 358%s is enabled in all buffers where
357\`%s' would do it. 359\`%s' would do it.
358See `%s' for more information on %s." 360See `%s' for more information on %s."
359 pretty-name pretty-global-name pretty-name turn-on 361 pretty-name pretty-global-name
360 mode pretty-name) 362 pretty-name turn-on mode pretty-name)
361 :global t ,@group ,@(nreverse extra-keywords) 363 :global t ,@group ,@(nreverse extra-keywords)
362 364
363 ;; Setup hook to handle future mode changes and new buffers. 365 ;; Setup hook to handle future mode changes and new buffers.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index cd9b779bee9..901b6d1bf6a 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -149,14 +149,17 @@ This is used to determine if `eldoc-idle-delay' is changed by the user.")
149 149
150;;;###autoload 150;;;###autoload
151(define-minor-mode eldoc-mode 151(define-minor-mode eldoc-mode
152 "Toggle ElDoc mode on or off. 152 "Toggle echo area display of Lisp objects at point (ElDoc mode).
153In ElDoc mode, the echo area displays information about a 153With a prefix argument ARG, enable ElDoc mode if ARG is positive,
154function or variable in the text where point is. If point is 154and disable it otherwise. If called from Lisp, enable ElDoc mode
155on a documented variable, it displays the first line of that 155if ARG is omitted or nil.
156variable's doc string. Otherwise it displays the argument list 156
157of the function called in the expression point is on. 157ElDoc mode is a buffer-local minor mode. When enabled, the echo
158 158area displays information about a function or variable in the
159With prefix ARG, turn ElDoc mode on if and only if ARG is positive." 159text where point is. If point is on a documented variable, it
160displays the first line of that variable's doc string. Otherwise
161it displays the argument list of the function called in the
162expression point is on."
160 :group 'eldoc :lighter eldoc-minor-mode-string 163 :group 'eldoc :lighter eldoc-minor-mode-string
161 (setq eldoc-last-message nil) 164 (setq eldoc-last-message nil)
162 (if eldoc-mode 165 (if eldoc-mode
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 18411f7d2ef..f2c93473015 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -176,14 +176,16 @@ Return a value appropriate for `kill-buffer-query-functions' (which see)."
176 176
177;;;###autoload 177;;;###autoload
178(define-minor-mode emacs-lock-mode 178(define-minor-mode emacs-lock-mode
179 "Toggle Emacs Lock mode in the current buffer. 179 "Toggle Emacs Lock mode in the current buffer.
180 180If called with a plain prefix argument, ask for the locking mode
181With \\[universal-argument], ask for the locking mode to be used. 181to be used. With any other prefix ARG, turn mode on if ARG is
182With other prefix ARG, turn mode on if ARG is positive, off otherwise. 182positive, off otherwise. If called from Lisp, enable the mode if
183 183ARG is omitted or nil.
184Initially, if the user does not pass an explicit locking mode, it defaults 184
185to `emacs-lock-default-locking-mode' (which see); afterwards, the locking 185Initially, if the user does not pass an explicit locking mode, it
186mode most recently set on the buffer is used instead. 186defaults to `emacs-lock-default-locking-mode' (which see);
187afterwards, the locking mode most recently set on the buffer is
188used instead.
187 189
188When called from Elisp code, ARG can be any locking mode: 190When called from Elisp code, ARG can be any locking mode:
189 191
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index b2806e8f8eb..567a57949b3 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -349,8 +349,10 @@ normal CRiSP binding) and when it is nil M-x will run
349 349
350;;;###autoload 350;;;###autoload
351(define-minor-mode crisp-mode 351(define-minor-mode crisp-mode
352 "Toggle CRiSP/Brief emulation minor mode. 352 "Toggle CRiSP/Brief emulation (CRiSP mode).
353With ARG, turn CRiSP mode on if ARG is positive, off otherwise." 353With a prefix argument ARG, enable CRiSP mode if ARG is positive,
354and disable it otherwise. If called from Lisp, enable the mode
355if ARG is omitted or nil."
354 :keymap crisp-mode-map 356 :keymap crisp-mode-map
355 :lighter crisp-mode-modeline-string 357 :lighter crisp-mode-modeline-string
356 (when crisp-mode 358 (when crisp-mode
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index b643d521ad6..9a50352d507 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1121,7 +1121,7 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark."
1121 (pop-to-mark-command))) 1121 (pop-to-mark-command)))
1122 ((and cua-toggle-set-mark mark-active) 1122 ((and cua-toggle-set-mark mark-active)
1123 (cua--deactivate) 1123 (cua--deactivate)
1124 (message "Mark Cleared")) 1124 (message "Mark cleared"))
1125 (t 1125 (t
1126 (push-mark-command nil nil) 1126 (push-mark-command nil nil)
1127 (setq cua--explicit-region-start t) 1127 (setq cua--explicit-region-start t)
@@ -1531,16 +1531,17 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1531 1531
1532;;;###autoload 1532;;;###autoload
1533(define-minor-mode cua-mode 1533(define-minor-mode cua-mode
1534 "Toggle CUA key-binding mode. 1534 "Toggle Common User Access style editing (CUA mode).
1535When enabled, using shifted movement keys will activate the 1535With a prefix argument ARG, enable CUA mode if ARG is positive,
1536region (and highlight the region using `transient-mark-mode'), 1536and disable it otherwise. If called from Lisp, enable the mode
1537and typed text replaces the active selection. 1537if ARG is omitted or nil.
1538 1538
1539Also when enabled, you can use C-z, C-x, C-c, and C-v to undo, 1539CUA mode is a global minor mode. When enabled, typed text
1540cut, copy, and paste in addition to the normal Emacs bindings. 1540replaces the active selection, and you can use C-z, C-x, C-c, and
1541The C-x and C-c keys only do cut and copy when the region is 1541C-v to undo, cut, copy, and paste in addition to the normal Emacs
1542active, so in most cases, they do not conflict with the normal 1542bindings. The C-x and C-c keys only do cut and copy when the
1543function of these prefix keys. 1543region is active, so in most cases, they do not conflict with the
1544normal function of these prefix keys.
1544 1545
1545If you really need to perform a command which starts with one of 1546If you really need to perform a command which starts with one of
1546the prefix keys even when the region is active, you have three 1547the prefix keys even when the region is active, you have three
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el
index 652ab19ba65..ea036e836e4 100644
--- a/lisp/epa-hook.el
+++ b/lisp/epa-hook.el
@@ -49,7 +49,7 @@ does that automatically."
49 :group 'epa-file) 49 :group 'epa-file)
50 50
51(defvar epa-file-encrypt-to nil 51(defvar epa-file-encrypt-to nil
52 "*Recipient(s) used for encrypting files. 52 "Recipient(s) used for encrypting files.
53May either be a string or a list of strings.") 53May either be a string or a list of strings.")
54 54
55(put 'epa-file-encrypt-to 'safe-local-variable 55(put 'epa-file-encrypt-to 'safe-local-variable
@@ -83,9 +83,10 @@ May either be a string or a list of strings.")
83 (auto-save-mode 0))) 83 (auto-save-mode 0)))
84 84
85(define-minor-mode auto-encryption-mode 85(define-minor-mode auto-encryption-mode
86 "Toggle automatic file encryption and decryption. 86 "Toggle automatic file encryption/decryption (Auto Encryption mode).
87With prefix argument ARG, turn auto encryption on if positive, else off. 87With a prefix argument ARG, enable Auto Encryption mode if ARG is
88Return the new status of auto encryption (non-nil means on)." 88positive, and disable it otherwise. If called from Lisp, enable
89the mode if ARG is omitted or nil."
89 :global t :init-value t :group 'epa-file :version "23.1" 90 :global t :init-value t :group 'epa-file :version "23.1"
90 ;; We'd like to use custom-initialize-set here so the setup is done 91 ;; We'd like to use custom-initialize-set here so the setup is done
91 ;; before dumping, but at the point where the defcustom is evaluated, 92 ;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 7c7f10de2c8..d72d3f51bb1 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,11 @@
12011-10-20 Chong Yidong <cyd@gnu.org>
2
3 * erc.el (define-erc-module): Fix autogenerated docstring to
4 reflect Emacs 24 minor mode changes.
5
6 * erc-fill.el (erc-fill-mode):
7 * erc-track.el (erc-track-minor-mode): Doc fix.
8
12011-09-23 Antoine Levitt <antoine.levitt@gmail.com> 92011-09-23 Antoine Levitt <antoine.levitt@gmail.com>
2 10
3 * erc-button.el (erc-button-next-function): Scoping fix 11 * erc-button.el (erc-button-next-function): Scoping fix
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 0b9a4051d65..3940cfbc9a4 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -39,9 +39,12 @@
39;;;###autoload (autoload 'erc-fill-mode "erc-fill" nil t) 39;;;###autoload (autoload 'erc-fill-mode "erc-fill" nil t)
40(erc-define-minor-mode erc-fill-mode 40(erc-define-minor-mode erc-fill-mode
41 "Toggle ERC fill mode. 41 "Toggle ERC fill mode.
42With numeric arg, turn ERC fill mode on if and only if arg is 42With a prefix argument ARG, enable ERC fill mode if ARG is
43positive. In ERC fill mode, messages in the channel buffers are 43positive, and disable it otherwise. If called from Lisp, enable
44filled." 44the mode if ARG is omitted or nil.
45
46ERC fill mode is a global minor mode. When enabled, messages in
47the channel buffers are filled."
45 nil nil nil 48 nil nil nil
46 :global t :group 'erc-fill 49 :global t :group 'erc-fill
47 (if erc-fill-mode 50 (if erc-fill-mode
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 28c1ced91c6..b663aeed423 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -588,12 +588,15 @@ START is the minimum length of the name used."
588 588
589;;;###autoload 589;;;###autoload
590(define-minor-mode erc-track-minor-mode 590(define-minor-mode erc-track-minor-mode
591 "Global minor mode for tracking ERC buffers and showing activity in the 591 "Toggle mode line display of ERC activity (ERC Track minor mode).
592mode line. 592With a prefix argument ARG, enable ERC Track minor mode if ARG is
593 593positive, and disable it otherwise. If called from Lisp, enable
594This exists for the sole purpose of providing the C-c C-SPC and 594the mode if ARG is omitted or nil.
595C-c C-@ keybindings. Make sure that you have enabled the track 595
596module, otherwise the keybindings will not do anything useful." 596ERC Track minor mode is a global minor mode. It exists for the
597sole purpose of providing the C-c C-SPC and C-c C-@ keybindings.
598Make sure that you have enabled the track module, otherwise the
599keybindings will not do anything useful."
597 :init-value nil 600 :init-value nil
598 :lighter "" 601 :lighter ""
599 :keymap erc-track-minor-mode-map 602 :keymap erc-track-minor-mode-map
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a4040b239c1..2d8c2565f69 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1242,7 +1242,9 @@ Example:
1242 (erc-define-minor-mode 1242 (erc-define-minor-mode
1243 ,mode 1243 ,mode
1244 ,(format "Toggle ERC %S mode. 1244 ,(format "Toggle ERC %S mode.
1245With arg, turn ERC %S mode on if and only if arg is positive. 1245With a prefix argument ARG, enable %s if ARG is positive,
1246and disable it otherwise. If called from Lisp, enable the mode
1247if ARG is omitted or nil.
1246%s" name name doc) 1248%s" name name doc)
1247 nil nil nil 1249 nil nil nil
1248 :global ,(not local-p) :group (quote ,group) 1250 :global ,(not local-p) :group (quote ,group)
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 9e5ab58636b..bfd973a299f 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -204,7 +204,7 @@ Each positive or negative step scales the default face height by this amount."
204(make-variable-buffer-local 'text-scale-mode-amount) 204(make-variable-buffer-local 'text-scale-mode-amount)
205 205
206(define-minor-mode text-scale-mode 206(define-minor-mode text-scale-mode
207 "Minor mode for displaying buffer text in a larger/smaller font than usual. 207 "Minor mode for displaying buffer text in a larger/smaller font.
208 208
209The amount of scaling is determined by the variable 209The amount of scaling is determined by the variable
210`text-scale-mode-amount': one step scales the global default 210`text-scale-mode-amount': one step scales the global default
diff --git a/lisp/files.el b/lisp/files.el
index 6321cff91fd..3ed9bd5a272 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4700,11 +4700,7 @@ and `view-read-only' is non-nil, enter view mode."
4700 (not (eq (get major-mode 'mode-class) 'special))) 4700 (not (eq (get major-mode 'mode-class) 'special)))
4701 (view-mode-enter)) 4701 (view-mode-enter))
4702 (t (setq buffer-read-only (not buffer-read-only)) 4702 (t (setq buffer-read-only (not buffer-read-only))
4703 (force-mode-line-update))) 4703 (force-mode-line-update)))))
4704 (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
4705 (message "%s" (substitute-command-keys
4706 (concat "File is under version-control; "
4707 "use \\[vc-next-action] to check in/out"))))))
4708 4704
4709(defun insert-file (filename) 4705(defun insert-file (filename)
4710 "Insert contents of file FILENAME into buffer after point. 4706 "Insert contents of file FILENAME into buffer after point.
diff --git a/lisp/follow.el b/lisp/follow.el
index 94a542f1016..37295cc533b 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -484,10 +484,13 @@ Used by `follow-window-size-change'.")
484(put 'follow-mode 'permanent-local t) 484(put 'follow-mode 'permanent-local t)
485;;;###autoload 485;;;###autoload
486(define-minor-mode follow-mode 486(define-minor-mode follow-mode
487 "Minor mode that combines windows into one tall virtual window. 487 "Toggle Follow mode.
488With a prefix argument ARG, enable Follow mode if ARG is
489positive, and disable it otherwise. If called from Lisp, enable
490the mode if ARG is omitted or nil.
488 491
489The feeling of a \"virtual window\" has been accomplished by the use 492Follow mode is a minor mode that combines windows into one tall
490of two major techniques: 493virtual window. This is accomplished by two main techniques:
491 494
492* The windows always displays adjacent sections of the buffer. 495* The windows always displays adjacent sections of the buffer.
493 This means that whenever one window is moved, all the 496 This means that whenever one window is moved, all the
diff --git a/lisp/font-core.el b/lisp/font-core.el
index fcaaf33b718..0db17efd7b7 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -86,12 +86,12 @@ It will be passed one argument, which is the current value of
86 86
87;; The mode for which font-lock was initialized, or nil if none. 87;; The mode for which font-lock was initialized, or nil if none.
88(defvar font-lock-major-mode) 88(defvar font-lock-major-mode)
89
89(define-minor-mode font-lock-mode 90(define-minor-mode font-lock-mode
90 "Toggle Font Lock mode. 91 "Toggle syntax highlighting in this buffer (Font Lock mode).
91With arg, turn Font Lock mode off if and only if arg is a non-positive 92With a prefix argument ARG, enable Font Lock mode if ARG is
92number; if arg is nil, toggle Font Lock mode; anything else turns Font 93positive, and disable it otherwise. If called from Lisp, enable
93Lock on. 94the mode if ARG is omitted or nil.
94\(Font Lock is also known as \"syntax highlighting\".)
95 95
96When Font Lock mode is enabled, text is fontified as you type it: 96When Font Lock mode is enabled, text is fontified as you type it:
97 97
diff --git a/lisp/frame.el b/lisp/frame.el
index ab9b085f1d9..8359fed14a4 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1134,7 +1134,10 @@ To get the frame's current border color, use `frame-parameters'."
1134 1134
1135(define-minor-mode auto-raise-mode 1135(define-minor-mode auto-raise-mode
1136 "Toggle whether or not the selected frame should auto-raise. 1136 "Toggle whether or not the selected frame should auto-raise.
1137With ARG, turn auto-raise mode on if and only if ARG is positive. 1137With a prefix argument ARG, enable Auto Raise mode if ARG is
1138positive, and disable it otherwise. If called from Lisp, enable
1139the mode if ARG is omitted or nil.
1140
1138Note that this controls Emacs's own auto-raise feature. 1141Note that this controls Emacs's own auto-raise feature.
1139Some window managers allow you to enable auto-raise for certain windows. 1142Some window managers allow you to enable auto-raise for certain windows.
1140You can use that for Emacs windows if you wish, but if you do, 1143You can use that for Emacs windows if you wish, but if you do,
@@ -1145,7 +1148,10 @@ that is beyond the control of Emacs and this command has no effect on it."
1145 1148
1146(define-minor-mode auto-lower-mode 1149(define-minor-mode auto-lower-mode
1147 "Toggle whether or not the selected frame should auto-lower. 1150 "Toggle whether or not the selected frame should auto-lower.
1148With ARG, turn auto-lower mode on if and only if ARG is positive. 1151With a prefix argument ARG, enable Auto Lower mode if ARG is
1152positive, and disable it otherwise. If called from Lisp, enable
1153the mode if ARG is omitted or nil.
1154
1149Note that this controls Emacs's own auto-lower feature. 1155Note that this controls Emacs's own auto-lower feature.
1150Some window managers allow you to enable auto-lower for certain windows. 1156Some window managers allow you to enable auto-lower for certain windows.
1151You can use that for Emacs windows if you wish, but if you do, 1157You can use that for Emacs windows if you wish, but if you do,
@@ -1556,14 +1562,13 @@ itself as a pre-command hook."
1556 (setq blink-cursor-timer nil))) 1562 (setq blink-cursor-timer nil)))
1557 1563
1558(define-minor-mode blink-cursor-mode 1564(define-minor-mode blink-cursor-mode
1559 "Toggle blinking cursor mode. 1565 "Toggle cursor blinking (Blink Cursor mode).
1560With a numeric argument, turn blinking cursor mode on if ARG is positive, 1566With a prefix argument ARG, enable Blink Cursor mode if ARG is
1561otherwise turn it off. When blinking cursor mode is enabled, the 1567positive, and disable it otherwise. If called from Lisp, enable
1562cursor of the selected window blinks. 1568the mode if ARG is omitted or nil.
1563 1569
1564Note that this command is effective only when Emacs 1570This command is effective only on graphical frames. On text-only
1565displays through a window system, because then Emacs does its own 1571terminals, cursor blinking is controlled by the terminal."
1566cursor display. On a text-only terminal, this is not implemented."
1567 :init-value (not (or noninteractive 1572 :init-value (not (or noninteractive
1568 no-blinking-cursor 1573 no-blinking-cursor
1569 (eq system-type 'ms-dos) 1574 (eq system-type 'ms-dos)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index b7f41e22e50..592d0671c26 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12011-10-20 Chong Yidong <cyd@gnu.org>
2
3 * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
4 calling a minor mode from Lisp with nil arg enables it, so we have to
5 make the working a bit ambiguous here).
6
12011-10-18 Teodor Zlatanov <tzz@lifelogs.com> 72011-10-18 Teodor Zlatanov <tzz@lifelogs.com>
2 8
3 * gnus-util.el (gnus-bound-and-true-p): Macro for XEmacs compatibility. 9 * gnus-util.el (gnus-bound-and-true-p): Macro for XEmacs compatibility.
@@ -8,9 +14,9 @@
8 * nnir.el (gnus-registry-enabled): Defvar to keep the compiler happy. 14 * nnir.el (gnus-registry-enabled): Defvar to keep the compiler happy.
9 * nnmairix.el (gnus-registry-enabled): Ditto. 15 * nnmairix.el (gnus-registry-enabled): Ditto.
10 16
112011-10-17 Teodor Zlatanov <tzz@lifelogs.com> 172011-10-17 Dave Abrahams <dave@boostpro.com>
12 18
13 * gnus-registry.el (gnus-registry-enabled): Add new variable. 19 * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691)
14 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask 20 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
15 only while we need to find out if it should be t or nil. 21 only while we need to find out if it should be t or nil.
16 (gnus-registry-initialize): Don't set `gnus-registry-install' to t. 22 (gnus-registry-initialize): Don't set `gnus-registry-install' to t.
@@ -24,7 +30,6 @@
24 Use `gnus-registry-enabled' instead of `gnus-registry-install'. 30 Use `gnus-registry-enabled' instead of `gnus-registry-install'.
25 * nnir.el (nnir-mode): Use `gnus-registry-enabled' instead of 31 * nnir.el (nnir-mode): Use `gnus-registry-enabled' instead of
26 `gnus-registry-install'. 32 `gnus-registry-install'.
27 From Dave Abrahams <dave@boostpro.com>.
28 33
292011-10-17 Daiki Ueno <ueno@unixuser.org> 342011-10-17 Daiki Ueno <ueno@unixuser.org>
30 35
@@ -13104,13 +13109,11 @@
13104 (mml-secure-cache-passphrase): New user option. 13109 (mml-secure-cache-passphrase): New user option.
13105 (mml-secure-passphrase-cache-expiry): New user option. 13110 (mml-secure-passphrase-cache-expiry): New user option.
13106 13111
131072006-07-24 Daiki Ueno <ueno@unixuser.org> 131122006-07-24 David Smith <davidsmith@acm.org> (tiny change)
13108 13113 Andreas Vögele <andreas@altroot.de> (tiny change)
13109 * pgg-def.el (pgg-truncate-key-identifier): Truncate the key ID to 8
13110 letters from the end. Thanks to "David Smith" <davidsmith@acm.org> and
13111 andreas@altroot.de (Andreas Vögele).
13112 13114
13113 FIXME: Use `tiny change'? 13115 * pgg-def.el (pgg-truncate-key-identifier):
13116 Truncate the key ID to 8 letters from the end.
13114 13117
131152006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> 131182006-07-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
13116 13119
@@ -19806,7 +19809,7 @@
19806 19809
19807 * dns.el (dns-read-type): Add support for SVR. (small patch) 19810 * dns.el (dns-read-type): Add support for SVR. (small patch)
19808 19811
198092004-05-20 Teodor Zlatanov <tzz@lifelogs.com> 198122004-05-20 Adam Sjøgren <asjo@koldfront.dk>
19810 19813
19811 * spam.el (spam-use-crm114, spam-crm114, spam-crm114-program) 19814 * spam.el (spam-use-crm114, spam-crm114, spam-crm114-program)
19812 (spam-crm114-header, spam-crm114-spam-switch) 19815 (spam-crm114-header, spam-crm114-spam-switch)
@@ -19823,7 +19826,8 @@
19823 (spam-crm114-unregister-spam-routine) 19826 (spam-crm114-unregister-spam-routine)
19824 (spam-crm114-register-ham-routine) 19827 (spam-crm114-register-ham-routine)
19825 (spam-crm114-unregister-ham-routine): Add CRM114 support. 19828 (spam-crm114-unregister-ham-routine): Add CRM114 support.
19826 From asjo@koldfront.dk (Adam Sjøgren). 19829
198302004-05-20 Teodor Zlatanov <tzz@lifelogs.com>
19827 19831
19828 * gnus.el: Add spam-use-crm114. 19832 * gnus.el: Add spam-use-crm114.
19829 19833
@@ -19960,10 +19964,13 @@
19960 19964
199612004-05-18 Reiner Steib <Reiner.Steib@gmx.de> 199652004-05-18 Reiner Steib <Reiner.Steib@gmx.de>
19962 19966
19967 * gnus-picon.el (gnus-picon-insert-glyph):
19968 Add optional `nostring' argument.
19969
199702004-05-18 Jesper Harder <harder@ifa.au.dk>
19971
19963 * gnus-picon.el (gnus-picon-style): New variable. 19972 * gnus-picon.el (gnus-picon-style): New variable.
19964 (gnus-picon-insert-glyph): Add optional `nostring' argument.
19965 (gnus-picon-transform-address): Support `gnus-picon-style'. 19973 (gnus-picon-transform-address): Support `gnus-picon-style'.
19966 From Jesper Harder <harder@ifa.au.dk>.
19967 19974
199682004-05-18 Lars Magne Ingebrigtsen <larsi@gnus.org> 199752004-05-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
19969 19976
@@ -20222,13 +20229,10 @@
20222 * spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage. 20229 * spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage.
20223 Use mapc when appropriate. 20230 Use mapc when appropriate.
20224 20231
202252004-04-22 Teodor Zlatanov <tzz@lifelogs.com> 202322004-04-22 Dan Christensen <jdc@uwo.ca>
20226 20233 Adam Sjøgren <asjo@koldfront.dk>
20227 FIXME: Make separate entries for each person. 20234 Wes Hardaker <wes@hardakers.net>
20228 20235 Michael Shields <shields@msrl.com>
20229 From Dan Christensen <jdc@uwo.ca>, asjo@koldfront.dk (Adam
20230 Sjøgren), Wes Hardaker <wes@hardakers.net>, and Michael Shields
20231 <shields@msrl.com>:
20232 20236
20233 * spam.el (spam-necessary-extra-headers): Get the extra headers we 20237 * spam.el (spam-necessary-extra-headers): Get the extra headers we
20234 may need for spam sorting and scoring. 20238 may need for spam sorting and scoring.
@@ -20238,7 +20242,7 @@
20238 sorting. 20242 sorting.
20239 (spam-extra-header-to-number): Add function to get a score from a 20243 (spam-extra-header-to-number): Add function to get a score from a
20240 header. 20244 header.
20241 (spam-summary-score): Add function to get a numeric score from the 20245 (spam-summary-score): Add function to get a numeric score from the
20242 headers. 20246 headers.
20243 (spam-generic-score): Fix function doc, was in wrong place. 20247 (spam-generic-score): Fix function doc, was in wrong place.
20244 (spam-initialize): Take symbols when it's run, and install the 20248 (spam-initialize): Take symbols when it's run, and install the
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index d205437b811..7c36311356f 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1224,13 +1224,8 @@ Returns nil if there is no such line before LIMIT, t otherwise."
1224 (autoload 'font-lock-set-defaults "font-lock"))) 1224 (autoload 'font-lock-set-defaults "font-lock")))
1225 1225
1226(define-minor-mode gnus-message-citation-mode 1226(define-minor-mode gnus-message-citation-mode
1227 "Toggle `gnus-message-citation-mode' in current buffer. 1227 "Minor mode providing more font-lock support for nested citations.
1228This buffer local minor mode provides additional font-lock support for 1228When enabled, it automatically turns on `font-lock-mode'."
1229nested citations.
1230With prefix ARG, turn `gnus-message-citation-mode' on if and only if ARG
1231is positive.
1232Automatically turn `font-lock-mode' on when `gnus-message-citation-mode'
1233is turned on."
1234 nil ;; init-value 1229 nil ;; init-value
1235 "" ;; lighter 1230 "" ;; lighter
1236 nil ;; keymap 1231 nil ;; keymap
diff --git a/lisp/help.el b/lisp/help.el
index e2af0759a65..508a4e3262c 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -977,13 +977,15 @@ function is called, the window to be resized is selected."
977 :version "20.4") 977 :version "20.4")
978 978
979(define-minor-mode temp-buffer-resize-mode 979(define-minor-mode temp-buffer-resize-mode
980 "Toggle mode which makes windows smaller for temporary buffers. 980 "Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode).
981With prefix argument ARG, turn the resizing of windows displaying 981With a prefix argument ARG, enable Temp Buffer Resize mode if ARG
982temporary buffers on if ARG is positive or off otherwise. 982is positive, and disable it otherwise. If called from Lisp,
983 983enable the mode if ARG is omitted or nil.
984This mode makes a window the right height for its contents, but 984
985never more than `temp-buffer-max-height' nor less than 985When Temp Buffer Resize mode is enabled, the windows in which we
986`window-min-height'. 986show a temporary buffer are automatically reduced in height to
987fit the buffer's contents, but never more than
988`temp-buffer-max-height' nor less than `window-min-height'.
987 989
988This mode is used by `help', `apropos' and `completion' buffers, 990This mode is used by `help', `apropos' and `completion' buffers,
989and some others." 991and some others."
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index a254abe33ac..f659a7e8eef 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -283,14 +283,17 @@ a library is being loaded.")
283 283
284;;;###autoload 284;;;###autoload
285(define-minor-mode hi-lock-mode 285(define-minor-mode hi-lock-mode
286 "Toggle minor mode for interactively adding font-lock highlighting patterns. 286 "Toggle selective highlighting of patterns (Hi Lock mode).
287 287With a prefix argument ARG, enable Hi Lock mode if ARG is
288If ARG positive, turn hi-lock on. Issuing a hi-lock command will also 288positive, and disable it otherwise. If called from Lisp, enable
289turn hi-lock on. To turn hi-lock on in all buffers use 289the mode if ARG is omitted or nil.
290`global-hi-lock-mode' or in your .emacs file (global-hi-lock-mode 1). 290
291When hi-lock is turned on, a \"Regexp Highlighting\" submenu is added 291Issuing one the highlighting commands listed below will
292to the \"Edit\" menu. The commands in the submenu, which can be 292automatically enable Hi Lock mode. To enable Hi Lock mode in all
293called interactively, are: 293buffers, use `global-hi-lock-mode' or add (global-hi-lock-mode 1)
294to your init file. When Hi Lock mode is enabled, a \"Regexp
295Highlighting\" submenu is added to the \"Edit\" menu. The
296commands in the submenu, which can be called interactively, are:
294 297
295\\[highlight-regexp] REGEXP FACE 298\\[highlight-regexp] REGEXP FACE
296 Highlight matches of pattern REGEXP in current buffer with FACE. 299 Highlight matches of pattern REGEXP in current buffer with FACE.
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 041c1ee938b..46db4280688 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -326,14 +326,15 @@ remove it from existing buffers."
326 326
327;;;###autoload 327;;;###autoload
328(define-minor-mode highlight-changes-mode 328(define-minor-mode highlight-changes-mode
329 "Toggle Highlight Changes mode. 329 "Toggle highlighting changes in this buffer (Highlight Changes mode).
330With a prefix argument ARG, enable Highlight Changes mode if ARG
331is positive, and disable it otherwise. If called from Lisp,
332enable the mode if ARG is omitted or nil.
330 333
331With ARG, turn Highlight Changes mode on if and only if arg is positive. 334When Highlight Changes is enabled, changes are marked with a text
332 335property. Normally they are displayed in a distinctive face, but
333In Highlight Changes mode changes are recorded with a text property. 336command \\[highlight-changes-visible-mode] can be used to toggles
334Normally they are displayed in a distinctive face, but command 337this on and off.
335\\[highlight-changes-visible-mode] can be used to toggles this
336on and off.
337 338
338Other functions for buffers in this mode include: 339Other functions for buffers in this mode include:
339\\[highlight-changes-next-change] - move point to beginning of next change 340\\[highlight-changes-next-change] - move point to beginning of next change
@@ -366,14 +367,17 @@ buffer with the contents of a file
366 367
367;;;###autoload 368;;;###autoload
368(define-minor-mode highlight-changes-visible-mode 369(define-minor-mode highlight-changes-visible-mode
369 "Toggle visiblility of changes when buffer is in Highlight Changes mode. 370 "Toggle visiblility of highlighting due to Highlight Changes mode.
371With a prefix argument ARG, enable Highlight Changes Visible mode
372if ARG is positive, and disable it otherwise. If called from
373Lisp, enable the mode if ARG is omitted or nil.
370 374
371This mode only has an effect when Highlight Changes mode is on. 375Highlight Changes Visible mode only has an effect when Highlight
372It allows toggling between whether or not the changed text is displayed 376Changes mode is on. When enabled, the changed text is displayed
373in a distinctive face. 377in a distinctive face.
374 378
375The default value can be customized with variable 379The default value can be customized with variable
376`highlight-changes-visibility-initial-state' 380`highlight-changes-visibility-initial-state'.
377 381
378This command does not itself set highlight-changes mode." 382This command does not itself set highlight-changes mode."
379 383
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 846f5f95187..b535398f107 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -124,10 +124,13 @@ This variable is expected to be made buffer-local by modes.")
124 124
125;;;###autoload 125;;;###autoload
126(define-minor-mode hl-line-mode 126(define-minor-mode hl-line-mode
127 "Buffer-local minor mode to highlight the line about point. 127 "Toggle highlighting of the current line (Hl-Line mode).
128With ARG, turn Hl-Line mode on if ARG is positive, off otherwise. 128With a prefix argument ARG, enable Hl-Line mode if ARG is
129positive, and disable it otherwise. If called from Lisp, enable
130the mode if ARG is omitted or nil.
129 131
130If `hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the 132Hl-Line mode is a buffer-local minor mode. If
133`hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the
131line about the buffer's point in all windows. Caveat: the 134line about the buffer's point in all windows. Caveat: the
132buffer's point might be different from the point of a 135buffer's point might be different from the point of a
133non-selected window. Hl-Line mode uses the function 136non-selected window. Hl-Line mode uses the function
@@ -171,8 +174,10 @@ addition to `hl-line-highlight' on `post-command-hook'."
171 174
172;;;###autoload 175;;;###autoload
173(define-minor-mode global-hl-line-mode 176(define-minor-mode global-hl-line-mode
174 "Global minor mode to highlight the line about point in the current window. 177 "Toggle line highlighting in all buffers (Global Hl-Line mode).
175With ARG, turn Global-Hl-Line mode on if ARG is positive, off otherwise. 178With a prefix argument ARG, enable Global Hl-Line mode if ARG is
179positive, and disable it otherwise. If called from Lisp, enable
180the mode if ARG is omitted or nil.
176 181
177If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode 182If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
178highlights the line about the current buffer's point in all 183highlights the line about the current buffer's point in all
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 073efaeee2a..6c8db872c0b 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -217,8 +217,10 @@ Currently, this only applies to `ibuffer-saved-filters' and
217 217
218;;;###autoload 218;;;###autoload
219(define-minor-mode ibuffer-auto-mode 219(define-minor-mode ibuffer-auto-mode
220 "Toggle use of Ibuffer's auto-update facility. 220 "Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode).
221With numeric ARG, enable auto-update if and only if ARG is positive." 221With a prefix argument ARG, enable Ibuffer Auto mode if ARG is
222positive, and disable it otherwise. If called from Lisp, enable
223the mode if ARG is omitted or nil."
222 nil nil nil 224 nil nil nil
223 (unless (derived-mode-p 'ibuffer-mode) 225 (unless (derived-mode-p 'ibuffer-mode)
224 (error "This buffer is not in Ibuffer mode")) 226 (error "This buffer is not in Ibuffer mode"))
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 5a86508e144..17ddddbd17a 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2648,12 +2648,14 @@ will be inserted before the group at point."
2648;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group 2648;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
2649;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group 2649;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
2650;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode 2650;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
2651;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "617b36fc8479547d679cf0103f82e3ff") 2651;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "25e69a1e030791b3a3e7d91d4377173a")
2652;;; Generated autoloads from ibuf-ext.el 2652;;; Generated autoloads from ibuf-ext.el
2653 2653
2654(autoload 'ibuffer-auto-mode "ibuf-ext" "\ 2654(autoload 'ibuffer-auto-mode "ibuf-ext" "\
2655Toggle use of Ibuffer's auto-update facility. 2655Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode).
2656With numeric ARG, enable auto-update if and only if ARG is positive. 2656With a prefix argument ARG, enable Ibuffer Auto mode if ARG is
2657positive, and disable it otherwise. If called from Lisp, enable
2658the mode if ARG is omitted or nil.
2657 2659
2658\(fn &optional ARG)" t nil) 2660\(fn &optional ARG)" t nil)
2659 2661
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index bdd19194c22..53876f48a06 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -172,9 +172,10 @@ except those on this list.")
172;;;_ > icomplete-mode (&optional prefix) 172;;;_ > icomplete-mode (&optional prefix)
173;;;###autoload 173;;;###autoload
174(define-minor-mode icomplete-mode 174(define-minor-mode icomplete-mode
175 "Toggle incremental minibuffer completion for this Emacs session. 175 "Toggle incremental minibuffer completion (Icomplete mode).
176With a numeric argument, turn Icomplete mode on if ARG is positive, 176With a prefix argument ARG, enable Icomplete mode if ARG is
177otherwise turn it off." 177positive, and disable it otherwise. If called from Lisp, enable
178the mode if ARG is omitted or nil."
178 :global t :group 'icomplete 179 :global t :group 'icomplete
179 (if icomplete-mode 180 (if icomplete-mode
180 ;; The following is not really necessary after first time - 181 ;; The following is not really necessary after first time -
diff --git a/lisp/ido.el b/lisp/ido.el
index 0844c2c50c6..88599013ce6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1469,8 +1469,10 @@ Removes badly formatted data and ignored directories."
1469 (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) 1469 (add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
1470 1470
1471(define-minor-mode ido-everywhere 1471(define-minor-mode ido-everywhere
1472 "Toggle using ido-mode everywhere file and directory names are read. 1472 "Toggle use of Ido for all buffer/file reading.
1473With ARG, turn ido-mode on if arg is positive, off otherwise." 1473With a prefix argument ARG, enable this feature if ARG is
1474positive, and disable it otherwise. If called from Lisp, enable
1475the mode if ARG is omitted or nil."
1474 :global t 1476 :global t
1475 :group 'ido 1477 :group 'ido
1476 (when (get 'ido-everywhere 'file) 1478 (when (get 'ido-everywhere 'file)
diff --git a/lisp/image-file.el b/lisp/image-file.el
index bd1c101d529..52012b12a56 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -178,11 +178,12 @@ Optional argument ARGS are the arguments to call FUNCTION with."
178 178
179;;;###autoload 179;;;###autoload
180(define-minor-mode auto-image-file-mode 180(define-minor-mode auto-image-file-mode
181 "Toggle visiting of image files as images. 181 "Toggle visiting of image files as images (Auto Image File mode).
182With prefix argument ARG, turn on if positive, otherwise off. 182With a prefix argument ARG, enable Auto Image File mode if ARG is
183Returns non-nil if the new state is enabled. 183positive, and disable it otherwise. If called from Lisp, enable
184the mode if ARG is omitted or nil.
184 185
185Image files are those whose name has an extension in 186An image file is one whose name has an extension in
186`image-file-name-extensions', or matches a regexp in 187`image-file-name-extensions', or matches a regexp in
187`image-file-name-regexps'." 188`image-file-name-regexps'."
188 :global t 189 :global t
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 0995048fce5..30223e69ae0 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -396,11 +396,14 @@ to toggle between display as an image and display as text."
396 396
397;;;###autoload 397;;;###autoload
398(define-minor-mode image-minor-mode 398(define-minor-mode image-minor-mode
399 "Toggle Image minor mode. 399 "Toggle Image minor mode in this buffer.
400With arg, turn Image minor mode on if arg is positive, off otherwise. 400With a prefix argument ARG, enable Image minor mode if ARG is
401It provides the key \\<image-mode-map>\\[image-toggle-display] \ 401positive, and disable it otherwise. If called from Lisp, enable
402to switch back to `image-mode' 402the mode if ARG is omitted or nil.
403to display an image file as the actual image." 403
404Image minor mode provides the key \\<image-mode-map>\\[image-toggle-display],
405to switch back to `image-mode' and display an image file as the
406actual image."
404 nil (:eval (if image-type (format " Image[%s]" image-type) " Image")) 407 nil (:eval (if image-type (format " Image[%s]" image-type) " Image"))
405 image-minor-mode-map 408 image-minor-mode-map
406 :group 'image 409 :group 'image
diff --git a/lisp/info.el b/lisp/info.el
index 4ccbeba2a47..b8deb3c9c7f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2015,7 +2015,7 @@ Submatch 1 is the complete node name.
2015Submatch 2 if non-nil is the parenthesized file name part of the node name. 2015Submatch 2 if non-nil is the parenthesized file name part of the node name.
2016Submatch 3 is the local part of the node name. 2016Submatch 3 is the local part of the node name.
2017End of submatch 0, 1, and 3 are the same, so you can safely concat." 2017End of submatch 0, 1, and 3 are the same, so you can safely concat."
2018 (concat "[ \t]*" ;Skip leading space. 2018 (concat "[ \t\n]*" ;Skip leading space.
2019 "\\(\\(([^)]+)\\)?" ;Node name can start with a file name. 2019 "\\(\\(([^)]+)\\)?" ;Node name can start with a file name.
2020 "\\([" (or allowedchars "^,\t\n") "]*" ;Any number of allowed chars. 2020 "\\([" (or allowedchars "^,\t\n") "]*" ;Any number of allowed chars.
2021 "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space. 2021 "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 6cfcce59672..6bb23916da3 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1452,7 +1452,7 @@ string. NLINES has the same meaning as in `occur'."
1452 ;; Set `search-upper-case' to nil to not call 1452 ;; Set `search-upper-case' to nil to not call
1453 ;; `isearch-no-upper-case-p' in `occur-1'. 1453 ;; `isearch-no-upper-case-p' in `occur-1'.
1454 (search-upper-case nil) 1454 (search-upper-case nil)
1455 (search-spaces-regexp search-whitespace-regexp)) 1455 (search-spaces-regexp (if isearch-regexp search-whitespace-regexp)))
1456 (occur regexp nlines))) 1456 (occur regexp nlines)))
1457 1457
1458(declare-function hi-lock-read-face-name "hi-lock" ()) 1458(declare-function hi-lock-read-face-name "hi-lock" ())
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 70dda5442d5..a7d3328526a 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1424,10 +1424,13 @@ See the variable `iswitchb-case' for details."
1424 1424
1425;;;###autoload 1425;;;###autoload
1426(define-minor-mode iswitchb-mode 1426(define-minor-mode iswitchb-mode
1427 "Toggle Iswitchb global minor mode. 1427 "Toggle Iswitchb mode.
1428With arg, turn Iswitchb mode on if ARG is positive, otherwise turn it off. 1428With a prefix argument ARG, enable Iswitchb mode if ARG is
1429This mode enables switching between buffers using substrings. See 1429positive, and disable it otherwise. If called from Lisp, enable
1430`iswitchb' for details." 1430the mode if ARG is omitted or nil.
1431
1432Iswitchb mode is a global minor mode that enables switching
1433between buffers using substrings. See `iswitchb' for details."
1431 nil nil iswitchb-global-map :global t :group 'iswitchb 1434 nil nil iswitchb-global-map :global t :group 'iswitchb
1432 (if iswitchb-mode 1435 (if iswitchb-mode
1433 (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) 1436 (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index d28fde0b214..bf312445f17 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -333,9 +333,14 @@ variables. Setting this through Custom does that automatically."
333 :group 'jka-compr) 333 :group 'jka-compr)
334 334
335(define-minor-mode auto-compression-mode 335(define-minor-mode auto-compression-mode
336 "Toggle automatic file compression and uncompression. 336 "Toggle Auto Compression mode.
337With prefix argument ARG, turn auto compression on if positive, else off. 337With a prefix argument ARG, enable Auto Compression mode if ARG
338Return the new status of auto compression (non-nil means on)." 338is positive, and disable it otherwise. If called from Lisp,
339enable the mode if ARG is omitted or nil.
340
341Auto Compression mode is a global minor mode. When enabled,
342compressed files are automatically uncompressed for reading, and
343compressed when writing."
339 :global t :init-value t :group 'jka-compr :version "22.1" 344 :global t :init-value t :group 'jka-compr :version "22.1"
340 (let* ((installed (jka-compr-installed-p)) 345 (let* ((installed (jka-compr-installed-p))
341 (flag auto-compression-mode)) 346 (flag auto-compression-mode))
diff --git a/lisp/linum.el b/lisp/linum.el
index db6e4c49977..4e58a1b7118 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -73,7 +73,12 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
73 73
74;;;###autoload 74;;;###autoload
75(define-minor-mode linum-mode 75(define-minor-mode linum-mode
76 "Toggle display of line numbers in the left margin." 76 "Toggle display of line numbers in the left margin (Linum mode).
77With a prefix argument ARG, enable Linum mode if ARG is positive,
78and disable it otherwise. If called from Lisp, enable the mode
79if ARG is omitted or nil.
80
81Linum mode is a buffer-local minor mode."
77 :lighter "" ; for desktop.el 82 :lighter "" ; for desktop.el
78 (if linum-mode 83 (if linum-mode
79 (progn 84 (progn
diff --git a/lisp/longlines.el b/lisp/longlines.el
index f625d8fcac7..b4d15da78a7 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -95,21 +95,22 @@ This is used when `longlines-show-hard-newlines' is on."
95 95
96;;;###autoload 96;;;###autoload
97(define-minor-mode longlines-mode 97(define-minor-mode longlines-mode
98 "Minor mode to wrap long lines. 98 "Toggle Long Lines mode in this buffer.
99In Long Lines mode, long lines are wrapped if they extend beyond 99With a prefix argument ARG, enable Long Lines mode if ARG is
100`fill-column'. The soft newlines used for line wrapping will not 100positive, and disable it otherwise. If called from Lisp, enable
101show up when the text is yanked or saved to disk. 101the mode if ARG is omitted or nil.
102 102
103With no argument, this command toggles Long Lines mode. 103When Long Lines mode is enabled, long lines are wrapped if they
104With a prefix argument ARG, turn Long Lines minor mode on if ARG is positive, 104extend beyond `fill-column'. The soft newlines used for line
105otherwise turn it off. 105wrapping will not show up when the text is yanked or saved to
106 106disk.
107If the variable `longlines-auto-wrap' is non-nil, lines are automatically 107
108wrapped whenever the buffer is changed. You can always call 108If the variable `longlines-auto-wrap' is non-nil, lines are
109`fill-paragraph' to fill individual paragraphs. 109automatically wrapped whenever the buffer is changed. You can
110 110always call `fill-paragraph' to fill individual paragraphs.
111If the variable `longlines-show-hard-newlines' is non-nil, hard newlines 111
112are indicated with a symbol." 112If the variable `longlines-show-hard-newlines' is non-nil, hard
113newlines are indicated with a symbol."
113 :group 'longlines :lighter " ll" 114 :group 'longlines :lighter " ll"
114 (if longlines-mode 115 (if longlines-mode
115 ;; Turn on longlines mode 116 ;; Turn on longlines mode
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index 8dac3be0e5f..0f1669562de 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -788,9 +788,14 @@ being set it is automatically widened."
788 788
789;;;###autoload 789;;;###autoload
790(define-minor-mode footnote-mode 790(define-minor-mode footnote-mode
791 "Toggle footnote minor mode. 791 "Toggle Footnote mode.
792This minor mode provides footnote support for `message-mode'. To get 792With a prefix argument ARG, enable Footnote mode if ARG is
793started, play around with the following keys: 793positive, and disable it otherwise. If called from Lisp, enable
794the mode if ARG is omitted or nil.
795
796Footnode mode is a buffer-local minor mode. If enabled, it
797provides footnote support for `message-mode'. To get started,
798play around with the following keys:
794\\{footnote-minor-mode-map}" 799\\{footnote-minor-mode-map}"
795 :lighter footnote-mode-line-string 800 :lighter footnote-mode-line-string
796 :keymap footnote-minor-mode-map 801 :keymap footnote-minor-mode-map
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 901eb002dc1..2472b8a1870 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -133,7 +133,15 @@
133 133
134;;;###autoload 134;;;###autoload
135(define-minor-mode mail-abbrevs-mode 135(define-minor-mode mail-abbrevs-mode
136 "Non-nil means expand mail aliases as abbrevs, in certain message headers." 136 "Toggle abbrev expansion of mail aliases (Mail Abbrevs mode).
137With a prefix argument ARG, enable Mail Abbrevs mode if ARG is
138positive, and disable it otherwise. If called from Lisp, enable
139the mode if ARG is omitted or nil.
140
141Mail Abbrevs mode is a global minor mode. When enabled,
142abbrev-like expansion is performed when editing certain mail
143headers (those specified by `mail-abbrev-mode-regexp'), based on
144the entries in your `mail-personal-alias-file'."
137 :global t 145 :global t
138 :group 'mail-abbrev 146 :group 'mail-abbrev
139 :version "20.3" 147 :version "20.3"
diff --git a/lisp/master.el b/lisp/master.el
index 1ea0a24ca94..c3e9004ca0b 100644
--- a/lisp/master.el
+++ b/lisp/master.el
@@ -72,12 +72,12 @@ You can set this variable using `master-set-slave'.")
72;;;###autoload 72;;;###autoload
73(define-minor-mode master-mode 73(define-minor-mode master-mode
74 "Toggle Master mode. 74 "Toggle Master mode.
75With no argument, this command toggles the mode. 75With a prefix argument ARG, enable Master mode if ARG is
76Non-null prefix argument turns on the mode. 76positive, and disable it otherwise. If called from Lisp, enable
77Null prefix argument turns off the mode. 77the mode if ARG is omitted or nil.
78 78
79When Master mode is enabled, you can scroll the slave buffer using the 79When Master mode is enabled, you can scroll the slave buffer
80following commands: 80using the following commands:
81 81
82\\{master-mode-map} 82\\{master-mode-map}
83 83
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index 2ed692c1b84..22fd84a67aa 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -56,12 +56,14 @@ The prompt should already have been inserted."
56;;;###autoload 56;;;###autoload
57(define-minor-mode minibuffer-depth-indicate-mode 57(define-minor-mode minibuffer-depth-indicate-mode
58 "Toggle Minibuffer Depth Indication mode. 58 "Toggle Minibuffer Depth Indication mode.
59When active, any recursive use of the minibuffer will show 59With a prefix argument ARG, enable Minibuffer Depth Indication
60the recursion depth in the minibuffer prompt. This is only 60mode if ARG is positive, and disable it otherwise. If called
61useful if `enable-recursive-minibuffers' is non-nil. 61from Lisp, enable the mode if ARG is omitted or nil.
62 62
63With prefix argument ARG, turn on if positive, otherwise off. 63Minibuffer Depth Indication mode is a global minor mode. When
64Returns non-nil if the new state is enabled." 64enabled, any recursive use of the minibuffer will show the
65recursion depth in the minibuffer prompt. This is only useful if
66`enable-recursive-minibuffers' is non-nil."
65 :global t 67 :global t
66 :group 'minibuffer 68 :group 'minibuffer
67 (if minibuffer-depth-indicate-mode 69 (if minibuffer-depth-indicate-mode
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index d75a768e2d4..75a2d70da5e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2169,11 +2169,13 @@ It must accept a buffer as its only required argument.")
2169 :help ,(purecopy "Put previous minibuffer history element in the minibuffer")))) 2169 :help ,(purecopy "Put previous minibuffer history element in the minibuffer"))))
2170 2170
2171(define-minor-mode menu-bar-mode 2171(define-minor-mode menu-bar-mode
2172 "Toggle display of a menu bar on each frame. 2172 "Toggle display of a menu bar on each frame (Menu Bar mode).
2173With a prefix argument ARG, enable Menu Bar mode if ARG is
2174positive, and disable it otherwise. If called from Lisp, enable
2175Menu Bar mode if ARG is omitted or nil.
2176
2173This command applies to all frames that exist and frames to be 2177This command applies to all frames that exist and frames to be
2174created in the future. 2178created in the future."
2175With a numeric argument, if the argument is positive,
2176turn on menu bars; otherwise, turn off menu bars."
2177 :init-value t 2179 :init-value t
2178 :global t 2180 :global t
2179 ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. 2181 ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el
index e6ebe3c53f1..405721f97ee 100644
--- a/lisp/minibuf-eldef.el
+++ b/lisp/minibuf-eldef.el
@@ -131,14 +131,16 @@ been set up by `minibuf-eldef-setup-minibuffer'."
131;;;###autoload 131;;;###autoload
132(define-minor-mode minibuffer-electric-default-mode 132(define-minor-mode minibuffer-electric-default-mode
133 "Toggle Minibuffer Electric Default mode. 133 "Toggle Minibuffer Electric Default mode.
134When active, minibuffer prompts that show a default value only show the 134With a prefix argument ARG, enable Minibuffer Electric Default
135default when it's applicable -- that is, when hitting RET would yield 135mode if ARG is positive, and disable it otherwise. If called
136the default value. If the user modifies the input such that hitting RET 136from Lisp, enable the mode if ARG is omitted or nil.
137would enter a non-default value, the prompt is modified to remove the 137
138default indication. 138Minibuffer Electric Default mode is a global minor mode. When
139 139enabled, minibuffer prompts that show a default value only show
140With prefix argument ARG, turn on if positive, otherwise off. 140the default when it's applicable -- that is, when hitting RET
141Returns non-nil if the new state is enabled." 141would yield the default value. If the user modifies the input
142such that hitting RET would enter a non-default value, the prompt
143is modified to remove the default indication."
142 :global t 144 :global t
143 :group 'minibuffer 145 :group 'minibuffer
144 (if minibuffer-electric-default-mode 146 (if minibuffer-electric-default-mode
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 50d221b6fa0..bcf1749e13f 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -199,11 +199,12 @@ If nil, point will always be placed at the beginning of the region."
199;;;###autoload 199;;;###autoload
200(define-minor-mode mouse-sel-mode 200(define-minor-mode mouse-sel-mode
201 "Toggle Mouse Sel mode. 201 "Toggle Mouse Sel mode.
202With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive. 202With a prefix argument ARG, enable Mouse Sel mode if ARG is
203Returns the new status of Mouse Sel mode (non-nil means on). 203positive, and disable it otherwise. If called from Lisp, enable
204the mode if ARG is omitted or nil.
204 205
205When Mouse Sel mode is enabled, mouse selection is enhanced in 206Mouse Sel mode is a global minor mode. When enabled, mouse
206various ways: 207selection is enhanced in various ways:
207 208
208- Double-clicking on symbol constituents selects symbols. 209- Double-clicking on symbol constituents selects symbols.
209Double-clicking on quotes or parentheses selects sexps. 210Double-clicking on quotes or parentheses selects sexps.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index ff175288445..9b1cf48ccdc 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -372,300 +372,167 @@ This command must be bound to a mouse click."
372 (split-window-horizontally 372 (split-window-horizontally
373 (min (max new-width first-col) last-col)))))) 373 (min (max new-width first-col) last-col))))))
374 374
375(defun mouse-drag-window-above (window) 375;; `mouse-drag-line' is now the common routine for handling all line
376 "Return the (or a) window directly above WINDOW. 376;; dragging events combining the earlier `mouse-drag-mode-line-1' and
377That means one whose bottom edge is at the same height as WINDOW's top edge." 377;; `mouse-drag-vertical-line'. It should improve the behavior of line
378 (let ((start-top (nth 1 (window-edges window))) 378;; dragging wrt Emacs 23 as follows:
379 (start-left (nth 0 (window-edges window))) 379
380 (start-right (nth 2 (window-edges window))) 380;; (1) Gratuitous error messages and restrictions have been (hopefully)
381 (start-window window) 381;; removed. (The help-echo that dragging the mode-line can resize a
382 above-window) 382;; one-window-frame's window will still show through via bindings.el.)
383 (setq window (previous-window window 0)) 383
384 (while (and (not above-window) (not (eq window start-window))) 384;; (2) No gratuitous selection of other windows should happen. (This
385 (let ((left (nth 0 (window-edges window))) 385;; has not been completely fixed for mouse-autoselected windows yet.)
386 (right (nth 2 (window-edges window)))) 386
387 (when (and (= (+ (window-height window) (nth 1 (window-edges window))) 387;; (3) Mouse clicks below a scroll-bar should pass through via unread
388 start-top) 388;; command events.
389 (or (and (<= left start-left) (<= start-right right)) 389
390 (and (<= start-left left) (<= left start-right)) 390;; Note that `window-in-direction' replaces `mouse-drag-window-above'
391 (and (<= start-left right) (<= right start-right)))) 391;; and `mouse-drag-vertical-line-rightward-window' with Emacs 24.1.
392 (setq above-window window))) 392(defun mouse-drag-line (start-event line)
393 (setq window (previous-window window))) 393 "Drag some line with the mouse.
394 above-window)) 394START-EVENT is the starting mouse-event of the drag action. LINE
395 395must be one of the symbols header, mode, or vertical."
396(defun mouse-drag-move-window-bottom (window growth)
397 "Move the bottom of WINDOW up or down by GROWTH lines.
398Move it down if GROWTH is positive, or up if GROWTH is negative.
399If this would make WINDOW too short,
400shrink the window or windows above it to make room."
401 (condition-case nil
402 (adjust-window-trailing-edge window growth nil)
403 (error nil)))
404
405(defsubst mouse-drag-move-window-top (window growth)
406 "Move the top of WINDOW up or down by GROWTH lines.
407Move it down if GROWTH is positive, or up if GROWTH is negative.
408If this would make WINDOW too short, shrink the window or windows
409above it to make room."
410 ;; Moving the top of WINDOW is actually moving the bottom of the
411 ;; window above.
412 (let ((window-above (mouse-drag-window-above window)))
413 (and window-above
414 (mouse-drag-move-window-bottom window-above (- growth)))))
415
416(defun mouse-drag-mode-line-1 (start-event mode-line-p)
417 "Change the height of a window by dragging on the mode or header line.
418START-EVENT is the starting mouse-event of the drag action.
419MODE-LINE-P non-nil means dragging a mode line; nil means a header line."
420 ;; Give temporary modes such as isearch a chance to turn off. 396 ;; Give temporary modes such as isearch a chance to turn off.
421 (run-hooks 'mouse-leave-buffer-hook) 397 (run-hooks 'mouse-leave-buffer-hook)
422 (let* ((done nil) 398 (let* ((echo-keystrokes 0)
423 (echo-keystrokes 0)
424 (start (event-start start-event)) 399 (start (event-start start-event))
425 (start-event-window (posn-window start)) 400 (window (posn-window start))
426 (start-event-frame (window-frame start-event-window)) 401 (frame (window-frame window))
427 (start-nwindows (count-windows t)) 402 (minibuffer-window (minibuffer-window frame))
428 (on-link (and mouse-1-click-follows-link 403 (on-link (and mouse-1-click-follows-link
429 (or mouse-1-click-in-non-selected-windows 404 (or mouse-1-click-in-non-selected-windows
430 (eq (posn-window start) (selected-window))) 405 (eq window (selected-window)))
431 (mouse-on-link-p start))) 406 (mouse-on-link-p start)))
432 (minibuffer (frame-parameter nil 'minibuffer)) 407 (enlarge-minibuffer
433 should-enlarge-minibuffer event mouse y top bot edges wconfig growth) 408 (and (eq line 'mode)
409 (not resize-mini-windows)
410 (eq (window-frame minibuffer-window) frame)
411 (not (one-window-p t frame))
412 (= (nth 1 (window-edges minibuffer-window))
413 (nth 3 (window-edges window)))))
414 (which-side
415 (and (eq line 'vertical)
416 (or (cdr (assq 'vertical-scroll-bars (frame-parameters frame)))
417 'right)))
418 done event mouse growth dragged)
419 (cond
420 ((eq line 'header)
421 ;; Check whether header-line can be dragged at all.
422 (if (window-at-side-p window 'top)
423 (setq done t)
424 (setq window (window-in-direction 'above window t))))
425 ((eq line 'mode)
426 ;; Check whether mode-line can be dragged at all.
427 (when (and (window-at-side-p window 'bottom)
428 (not enlarge-minibuffer))
429 (setq done t)))
430 ((eq line 'vertical)
431 ;; Get the window to adjust for the vertical case.
432 (setq window
433 (if (eq which-side 'right)
434 ;; If the scroll bar is on the window's right or there's
435 ;; no scroll bar at all, adjust the window where the
436 ;; start-event occurred.
437 window
438 ;; If the scroll bar is on the start-event window's left,
439 ;; adjust the window on the left of it.
440 (window-in-direction 'left window t)))))
441
442 ;; Start tracking.
434 (track-mouse 443 (track-mouse
435 (progn 444 ;; Loop reading events and sampling the position of the mouse.
436 ;; if this is the bottommost ordinary window, then to 445 (while (not done)
437 ;; move its modeline the minibuffer must be enlarged. 446 (setq event (read-event))
438 (setq should-enlarge-minibuffer 447 (setq mouse (mouse-position))
439 (and minibuffer 448 ;; Do nothing if
440 mode-line-p 449 ;; - there is a switch-frame event.
441 (not (one-window-p t)) 450 ;; - the mouse isn't in the frame that we started in
442 (= (nth 1 (window-edges minibuffer)) 451 ;; - the mouse isn't in any Emacs frame
443 (nth 3 (window-edges start-event-window))))) 452 ;; Drag if
444 453 ;; - there is a mouse-movement event
445 ;; loop reading events and sampling the position of 454 ;; - there is a scroll-bar-movement event (??)
446 ;; the mouse. 455 ;; (same as mouse movement for our purposes)
447 (while (not done) 456 ;; Quit if
448 (setq event (read-event) 457 ;; - there is a keyboard event or some other unknown event.
449 mouse (mouse-position)) 458 (cond
450 459 ((not (consp event))
451 ;; do nothing if 460 (setq done t))
452 ;; - there is a switch-frame event. 461 ((memq (car event) '(switch-frame select-window))
453 ;; - the mouse isn't in the frame that we started in 462 nil)
454 ;; - the mouse isn't in any Emacs frame 463 ((not (memq (car event) '(mouse-movement scroll-bar-movement)))
455 ;; drag if 464 (when (consp event)
456 ;; - there is a mouse-movement event 465 ;; Do not unread a drag-mouse-1 event to avoid selecting
457 ;; - there is a scroll-bar-movement event 466 ;; some other window. For vertical line dragging do not
458 ;; (same as mouse movement for our purposes) 467 ;; unread mouse-1 events either (but only if we dragged at
459 ;; quit if 468 ;; least once to allow mouse-1 clicks get through.
460 ;; - there is a keyboard event or some other unknown event. 469 (unless (and dragged
461 (cond ((not (consp event)) 470 (if (eq line 'vertical)
462 (setq done t)) 471 (memq (car event) '(drag-mouse-1 mouse-1))
463 472 (eq (car event) 'drag-mouse-1)))
464 ((memq (car event) '(switch-frame select-window)) 473 (push event unread-command-events)))
465 nil) 474 (setq done t))
466 475 ((or (not (eq (car mouse) frame)) (null (car (cdr mouse))))
467 ((not (memq (car event) '(mouse-movement scroll-bar-movement))) 476 nil)
468 (when (consp event) 477 ((eq line 'vertical)
469 ;; Do not unread a drag-mouse-1 event since it will cause the 478 ;; Drag vertical divider (the calculations below are those
470 ;; selection of the window above when dragging the modeline 479 ;; from Emacs 23).
471 ;; above the selected window. 480 (setq growth
472 (unless (eq (car event) 'drag-mouse-1) 481 (- (- (cadr mouse)
473 (push event unread-command-events))) 482 (if (eq which-side 'right) 0 2))
474 (setq done t)) 483 (nth 2 (window-edges window))
475 484 -1))
476 ((not (eq (car mouse) start-event-frame)) 485 (unless (zerop growth)
477 nil) 486 ;; Remember that we dragged.
478 487 (setq dragged t))
479 ((null (car (cdr mouse))) 488 (adjust-window-trailing-edge window growth t))
480 nil) 489 (t
481 490 ;; Drag horizontal divider (the calculations below are those
482 (t 491 ;; from Emacs 23).
483 (setq y (cdr (cdr mouse)) 492 (setq growth
484 edges (window-edges start-event-window) 493 (if (eq line 'mode)
485 top (nth 1 edges) 494 (- (cddr mouse) (nth 3 (window-edges window)) -1)
486 bot (nth 3 edges)) 495 ;; The window's top includes the header line!
487 496 (- (nth 3 (window-edges window)) (cddr mouse))))
488 ;; compute size change needed 497
489 (cond (mode-line-p 498 (unless (zerop growth)
490 (setq growth (- y bot -1))) 499 ;; Remember that we dragged.
491 (t ; header line 500 (setq dragged t))
492 (when (< (- bot y) window-min-height) 501
493 (setq y (- bot window-min-height))) 502 (cond
494 ;; The window's top includes the header line! 503 (enlarge-minibuffer
495 (setq growth (- top y)))) 504 (adjust-window-trailing-edge window growth))
496 (setq wconfig (current-window-configuration)) 505 ((eq line 'mode)
497 506 (adjust-window-trailing-edge window growth))
498 ;; Check for an error case. 507 (t
499 (when (and (/= growth 0) 508 (adjust-window-trailing-edge window (- growth)))))))
500 (not minibuffer) 509
501 (one-window-p t)) 510 ;; Presumably, if this was just a click, the last event should be
502 (error "Attempt to resize sole window")) 511 ;; `mouse-1', whereas if this did move the mouse, it should be a
503 512 ;; `drag-mouse-1'. `dragged' nil tells us that we never dragged
504 ;; If we ever move, make sure we don't mistakenly treat 513 ;; and `on-link' tells us that there is a link to follow.
505 ;; some unexpected `mouse-1' final event as a sign that 514 (when (and on-link (not dragged)
506 ;; this whole drag was nothing more than a click. 515 (eq 'mouse-1 (car-safe (car unread-command-events))))
507 (if (/= growth 0) (setq on-link nil)) 516 ;; If mouse-2 has never been done by the user, it doesn't
508 517 ;; have the necessary property to be interpreted correctly.
509 ;; grow/shrink minibuffer? 518 (put 'mouse-2 'event-kind 'mouse-click)
510 (if should-enlarge-minibuffer 519 (setcar unread-command-events
511 (unless resize-mini-windows 520 (cons 'mouse-2 (cdar unread-command-events)))))))
512 (mouse-drag-move-window-bottom start-event-window growth))
513 ;; no. grow/shrink the selected window
514 ;(message "growth = %d" growth)
515 (if mode-line-p
516 (mouse-drag-move-window-bottom start-event-window growth)
517 (mouse-drag-move-window-top start-event-window growth)))
518
519 ;; if this window's growth caused another
520 ;; window to be deleted because it was too
521 ;; short, rescind the change.
522 ;;
523 ;; if size change caused space to be stolen
524 ;; from a window above this one, rescind the
525 ;; change, but only if we didn't grow/shrink
526 ;; the minibuffer. minibuffer size changes
527 ;; can cause all windows to shrink... no way
528 ;; around it.
529 (when (or (/= start-nwindows (count-windows t))
530 (and (not should-enlarge-minibuffer)
531 (> growth 0)
532 mode-line-p
533 (/= top
534 (nth 1 (window-edges
535 ;; Choose right window.
536 start-event-window)))))
537 (set-window-configuration wconfig)))))
538
539 ;; Presumably if this was just a click, the last event should
540 ;; be `mouse-1', whereas if this did move the mouse, it should be
541 ;; a `drag-mouse-1'. In any case `on-link' would have been nulled
542 ;; above if there had been any significant mouse movement.
543 (when (and on-link
544 (eq 'mouse-1 (car-safe (car unread-command-events))))
545 ;; If mouse-2 has never been done by the user, it doesn't
546 ;; have the necessary property to be interpreted correctly.
547 (put 'mouse-2 'event-kind 'mouse-click)
548 (setcar unread-command-events
549 (cons 'mouse-2 (cdar unread-command-events))))))))
550 521
551(defun mouse-drag-mode-line (start-event) 522(defun mouse-drag-mode-line (start-event)
552 "Change the height of a window by dragging on the mode line." 523 "Change the height of a window by dragging on the mode line."
553 (interactive "e") 524 (interactive "e")
554 (mouse-drag-mode-line-1 start-event t)) 525 (mouse-drag-line start-event 'mode))
555 526
556(defun mouse-drag-header-line (start-event) 527(defun mouse-drag-header-line (start-event)
557 "Change the height of a window by dragging on the header line. 528 "Change the height of a window by dragging on the header line."
558Windows whose header-lines are at the top of the frame cannot be
559resized by dragging their header-line."
560 (interactive "e") 529 (interactive "e")
561 ;; Changing the window's size by dragging its header-line when the 530 (mouse-drag-line start-event 'header))
562 ;; header-line is at the top of the frame is somewhat strange,
563 ;; because the header-line doesn't move, so don't do it.
564 (let* ((start (event-start start-event))
565 (window (posn-window start))
566 (frame (window-frame window))
567 (first-window (frame-first-window frame)))
568 (unless (or (eq window first-window)
569 (= (nth 1 (window-edges window))
570 (nth 1 (window-edges first-window))))
571 (mouse-drag-mode-line-1 start-event nil))))
572
573
574(defun mouse-drag-vertical-line-rightward-window (window)
575 "Return a window that is immediately to the right of WINDOW, or nil."
576 (let ((bottom (nth 3 (window-inside-edges window)))
577 (left (nth 0 (window-inside-edges window)))
578 best best-right
579 (try (previous-window window)))
580 (while (not (eq try window))
581 (let ((try-top (nth 1 (window-inside-edges try)))
582 (try-bottom (nth 3 (window-inside-edges try)))
583 (try-right (nth 2 (window-inside-edges try))))
584 (if (and (< try-top bottom)
585 (>= try-bottom bottom)
586 (< try-right left)
587 (or (null best-right) (> try-right best-right)))
588 (setq best-right try-right best try)))
589 (setq try (previous-window try)))
590 best))
591 531
592(defun mouse-drag-vertical-line (start-event) 532(defun mouse-drag-vertical-line (start-event)
593 "Change the width of a window by dragging on the vertical line." 533 "Change the width of a window by dragging on the vertical line."
594 (interactive "e") 534 (interactive "e")
595 ;; Give temporary modes such as isearch a chance to turn off. 535 (mouse-drag-line start-event 'vertical))
596 (run-hooks 'mouse-leave-buffer-hook)
597 (let* ((done nil)
598 (echo-keystrokes 0)
599 (start-event-frame (window-frame (car (car (cdr start-event)))))
600 (start-event-window (car (car (cdr start-event))))
601 event mouse x left right edges growth
602 (which-side
603 (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
604 'right)))
605 (cond
606 ((one-window-p t)
607 (error "Attempt to resize sole ordinary window"))
608 ((and (eq which-side 'right)
609 (>= (nth 2 (window-inside-edges start-event-window))
610 (frame-width start-event-frame)))
611 (error "Attempt to drag rightmost scrollbar"))
612 ((and (eq which-side 'left)
613 (= (nth 0 (window-inside-edges start-event-window)) 0))
614 (error "Attempt to drag leftmost scrollbar")))
615 (track-mouse
616 (progn
617 ;; loop reading events and sampling the position of
618 ;; the mouse.
619 (while (not done)
620 (setq event (read-event)
621 mouse (mouse-position))
622 ;; do nothing if
623 ;; - there is a switch-frame event.
624 ;; - the mouse isn't in the frame that we started in
625 ;; - the mouse isn't in any Emacs frame
626 ;; drag if
627 ;; - there is a mouse-movement event
628 ;; - there is a scroll-bar-movement event
629 ;; (same as mouse movement for our purposes)
630 ;; quit if
631 ;; - there is a keyboard event or some other unknown event
632 ;; unknown event.
633 (cond ((integerp event)
634 (setq done t))
635 ((memq (car event) '(switch-frame select-window))
636 nil)
637 ((not (memq (car event)
638 '(mouse-movement scroll-bar-movement)))
639 (if (consp event)
640 (setq unread-command-events
641 (cons event unread-command-events)))
642 (setq done t))
643 ((not (eq (car mouse) start-event-frame))
644 nil)
645 ((null (car (cdr mouse)))
646 nil)
647 (t
648 (let ((window
649 ;; If the scroll bar is on the window's left,
650 ;; adjust the window on the left.
651 (if (eq which-side 'right)
652 start-event-window
653 (mouse-drag-vertical-line-rightward-window
654 start-event-window))))
655 (setq x (- (car (cdr mouse))
656 (if (eq which-side 'right) 0 2))
657 edges (window-edges window)
658 left (nth 0 edges)
659 right (nth 2 edges))
660 ;; scale back a move that would make the
661 ;; window too thin.
662 (if (< (- x left -1) window-min-width)
663 (setq x (+ left window-min-width -1)))
664 ;; compute size change needed
665 (setq growth (- x right -1))
666 (condition-case nil
667 (adjust-window-trailing-edge window growth t)
668 (error nil))))))))))
669 536
670(defun mouse-set-point (event) 537(defun mouse-set-point (event)
671 "Move point to the position clicked on with the mouse. 538 "Move point to the position clicked on with the mouse.
diff --git a/lisp/msb.el b/lisp/msb.el
index 12e5a0192fe..74ceff1a9cd 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -1133,7 +1133,10 @@ variable `msb-menu-cond'."
1133;;;###autoload 1133;;;###autoload
1134(define-minor-mode msb-mode 1134(define-minor-mode msb-mode
1135 "Toggle Msb mode. 1135 "Toggle Msb mode.
1136With arg, turn Msb mode on if and only if arg is positive. 1136With a prefix argument ARG, enable Msb mode if ARG is positive,
1137and disable it otherwise. If called from Lisp, enable the mode
1138if ARG is omitted or nil.
1139
1137This mode overrides the binding(s) of `mouse-buffer-menu' to provide a 1140This mode overrides the binding(s) of `mouse-buffer-menu' to provide a
1138different buffer menu using the function `msb'." 1141different buffer menu using the function `msb'."
1139 :global t :group 'msb 1142 :global t :group 'msb
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 4ead168b188..05aeb12acf4 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -250,11 +250,11 @@ This should only be bound to mouse buttons 4 and 5."
250 250
251(defvar mwheel-installed-bindings nil) 251(defvar mwheel-installed-bindings nil)
252 252
253;; preloaded ;;;###autoload
254(define-minor-mode mouse-wheel-mode 253(define-minor-mode mouse-wheel-mode
255 "Toggle mouse wheel support. 254 "Toggle mouse wheel support (Mouse Wheel mode).
256With prefix argument ARG, turn on if positive, otherwise off. 255With a prefix argument ARG, enable Mouse Wheel mode if ARG is
257Return non-nil if the new state is enabled." 256positive, and disable it otherwise. If called from Lisp, enable
257the mode if ARG is omitted or nil."
258 :init-value t 258 :init-value t
259 ;; We'd like to use custom-initialize-set here so the setup is done 259 ;; We'd like to use custom-initialize-set here so the setup is done
260 ;; before dumping, but at the point where the defcustom is evaluated, 260 ;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 0130ac3a6be..39a48bde645 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -36,6 +36,7 @@
36;; Function Browser Earliest version 36;; Function Browser Earliest version
37;; browse-url-mozilla Mozilla Don't know 37;; browse-url-mozilla Mozilla Don't know
38;; browse-url-firefox Firefox Don't know (tried with 1.0.1) 38;; browse-url-firefox Firefox Don't know (tried with 1.0.1)
39;; browse-url-chromium Chromium 3.0
39;; browse-url-galeon Galeon Don't know 40;; browse-url-galeon Galeon Don't know
40;; browse-url-epiphany Epiphany Don't know 41;; browse-url-epiphany Epiphany Don't know
41;; browse-url-netscape Netscape 1.1b1 42;; browse-url-netscape Netscape 1.1b1
@@ -47,6 +48,7 @@
47;; browse-url-generic arbitrary 48;; browse-url-generic arbitrary
48;; browse-url-default-windows-browser MS-Windows browser 49;; browse-url-default-windows-browser MS-Windows browser
49;; browse-url-default-macosx-browser Mac OS X browser 50;; browse-url-default-macosx-browser Mac OS X browser
51;; browse-url-xdg-open Free Desktop xdg-open on Gnome, KDE, Xfce4, LXDE
50;; browse-url-gnome-moz GNOME interface to Mozilla 52;; browse-url-gnome-moz GNOME interface to Mozilla
51;; browse-url-kde KDE konqueror (kfm) 53;; browse-url-kde KDE konqueror (kfm)
52;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT) 54;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT)
@@ -230,6 +232,7 @@ regexp should probably be \".\" to specify a default browser."
230 :value browse-url-w3-gnudoit) 232 :value browse-url-w3-gnudoit)
231 (function-item :tag "Mozilla" :value browse-url-mozilla) 233 (function-item :tag "Mozilla" :value browse-url-mozilla)
232 (function-item :tag "Firefox" :value browse-url-firefox) 234 (function-item :tag "Firefox" :value browse-url-firefox)
235 (function-item :tag "Chromium" :value browse-url-chromium)
233 (function-item :tag "Galeon" :value browse-url-galeon) 236 (function-item :tag "Galeon" :value browse-url-galeon)
234 (function-item :tag "Epiphany" :value browse-url-epiphany) 237 (function-item :tag "Epiphany" :value browse-url-epiphany)
235 (function-item :tag "Netscape" :value browse-url-netscape) 238 (function-item :tag "Netscape" :value browse-url-netscape)
@@ -336,6 +339,22 @@ Defaults to the value of `browse-url-firefox-arguments' at the time
336 :type '(repeat (string :tag "Argument")) 339 :type '(repeat (string :tag "Argument"))
337 :group 'browse-url) 340 :group 'browse-url)
338 341
342(defcustom browse-url-chromium-program
343 (let ((candidates '("chromium" "chromium-browser")))
344 (while (and candidates (not (executable-find (car candidates))))
345 (setq candidates (cdr candidates)))
346 (or (car candidates) "chromium"))
347 "The name by which to invoke Chromium."
348 :type 'string
349 :version "24.1"
350 :group 'browse-url)
351
352(defcustom browse-url-chromium-arguments nil
353 "A list of strings to pass to Chromium as arguments."
354 :type '(repeat (string :tag "Argument"))
355 :version "24.1"
356 :group 'browse-url)
357
339(defcustom browse-url-galeon-program "galeon" 358(defcustom browse-url-galeon-program "galeon"
340 "The name by which to invoke Galeon." 359 "The name by which to invoke Galeon."
341 :type 'string 360 :type 'string
@@ -921,6 +940,7 @@ used instead of `browse-url-new-window-flag'."
921 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) 940 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
922 ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) 941 ((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
923 ((executable-find browse-url-firefox-program) 'browse-url-firefox) 942 ((executable-find browse-url-firefox-program) 'browse-url-firefox)
943 ((executable-find browse-url-chromium-program) 'browse-url-chromium)
924 ((executable-find browse-url-galeon-program) 'browse-url-galeon) 944 ((executable-find browse-url-galeon-program) 'browse-url-galeon)
925 ((executable-find browse-url-kde-program) 'browse-url-kde) 945 ((executable-find browse-url-kde-program) 'browse-url-kde)
926 ((executable-find browse-url-netscape-program) 'browse-url-netscape) 946 ((executable-find browse-url-netscape-program) 'browse-url-netscape)
@@ -932,12 +952,13 @@ used instead of `browse-url-new-window-flag'."
932 url args)) 952 url args))
933 953
934(defun browse-url-can-use-xdg-open () 954(defun browse-url-can-use-xdg-open ()
935 "Check if xdg-open can be used, i.e. we are on Gnome, KDE or xfce4." 955 "Check if xdg-open can be used, i.e. we are on Gnome, KDE, Xfce4 or LXDE."
936 (and (getenv "DISPLAY") 956 (and (getenv "DISPLAY")
937 (executable-find "xdg-open") 957 (executable-find "xdg-open")
938 ;; xdg-open may call gnome-open and that does not wait for its child 958 ;; xdg-open may call gnome-open and that does not wait for its child
939 ;; to finish. This child may then be killed when the parent dies. 959 ;; to finish. This child may then be killed when the parent dies.
940 ;; Use nohup to work around. 960 ;; Use nohup to work around. See bug#7166, bug#8917, bug#9779 and
961 ;; http://lists.gnu.org/archive/html/emacs-devel/2009-07/msg00279.html
941 (executable-find "nohup") 962 (executable-find "nohup")
942 (or (getenv "GNOME_DESKTOP_SESSION_ID") 963 (or (getenv "GNOME_DESKTOP_SESSION_ID")
943 ;; GNOME_DESKTOP_SESSION_ID is deprecated, check on Dbus also. 964 ;; GNOME_DESKTOP_SESSION_ID is deprecated, check on Dbus also.
@@ -955,7 +976,9 @@ used instead of `browse-url-new-window-flag'."
955 "/bin/sh" nil nil nil 976 "/bin/sh" nil nil nil
956 "-c" 977 "-c"
957 "xprop -root _DT_SAVE_MODE|grep xfce4")) 978 "xprop -root _DT_SAVE_MODE|grep xfce4"))
958 (error nil))))) 979 (error nil))
980 (member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu"))
981 (equal (getenv "XDG_CURRENT_DESKTOP") "LXDE"))))
959 982
960 983
961;;;###autoload 984;;;###autoload
@@ -1149,6 +1172,22 @@ URL in a new window."
1149 (append browse-url-firefox-startup-arguments (list url)))))) 1172 (append browse-url-firefox-startup-arguments (list url))))))
1150 1173
1151;;;###autoload 1174;;;###autoload
1175(defun browse-url-chromium (url &optional new-window)
1176 "Ask the Chromium WWW browser to load URL.
1177Default to the URL around or before point. The strings in
1178variable `browse-url-chromium-arguments' are also passed to
1179Chromium."
1180 (interactive (browse-url-interactive-arg "URL: "))
1181 (setq url (browse-url-encode-url url))
1182 (let* ((process-environment (browse-url-process-environment)))
1183 (apply 'start-process
1184 (concat "chromium " url) nil
1185 browse-url-chromium-program
1186 (append
1187 browse-url-chromium-arguments
1188 (list url)))))
1189
1190;;;###autoload
1152(defun browse-url-galeon (url &optional new-window) 1191(defun browse-url-galeon (url &optional new-window)
1153 "Ask the Galeon WWW browser to load URL. 1192 "Ask the Galeon WWW browser to load URL.
1154Default to the URL around or before point. The strings in variable 1193Default to the URL around or before point. The strings in variable
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 4e78a7d42c0..1432c1e516b 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -288,7 +288,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
288 288
289;;;###autoload 289;;;###autoload
290(define-minor-mode goto-address-prog-mode 290(define-minor-mode goto-address-prog-mode
291 "Turn on `goto-address-mode', but only in comments and strings." 291 "Like `goto-address-mode', but only for comments and strings."
292 nil 292 nil
293 "" 293 ""
294 nil 294 nil
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 9397025cb60..b35ca3bbd18 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -383,7 +383,8 @@ for all methods. Resulting data are derived from connection history."
383 ;; When "emacs -Q" has been called, both variables are nil. 383 ;; When "emacs -Q" has been called, both variables are nil.
384 ;; We do not load the persistency file then, in order to 384 ;; We do not load the persistency file then, in order to
385 ;; have a clean test environment. 385 ;; have a clean test environment.
386 (or init-file-user site-run-file)) 386 (or (and (boundp 'init-file-user) (symbol-value 'init-file-user))
387 (and (boundp 'site-run-file) (symbol-value 'site-run-file))))
387 (condition-case err 388 (condition-case err
388 (with-temp-buffer 389 (with-temp-buffer
389 (insert-file-contents tramp-persistency-file-name) 390 (insert-file-contents tramp-persistency-file-name)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index cc4fda32dff..5fca1018095 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2103,8 +2103,9 @@ This is true, if either the remote host is already connected, or if we are
2103not in completion mode." 2103not in completion mode."
2104 (and (tramp-tramp-file-p filename) 2104 (and (tramp-tramp-file-p filename)
2105 (with-parsed-tramp-file-name filename nil 2105 (with-parsed-tramp-file-name filename nil
2106 (or (get-buffer (tramp-buffer-name v)) 2106 (or (not (tramp-completion-mode-p))
2107 (not (tramp-completion-mode-p)))))) 2107 (let ((p (tramp-get-connection-process v)))
2108 (and p (processp p) (memq (process-status p) '(run open))))))))
2108 2109
2109;; Method, host name and user name completion. 2110;; Method, host name and user name completion.
2110;; `tramp-completion-dissect-file-name' returns a list of 2111;; `tramp-completion-dissect-file-name' returns a list of
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 5492441ac77..fc0c936c407 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -31,7 +31,7 @@
31;; should be changed only there. 31;; should be changed only there.
32 32
33;;;###tramp-autoload 33;;;###tramp-autoload
34(defconst tramp-version "2.2.3-pre" 34(defconst tramp-version "2.2.3-24.1"
35 "This version of Tramp.") 35 "This version of Tramp.")
36 36
37;;;###tramp-autoload 37;;;###tramp-autoload
@@ -44,7 +44,7 @@
44 (= emacs-major-version 21) 44 (= emacs-major-version 21)
45 (>= emacs-minor-version 4))) 45 (>= emacs-minor-version 4)))
46 "ok" 46 "ok"
47 (format "Tramp 2.2.3-pre is not fit for %s" 47 (format "Tramp 2.2.3-24.1 is not fit for %s"
48 (when (string-match "^.*$" (emacs-version)) 48 (when (string-match "^.*$" (emacs-version))
49 (match-string 0 (emacs-version))))))) 49 (match-string 0 (emacs-version)))))))
50 (unless (string-match "\\`ok\\'" x) (error "%s" x))) 50 (unless (string-match "\\`ok\\'" x) (error "%s" x)))
diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el
index 64c26cfb2c9..56e9cb68c61 100644
--- a/lisp/net/xesam.el
+++ b/lisp/net/xesam.el
@@ -516,9 +516,9 @@ engine specific, widget :notify function to visualize xesam:url."
516 516
517(define-minor-mode xesam-minor-mode 517(define-minor-mode xesam-minor-mode
518 "Toggle Xesam minor mode. 518 "Toggle Xesam minor mode.
519With no argument, this command toggles the mode. 519With a prefix argument ARG, enable Xesam minor mode if ARG is
520Non-null prefix argument turns on the mode. 520positive, and disable it otherwise. If called from Lisp, enable
521Null prefix argument turns off the mode. 521the mode if ARG is omitted or nil.
522 522
523When Xesam minor mode is enabled, all text which matches a 523When Xesam minor mode is enabled, all text which matches a
524previous Xesam query in this buffer is highlighted." 524previous Xesam query in this buffer is highlighted."
diff --git a/lisp/outline.el b/lisp/outline.el
index f864058c6fc..34d30fc4591 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -356,7 +356,10 @@ After that, changing the prefix key requires manipulating keymaps."
356;;;###autoload 356;;;###autoload
357(define-minor-mode outline-minor-mode 357(define-minor-mode outline-minor-mode
358 "Toggle Outline minor mode. 358 "Toggle Outline minor mode.
359With arg, turn Outline minor mode on if arg is positive, off otherwise. 359With a prefix argument ARG, enable Outline minor mode if ARG is
360positive, and disable it otherwise. If called from Lisp, enable
361the mode if ARG is omitted or nil.
362
360See the command `outline-mode' for more information on this mode." 363See the command `outline-mode' for more information on this mode."
361 nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map) 364 nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map)
362 (cons outline-minor-mode-prefix outline-mode-prefix-map)) 365 (cons outline-minor-mode-prefix outline-mode-prefix-map))
diff --git a/lisp/paren.el b/lisp/paren.el
index fb5c0bf36e9..ee550228d48 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -102,12 +102,14 @@ otherwise)."
102 102
103;;;###autoload 103;;;###autoload
104(define-minor-mode show-paren-mode 104(define-minor-mode show-paren-mode
105 "Toggle Show Paren mode. 105 "Toggle visualization of matching parens (Show Paren mode).
106With prefix ARG, turn Show Paren mode on if and only if ARG is positive. 106With a prefix argument ARG, enable Show Paren mode if ARG is
107Returns the new status of Show Paren mode (non-nil means on). 107positive, and disable it otherwise. If called from Lisp, enable
108the mode if ARG is omitted or nil.
108 109
109When Show Paren mode is enabled, any matching parenthesis is highlighted 110Show Paren mode is a global minor mode. When enabled, any
110in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." 111matching parenthesis is highlighted in `show-paren-style' after
112`show-paren-delay' seconds of Emacs idle time."
111 :global t :group 'paren-showing 113 :global t :group 'paren-showing
112 ;; Enable or disable the mechanism. 114 ;; Enable or disable the mechanism.
113 ;; First get rid of the old idle timer. 115 ;; First get rid of the old idle timer.
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 8ec379afab2..12eddfef1aa 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -127,7 +127,10 @@ so that it is considered safe, see `enable-local-variables'.")
127 127
128;;;###autoload 128;;;###autoload
129(define-minor-mode bug-reference-mode 129(define-minor-mode bug-reference-mode
130 "Minor mode to buttonize bugzilla references in the current buffer." 130 "Toggle hyperlinking bug references in the buffer (Bug Reference mode).
131With a prefix argument ARG, enable Bug Reference mode if ARG is
132positive, and disable it otherwise. If called from Lisp, enable
133the mode if ARG is omitted or nil."
131 nil 134 nil
132 "" 135 ""
133 nil 136 nil
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el
index 0ce84ae33a7..d7b7dfef1ec 100644
--- a/lisp/progmodes/cap-words.el
+++ b/lisp/progmodes/cap-words.el
@@ -60,9 +60,13 @@ Looks for word boundaries before capitals."
60;;;###autoload 60;;;###autoload
61(define-minor-mode capitalized-words-mode 61(define-minor-mode capitalized-words-mode
62 "Toggle Capitalized Words mode. 62 "Toggle Capitalized Words mode.
63With a prefix argument ARG, enable Capitalized Words mode if ARG
64is positive, and disable it otherwise. If called from Lisp,
65enable the mode if ARG is omitted or nil.
63 66
64In this minor mode, a word boundary occurs immediately before an 67Capitalized Words mode is a buffer-local minor mode. When
65uppercase letter in a symbol. This is in addition to all the normal 68enabled, a word boundary occurs immediately before an uppercase
69letter in a symbol. This is in addition to all the normal
66boundaries given by the syntax and category tables. There is no 70boundaries given by the syntax and category tables. There is no
67restriction to ASCII. 71restriction to ASCII.
68 72
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a1cbdc16560..b2c548847c3 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2456,7 +2456,7 @@ comment at the start of cc-engine.el for more info."
2456 (<= from (cdr c-state-brace-pair-desert))) 2456 (<= from (cdr c-state-brace-pair-desert)))
2457 ;; Only search what we absolutely need to: 2457 ;; Only search what we absolutely need to:
2458 (if (and c-state-brace-pair-desert 2458 (if (and c-state-brace-pair-desert
2459 (> from (cdr c-state-brace-pair-desert))) 2459 (eq cache-pos (car c-state-brace-pair-desert)))
2460 (narrow-to-region (cdr c-state-brace-pair-desert) (point-max))) 2460 (narrow-to-region (cdr c-state-brace-pair-desert) (point-max)))
2461 2461
2462 ;; In the next pair of nested loops, the inner one moves back past a 2462 ;; In the next pair of nested loops, the inner one moves back past a
@@ -3127,6 +3127,33 @@ comment at the start of cc-engine.el for more info."
3127(unless (fboundp 'c-real-parse-state) 3127(unless (fboundp 'c-real-parse-state)
3128 (fset 'c-real-parse-state (symbol-function 'c-parse-state))) 3128 (fset 'c-real-parse-state (symbol-function 'c-parse-state)))
3129(cc-bytecomp-defun c-real-parse-state) 3129(cc-bytecomp-defun c-real-parse-state)
3130
3131(defvar c-parse-state-state nil)
3132(defun c-record-parse-state-state ()
3133 (setq c-parse-state-state
3134 (mapcar
3135 (lambda (arg)
3136 (cons arg (symbol-value arg)))
3137 '(c-state-cache
3138 c-state-cache-good-pos
3139 c-state-nonlit-pos-cache
3140 c-state-nonlit-pos-cache-limit
3141 c-state-brace-pair-desert
3142 c-state-point-min
3143 c-state-point-min-lit-type
3144 c-state-point-min-lit-start
3145 c-state-min-scan-pos
3146 c-state-old-cpp-beg
3147 c-state-old-cpp-end))))
3148(defun c-replay-parse-state-state ()
3149 (message
3150 (concat "(setq "
3151 (mapconcat
3152 (lambda (arg)
3153 (format "%s %s%s" (car arg) (if (atom (cdr arg)) "" "'") (cdr arg)))
3154 c-parse-state-state " ")
3155 ")")))
3156
3130(defun c-debug-parse-state () 3157(defun c-debug-parse-state ()
3131 (let ((here (point)) (res1 (c-real-parse-state)) res2) 3158 (let ((here (point)) (res1 (c-real-parse-state)) res2)
3132 (let ((c-state-cache nil) 3159 (let ((c-state-cache nil)
@@ -3145,15 +3172,21 @@ comment at the start of cc-engine.el for more info."
3145 ;; The cache can actually go further back due to the ad-hoc way 3172 ;; The cache can actually go further back due to the ad-hoc way
3146 ;; the first paren is found, so try to whack off a bit of its 3173 ;; the first paren is found, so try to whack off a bit of its
3147 ;; start before complaining. 3174 ;; start before complaining.
3148 (save-excursion 3175 ;; (save-excursion
3149 (goto-char (or (c-least-enclosing-brace res2) (point))) 3176 ;; (goto-char (or (c-least-enclosing-brace res2) (point)))
3150 (c-beginning-of-defun-1) 3177 ;; (c-beginning-of-defun-1)
3151 (while (not (or (bobp) (eq (char-after) ?{))) 3178 ;; (while (not (or (bobp) (eq (char-after) ?{)))
3152 (c-beginning-of-defun-1)) 3179 ;; (c-beginning-of-defun-1))
3153 (unless (equal (c-whack-state-before (point) res1) res2) 3180 ;; (unless (equal (c-whack-state-before (point) res1) res2)
3154 (message (concat "c-parse-state inconsistency at %s: " 3181 ;; (message (concat "c-parse-state inconsistency at %s: "
3155 "using cache: %s, from scratch: %s") 3182 ;; "using cache: %s, from scratch: %s")
3156 here res1 res2)))) 3183 ;; here res1 res2)))
3184 (message (concat "c-parse-state inconsistency at %s: "
3185 "using cache: %s, from scratch: %s")
3186 here res1 res2)
3187 (message "Old state:")
3188 (c-replay-parse-state-state))
3189 (c-record-parse-state-state)
3157 res1)) 3190 res1))
3158 3191
3159(defun c-toggle-parse-state-debug (&optional arg) 3192(defun c-toggle-parse-state-debug (&optional arg)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 619c423902c..156c90159cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1968,12 +1968,15 @@ Optional argument MINOR indicates this is called from
1968 1968
1969;;;###autoload 1969;;;###autoload
1970(define-minor-mode compilation-shell-minor-mode 1970(define-minor-mode compilation-shell-minor-mode
1971 "Toggle compilation shell minor mode. 1971 "Toggle Compilation Shell minor mode.
1972With arg, turn compilation mode on if and only if arg is positive. 1972With a prefix argument ARG, enable Compilation Shell minor mode
1973In this minor mode, all the error-parsing commands of the 1973if ARG is positive, and disable it otherwise. If called from
1974Compilation major mode are available but bound to keys that don't 1974Lisp, enable the mode if ARG is omitted or nil.
1975collide with Shell mode. See `compilation-mode'. 1975
1976Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." 1976When Compilation Shell minor mode is enabled, all the
1977error-parsing commands of the Compilation major mode are
1978available but bound to keys that don't collide with Shell mode.
1979See `compilation-mode'."
1977 nil " Shell-Compile" 1980 nil " Shell-Compile"
1978 :group 'compilation 1981 :group 'compilation
1979 (if compilation-shell-minor-mode 1982 (if compilation-shell-minor-mode
@@ -1982,11 +1985,14 @@ Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'."
1982 1985
1983;;;###autoload 1986;;;###autoload
1984(define-minor-mode compilation-minor-mode 1987(define-minor-mode compilation-minor-mode
1985 "Toggle compilation minor mode. 1988 "Toggle Compilation minor mode.
1986With arg, turn compilation mode on if and only if arg is positive. 1989With a prefix argument ARG, enable Compilation minor mode if ARG
1987In this minor mode, all the error-parsing commands of the 1990is positive, and disable it otherwise. If called from Lisp,
1988Compilation major mode are available. See `compilation-mode'. 1991enable the mode if ARG is omitted or nil.
1989Turning the mode on runs the normal hook `compilation-minor-mode-hook'." 1992
1993When Compilation minor mode is enabled, all the error-parsing
1994commands of Compilation major mode are available. See
1995`compilation-mode'."
1990 nil " Compilation" 1996 nil " Compilation"
1991 :group 'compilation 1997 :group 'compilation
1992 (if compilation-minor-mode 1998 (if compilation-minor-mode
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 25a23fed293..7b3a2893610 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3255,7 +3255,10 @@ Treats actions as defuns."
3255 3255
3256;;;###autoload 3256;;;###autoload
3257(define-minor-mode gud-tooltip-mode 3257(define-minor-mode gud-tooltip-mode
3258 "Toggle the display of GUD tooltips." 3258 "Toggle the display of GUD tooltips.
3259With a prefix argument ARG, enable the feature if ARG is
3260positive, and disable it otherwise. If called from Lisp, enable
3261it if ARG is omitted or nil."
3259 :global t 3262 :global t
3260 :group 'gud 3263 :group 'gud
3261 :group 'tooltip 3264 :group 'tooltip
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 48d1ac4b85e..374a45acec6 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -214,11 +214,15 @@
214 214
215;;;###autoload 215;;;###autoload
216(define-minor-mode hide-ifdef-mode 216(define-minor-mode hide-ifdef-mode
217 "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. 217 "Toggle features to hide/show #ifdef blocks (Hide-Ifdef mode).
218With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. 218With a prefix argument ARG, enable Hide-Ifdef mode if ARG is
219In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor 219positive, and disable it otherwise. If called from Lisp, enable
220would eliminate may be hidden from view. Several variables affect 220the mode if ARG is omitted or nil.
221how the hiding is done: 221
222Hide-Ifdef mode is a buffer-local minor mode for use with C and
223C-like major modes. When enabled, code within #ifdef constructs
224that the C preprocessor would eliminate may be hidden from view.
225Several variables affect how the hiding is done:
222 226
223`hide-ifdef-env' 227`hide-ifdef-env'
224 An association list of defined and undefined symbols for the 228 An association list of defined and undefined symbols for the
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index b2cd24f0f98..18f47d14a3f 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -4277,16 +4277,14 @@ Otherwise, just expand the file name."
4277(defvar idlwave-shell-electric-debug-buffers nil) 4277(defvar idlwave-shell-electric-debug-buffers nil)
4278 4278
4279(define-minor-mode idlwave-shell-electric-debug-mode 4279(define-minor-mode idlwave-shell-electric-debug-mode
4280 "Toggle Electric Debug mode. 4280 "Toggle Idlwave Shell Electric Debug mode.
4281With no argument, this command toggles the mode. 4281With a prefix argument ARG, enable the mode if ARG is positive,
4282Non-null prefix argument turns on the mode. 4282and disable it otherwise. If called from Lisp, enable the mode
4283Null prefix argument turns off the mode. 4283if ARG is omitted or nil.
4284 4284
4285When Electric Debug mode is enabled, the many debugging commands are 4285When Idlwave Shell Electric Debug mode is enabled, the Idlwave
4286available as single key sequences." 4286Shell debugging commands are available as single key sequences."
4287nil 4287 nil " *Debugging*" idlwave-shell-electric-debug-mode-map)
4288" *Debugging*"
4289idlwave-shell-electric-debug-mode-map)
4290 4288
4291(add-hook 4289(add-hook
4292 'idlwave-shell-electric-debug-mode-on-hook 4290 'idlwave-shell-electric-debug-mode-on-hook
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 8066e1c3a7f..c77ee4b76a9 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1907,7 +1907,6 @@ The main features of this mode are
1907 (set (make-local-variable 'comment-start-skip) ";+[ \t]*") 1907 (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
1908 (set (make-local-variable 'comment-start) ";") 1908 (set (make-local-variable 'comment-start) ";")
1909 (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions 1909 (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions
1910 (set (make-local-variable 'require-final-newline) t)
1911 (set (make-local-variable 'abbrev-all-caps) t) 1910 (set (make-local-variable 'abbrev-all-caps) t)
1912 (set (make-local-variable 'indent-tabs-mode) nil) 1911 (set (make-local-variable 'indent-tabs-mode) nil)
1913 (set (make-local-variable 'completion-ignore-case) t) 1912 (set (make-local-variable 'completion-ignore-case) t)
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index cb64b2436c6..e9d890c3f26 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -68,7 +68,7 @@ mode, set this to (\"-q\" \"--traditional\")."
68 (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) 68 (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring)
69 (define-key map [menu-bar inout list-history] 69 (define-key map [menu-bar inout list-history]
70 '("List Input History" . inferior-octave-dynamic-list-input-ring)) 70 '("List Input History" . inferior-octave-dynamic-list-input-ring))
71 (define-key map "\C-c\C-h" 'octave-help) 71 (define-key map "\C-c\C-h" 'info-lookup-symbol)
72 map) 72 map)
73 "Keymap used in Inferior Octave mode.") 73 "Keymap used in Inferior Octave mode.")
74 74
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 183347cdeca..5e13b8533e7 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -655,14 +655,6 @@ including a reproducible test case and send the message."
655 655
656 (easy-menu-add octave-mode-menu) 656 (easy-menu-add octave-mode-menu)
657 (octave-initialize-completions)) 657 (octave-initialize-completions))
658
659(defvar info-lookup-mode)
660
661(defun octave-help ()
662 "Get help on Octave symbols from the Octave info files.
663Look up symbol in the function, operator and variable indices of the info files."
664 (let ((info-lookup-mode 'octave-mode))
665 (call-interactively 'info-lookup-symbol)))
666 658
667;;; Miscellaneous useful functions 659;;; Miscellaneous useful functions
668 660
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 1a403f50b1b..9c61da89008 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -94,13 +94,19 @@
94 94
95;;;###autoload 95;;;###autoload
96(define-minor-mode subword-mode 96(define-minor-mode subword-mode
97 "Mode enabling subword movement and editing keys. 97 "Toggle subword movement and editing (Subword mode).
98In spite of GNU Coding Standards, it is popular to name a symbol by 98With a prefix argument ARG, enable Subword mode if ARG is
99mixing uppercase and lowercase letters, e.g. \"GtkWidget\", 99positive, and disable it otherwise. If called from Lisp, enable
100\"EmacsFrameClass\", \"NSGraphicsContext\", etc. Here we call these 100the mode if ARG is omitted or nil.
101mixed case symbols `nomenclatures'. Also, each capitalized (or 101
102completely uppercase) part of a nomenclature is called a `subword'. 102Subword mode is a buffer-local minor mode. Enabling it remaps
103Here are some examples: 103word-based editing commands to subword-based commands that handle
104symbols with mixed uppercase and lowercase letters,
105e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".
106
107Here we call these mixed case symbols `nomenclatures'. Each
108capitalized (or completely uppercase) part of a nomenclature is
109called a `subword'. Here are some examples:
104 110
105 Nomenclature Subwords 111 Nomenclature Subwords
106 =========================================================== 112 ===========================================================
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index 1f33f5f3aaf..b02324871ff 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -310,7 +310,6 @@ Key bindings:
310 (set (make-local-variable 'comment-indent-function) 'c-comment-indent) 310 (set (make-local-variable 'comment-indent-function) 'c-comment-indent)
311 (set (make-local-variable 'paragraph-start) "^$") 311 (set (make-local-variable 'paragraph-start) "^$")
312 (set (make-local-variable 'paragraph-separate) paragraph-start) 312 (set (make-local-variable 'paragraph-separate) paragraph-start)
313 (set (make-local-variable 'require-final-newline) t)
314 (set (make-local-variable 'indent-tabs-mode) nil) 313 (set (make-local-variable 'indent-tabs-mode) nil)
315 (set (make-local-variable 'indent-line-function) 'vera-indent-line) 314 (set (make-local-variable 'indent-line-function) 'vera-indent-line)
316 (set (make-local-variable 'parse-sexp-ignore-comments) t) 315 (set (make-local-variable 'parse-sexp-ignore-comments) t)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 9aaf3059b78..d7aa82aee1b 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8029,12 +8029,16 @@ project is defined."
8029 8029
8030(define-minor-mode vhdl-electric-mode 8030(define-minor-mode vhdl-electric-mode
8031 "Toggle VHDL electric mode. 8031 "Toggle VHDL electric mode.
8032Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." 8032With a prefix argument ARG, enable the mode if ARG is positive,
8033and disable it otherwise. If called from Lisp, enable it if ARG
8034is omitted or nil."
8033 :global t) 8035 :global t)
8034 8036
8035(define-minor-mode vhdl-stutter-mode 8037(define-minor-mode vhdl-stutter-mode
8036 "Toggle VHDL stuttering mode. 8038 "Toggle VHDL stuttering mode.
8037Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." 8039With a prefix argument ARG, enable the mode if ARG is positive,
8040and disable it otherwise. If called from Lisp, enable it if ARG
8041is omitted or nil."
8038 :global t) 8042 :global t)
8039 8043
8040;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 8044;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 97e188139e9..e27d07854c8 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -236,12 +236,14 @@ It creates the Imenu index for the buffer, if necessary."
236;; This is the name people would normally expect. 236;; This is the name people would normally expect.
237;;;###autoload 237;;;###autoload
238(define-minor-mode which-function-mode 238(define-minor-mode which-function-mode
239 "Toggle Which Function mode, globally. 239 "Toggle mode line display of current function (Which Function mode).
240When Which Function mode is enabled, the current function name is 240With a prefix argument ARG, enable Which Function mode if ARG is
241continuously displayed in the mode line, in certain major modes. 241positive, and disable it otherwise. If called from Lisp, enable
242 242the mode if ARG is omitted or nil.
243With prefix ARG, turn Which Function mode on if arg is positive, 243
244and off otherwise." 244Which Function mode is a global minor mode. When enabled, the
245current function name is continuously displayed in the mode line,
246in certain major modes."
245 :global t :group 'which-func 247 :global t :group 'which-func
246 (when (timerp which-func-update-timer) 248 (when (timerp which-func-update-timer)
247 (cancel-timer which-func-update-timer)) 249 (cancel-timer which-func-update-timer))
diff --git a/lisp/recentf.el b/lisp/recentf.el
index fc9b7881733..79f4eb437d9 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -1336,12 +1336,14 @@ That is, remove duplicates, non-kept, and excluded files."
1336 1336
1337;;;###autoload 1337;;;###autoload
1338(define-minor-mode recentf-mode 1338(define-minor-mode recentf-mode
1339 "Toggle recentf mode. 1339 "Toggle \"Open Recent\" menu (Recentf mode).
1340With prefix argument ARG, turn on if positive, otherwise off. 1340With a prefix argument ARG, enable Recentf mode if ARG is
1341Returns non-nil if the new state is enabled. 1341positive, and disable it otherwise. If called from Lisp, enable
1342 1342Recentf mode if ARG is omitted or nil.
1343When recentf mode is enabled, it maintains a menu for visiting files 1343
1344that were operated on recently." 1344When Recentf mode is enabled, a \"Open Recent\" submenu is
1345displayed in the \"File\" menu, containing a list of files that
1346were operated on recently."
1345 :global t 1347 :global t
1346 :group 'recentf 1348 :group 'recentf
1347 :keymap recentf-mode-map 1349 :keymap recentf-mode-map
diff --git a/lisp/reveal.el b/lisp/reveal.el
index bf18602379c..ea46cfd1dd3 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -189,12 +189,13 @@ Each element has the form (WINDOW . OVERLAY).")
189 189
190;;;###autoload 190;;;###autoload
191(define-minor-mode reveal-mode 191(define-minor-mode reveal-mode
192 "Toggle Reveal mode on or off. 192 "Toggle decloaking of invisible text near point (Reveal mode).
193Reveal mode renders invisible text around point visible again. 193With a prefix argument ARG, enable Reveal mode if ARG is
194positive, and disable it otherwise. If called from Lisp, enable
195Reveal mode if ARG is omitted or nil.
194 196
195Interactively, with no prefix argument, toggle the mode. 197Reveral mode is a buffer-local minor mode. When enabled, it
196With universal prefix ARG (or if ARG is nil) turn mode on. 198reveals invisible text around point."
197With zero or negative ARG turn mode off."
198 :group 'reveal 199 :group 'reveal
199 :lighter (global-reveal-mode nil " Reveal") 200 :lighter (global-reveal-mode nil " Reveal")
200 :keymap reveal-mode-map 201 :keymap reveal-mode-map
@@ -207,12 +208,12 @@ With zero or negative ARG turn mode off."
207 208
208;;;###autoload 209;;;###autoload
209(define-minor-mode global-reveal-mode 210(define-minor-mode global-reveal-mode
210 "Toggle Reveal mode in all buffers on or off. 211 "Toggle Reveal mode in all buffers (Global Reveal mode).
211Reveal mode renders invisible text around point visible again. 212Reveal mode renders invisible text around point visible again.
212 213
213Interactively, with no prefix argument, toggle the mode. 214With a prefix argument ARG, enable Global Reveal mode if ARG is
214With universal prefix ARG (or if ARG is nil) turn mode on. 215positive, and disable it otherwise. If called from Lisp, enable
215With zero or negative ARG turn mode off." 216the mode if ARG is omitted or nil."
216 :global t :group 'reveal 217 :global t :group 'reveal
217 (setq-default reveal-mode global-reveal-mode) 218 (setq-default reveal-mode global-reveal-mode)
218 (if global-reveal-mode 219 (if global-reveal-mode
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el
index 9eb2d2abdee..2d8c6e0964d 100644
--- a/lisp/rfn-eshadow.el
+++ b/lisp/rfn-eshadow.el
@@ -207,15 +207,17 @@ been set up by `rfn-eshadow-setup-minibuffer'."
207 (error nil))) 207 (error nil)))
208 208
209(define-minor-mode file-name-shadow-mode 209(define-minor-mode file-name-shadow-mode
210 "Toggle File-Name Shadow mode. 210 "Toggle file-name shadowing in minibuffers (File-Name Shadow mode).
211When active, any part of a filename being read in the minibuffer 211With a prefix argument ARG, enable File-Name Shadow mode if ARG
212that would be ignored (because the result is passed through 212is positive, and disable it otherwise. If called from Lisp,
213enable the mode if ARG is omitted or nil.
214
215File-Name Shadow mode is a global minor mode. When enabled, any
216part of a filename being read in the minibuffer that would be
217ignored (because the result is passed through
213`substitute-in-file-name') is given the properties in 218`substitute-in-file-name') is given the properties in
214`file-name-shadow-properties', which can be used to make 219`file-name-shadow-properties', which can be used to make that
215that portion dim, invisible, or otherwise less visually noticeable. 220portion dim, invisible, or otherwise less visually noticeable."
216
217With prefix argument ARG, turn on if positive, otherwise off.
218Returns non-nil if the new state is enabled."
219 :global t 221 :global t
220 ;; We'd like to use custom-initialize-set here so the setup is done 222 ;; We'd like to use custom-initialize-set here so the setup is done
221 ;; before dumping, but at the point where the defcustom is evaluated, 223 ;; before dumping, but at the point where the defcustom is evaluated,
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index fc62bf6b633..046c29471ac 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -567,8 +567,10 @@ format first."
567 567
568;;;###autoload 568;;;###autoload
569(define-minor-mode ruler-mode 569(define-minor-mode ruler-mode
570 "Toggle Ruler mode. 570 "Toggle display of ruler in header line (Ruler mode).
571In Ruler mode, Emacs displays a ruler in the header line." 571With a prefix argument ARG, enable Ruler mode if ARG is positive,
572and disable it otherwise. If called from Lisp, enable the mode
573if ARG is omitted or nil."
572 nil nil 574 nil nil
573 ruler-mode-map 575 ruler-mode-map
574 :group 'ruler-mode 576 :group 'ruler-mode
diff --git a/lisp/savehist.el b/lisp/savehist.el
index 653d0312a19..faeab324e5a 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -170,15 +170,19 @@ minibuffer history.")
170 170
171;;;###autoload 171;;;###autoload
172(define-minor-mode savehist-mode 172(define-minor-mode savehist-mode
173 "Toggle savehist-mode. 173 "Toggle saving of minibuffer history (Savehist mode).
174Positive ARG turns on `savehist-mode'. When on, savehist-mode causes 174With a prefix argument ARG, enable Savehist mode if ARG is
175minibuffer history to be saved periodically and when exiting Emacs. 175positive, and disable it otherwise. If called from Lisp, enable
176When turned on for the first time in an Emacs session, it causes the 176the mode if ARG is omitted or nil.
177previous minibuffer history to be loaded from `savehist-file'. 177
178When Savehist mode is enabled, minibuffer history is saved
179periodically and when exiting Emacs. When Savehist mode is
180enabled for the first time in an Emacs session, it loads the
181previous minibuffer history from `savehist-file'.
178 182
179This mode should normally be turned on from your Emacs init file. 183This mode should normally be turned on from your Emacs init file.
180Calling it at any other time replaces your current minibuffer histories, 184Calling it at any other time replaces your current minibuffer
181which is probably undesirable." 185histories, which is probably undesirable."
182 :global t 186 :global t
183 (if (not savehist-mode) 187 (if (not savehist-mode)
184 (savehist-uninstall) 188 (savehist-uninstall)
diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el
index 6dbdc9ab90d..81a4d2c86e1 100644
--- a/lisp/scroll-all.el
+++ b/lisp/scroll-all.el
@@ -101,10 +101,13 @@
101 101
102;;;###autoload 102;;;###autoload
103(define-minor-mode scroll-all-mode 103(define-minor-mode scroll-all-mode
104 "Toggle Scroll-All minor mode. 104 "Toggle shared scrolling in same-frame windows (Scroll-All mode).
105With ARG, turn Scroll-All minor mode on if ARG is positive, off otherwise. 105With a prefix argument ARG, enable Scroll-All mode if ARG is
106When Scroll-All mode is on, scrolling commands entered in one window 106positive, and disable it otherwise. If called from Lisp, enable
107apply to all visible windows in the same frame." 107the mode if ARG is omitted or nil.
108
109When Scroll-All mode is enabled, scrolling commands invoked in
110one window apply to all visible windows in the same frame."
108 nil " *SL*" nil 111 nil " *SL*" nil
109 :global t 112 :global t
110 :group 'windows 113 :group 'windows
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 0c68bca4d2e..37a31460cdb 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -114,12 +114,15 @@ Setting the variable with a customization buffer also takes effect."
114 114
115(defun get-scroll-bar-mode () scroll-bar-mode) 115(defun get-scroll-bar-mode () scroll-bar-mode)
116(defsetf get-scroll-bar-mode set-scroll-bar-mode) 116(defsetf get-scroll-bar-mode set-scroll-bar-mode)
117
117(define-minor-mode scroll-bar-mode 118(define-minor-mode scroll-bar-mode
118 "Toggle display of vertical scroll bars on all frames. 119 "Toggle vertical scroll bars on all frames (Scroll Bar mode).
120With a prefix argument ARG, enable Scroll Bar mode if ARG is
121positive, and disable it otherwise. If called from Lisp, enable
122the mode if ARG is omitted or nil.
123
119This command applies to all frames that exist and frames to be 124This command applies to all frames that exist and frames to be
120created in the future. 125created in the future."
121With a numeric argument, if the argument is positive
122turn on scroll bars; otherwise turn off scroll bars."
123 :variable (eq (get-scroll-bar-mode) 126 :variable (eq (get-scroll-bar-mode)
124 (or previous-scroll-bar-mode 127 (or previous-scroll-bar-mode
125 default-frame-scroll-bars))) 128 default-frame-scroll-bars)))
diff --git a/lisp/server.el b/lisp/server.el
index 63d46a365c9..bc989c55ed1 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -669,9 +669,13 @@ Return values:
669;;;###autoload 669;;;###autoload
670(define-minor-mode server-mode 670(define-minor-mode server-mode
671 "Toggle Server mode. 671 "Toggle Server mode.
672With ARG, turn Server mode on if ARG is positive, off otherwise. 672With a prefix argument ARG, enable Server mode if ARG is
673positive, and disable it otherwise. If called from Lisp, enable
674Server mode if ARG is omitted or nil.
675
673Server mode runs a process that accepts commands from the 676Server mode runs a process that accepts commands from the
674`emacsclient' program. See `server-start' and Info node `Emacs server'." 677`emacsclient' program. See Info node `Emacs server' and
678`server-start' for details."
675 :global t 679 :global t
676 :group 'server 680 :group 'server
677 :version "22.1" 681 :version "22.1"
diff --git a/lisp/shell.el b/lisp/shell.el
index cefe42bb3ec..c75594ddbe4 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -890,9 +890,13 @@ Environment variables are expanded, see function `substitute-in-file-name'."
890 890
891(defvaralias 'shell-dirtrack-mode 'shell-dirtrackp) 891(defvaralias 'shell-dirtrack-mode 'shell-dirtrackp)
892(define-minor-mode shell-dirtrack-mode 892(define-minor-mode shell-dirtrack-mode
893 "Turn directory tracking on and off in a shell buffer. 893 "Toggle directory tracking in this shell buffer (Shell Dirtrack mode).
894The `dirtrack' package provides an alternative implementation of this 894With a prefix argument ARG, enable Shell Dirtrack mode if ARG is
895feature - see the function `dirtrack-mode'." 895positive, and disable it otherwise. If called from Lisp, enable
896the mode if ARG is omitted or nil.
897
898The `dirtrack' package provides an alternative implementation of
899this feature; see the function `dirtrack-mode'."
896 nil nil nil 900 nil nil nil
897 (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) 901 (setq list-buffers-directory (if shell-dirtrack-mode default-directory))
898 (if shell-dirtrack-mode 902 (if shell-dirtrack-mode
diff --git a/lisp/simple.el b/lisp/simple.el
index 6d0e7543549..79de6aea3dd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4086,13 +4086,15 @@ its earlier value."
4086 4086
4087(define-minor-mode transient-mark-mode 4087(define-minor-mode transient-mark-mode
4088 "Toggle Transient Mark mode. 4088 "Toggle Transient Mark mode.
4089With ARG, turn Transient Mark mode on if ARG is positive, off otherwise. 4089With a prefix argument ARG, enable Transient Mark mode if ARG is
4090positive, and disable it otherwise. If called from Lisp, enable
4091Transient Mark mode if ARG is omitted or nil.
4090 4092
4091In Transient Mark mode, when the mark is active, the region is highlighted. 4093Transient Mark mode is a global minor mode. When enabled, the
4092Changing the buffer \"deactivates\" the mark. 4094region is highlighted whenever the mark is active. The mark is
4093So do certain other operations that set the mark 4095\"deactivated\" by changing the buffer, and after certain other
4094but whose main purpose is something else--for example, 4096operations that set the mark but whose main purpose is something
4095incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]. 4097else--for example, incremental search, \\[beginning-of-buffer], and \\[end-of-buffer].
4096 4098
4097You can also deactivate the mark by typing \\[keyboard-quit] or 4099You can also deactivate the mark by typing \\[keyboard-quit] or
4098\\[keyboard-escape-quit]. 4100\\[keyboard-escape-quit].
@@ -4906,8 +4908,15 @@ other purposes."
4906(defvar visual-line--saved-state nil) 4908(defvar visual-line--saved-state nil)
4907 4909
4908(define-minor-mode visual-line-mode 4910(define-minor-mode visual-line-mode
4909 "Redefine simple editing commands to act on visual lines, not logical lines. 4911 "Toggle visual line based editing (Visual Line mode).
4910This also turns on `word-wrap' in the buffer." 4912With a prefix argument ARG, enable Visual Line mode if ARG is
4913positive, and disable it otherwise. If called from Lisp, enable
4914the mode if ARG is omitted or nil.
4915
4916When Visual Line mode is enabled, `word-wrap' is turned on in
4917this buffer, and simple editing commands are redefined to act on
4918visual lines, not logical lines. See Info node `Visual Line
4919Mode' for details."
4911 :keymap visual-line-mode-map 4920 :keymap visual-line-mode-map
4912 :group 'visual-line 4921 :group 'visual-line
4913 :lighter " Wrap" 4922 :lighter " Wrap"
@@ -5301,10 +5310,14 @@ Some major modes set this.")
5301(put 'auto-fill-function 'safe-local-variable 'null) 5310(put 'auto-fill-function 'safe-local-variable 'null)
5302 5311
5303(define-minor-mode auto-fill-mode 5312(define-minor-mode auto-fill-mode
5304 "Toggle Auto Fill mode. 5313 "Toggle automatic line breaking (Auto Fill mode).
5305With ARG, turn Auto Fill mode on if and only if ARG is positive. 5314With a prefix argument ARG, enable Auto Fill mode if ARG is
5306In Auto Fill mode, inserting a space at a column beyond `current-fill-column' 5315positive, and disable it otherwise. If called from Lisp, enable
5307automatically breaks the line at a previous space. 5316the mode if ARG is omitted or nil.
5317
5318When Auto Fill mode is enabled, inserting a space at a column
5319beyond `current-fill-column' automatically breaks the line at a
5320previous space.
5308 5321
5309When `auto-fill-mode' is on, the `auto-fill-function' variable is 5322When `auto-fill-mode' is on, the `auto-fill-function' variable is
5310non-`nil'. 5323non-`nil'.
@@ -5412,36 +5425,44 @@ if long lines are truncated."
5412 "The string displayed in the mode line when in binary overwrite mode.") 5425 "The string displayed in the mode line when in binary overwrite mode.")
5413 5426
5414(define-minor-mode overwrite-mode 5427(define-minor-mode overwrite-mode
5415 "Toggle overwrite mode. 5428 "Toggle Overwrite mode.
5416With prefix argument ARG, turn overwrite mode on if ARG is positive, 5429With a prefix argument ARG, enable Overwrite mode if ARG is
5417otherwise turn it off. In overwrite mode, printing characters typed 5430positive, and disable it otherwise. If called from Lisp, enable
5418in replace existing text on a one-for-one basis, rather than pushing 5431the mode if ARG is omitted or nil.
5419it to the right. At the end of a line, such characters extend the line. 5432
5420Before a tab, such characters insert until the tab is filled in. 5433When Overwrite mode is enabled, printing characters typed in
5421\\[quoted-insert] still inserts characters in overwrite mode; this 5434replace existing text on a one-for-one basis, rather than pushing
5422is supposed to make it easier to insert characters when necessary." 5435it to the right. At the end of a line, such characters extend
5436the line. Before a tab, such characters insert until the tab is
5437filled in. \\[quoted-insert] still inserts characters in
5438overwrite mode; this is supposed to make it easier to insert
5439characters when necessary."
5423 :variable (eq overwrite-mode 'overwrite-mode-textual)) 5440 :variable (eq overwrite-mode 'overwrite-mode-textual))
5424 5441
5425(define-minor-mode binary-overwrite-mode 5442(define-minor-mode binary-overwrite-mode
5426 "Toggle binary overwrite mode. 5443 "Toggle Binary Overwrite mode.
5427With prefix argument ARG, turn binary overwrite mode on if ARG is 5444With a prefix argument ARG, enable Binary Overwrite mode if ARG
5428positive, otherwise turn it off. In binary overwrite mode, printing 5445is positive, and disable it otherwise. If called from Lisp,
5429characters typed in replace existing text. Newlines are not treated 5446enable the mode if ARG is omitted or nil.
5430specially, so typing at the end of a line joins the line to the next, 5447
5431with the typed character between them. Typing before a tab character 5448When Binary Overwrite mode is enabled, printing characters typed
5432simply replaces the tab with the character typed. \\[quoted-insert] 5449in replace existing text. Newlines are not treated specially, so
5433replaces the text at the cursor, just as ordinary typing characters do. 5450typing at the end of a line joins the line to the next, with the
5434 5451typed character between them. Typing before a tab character
5435Note that binary overwrite mode is not its own minor mode; it is a 5452simply replaces the tab with the character typed.
5436specialization of overwrite mode, entered by setting the 5453\\[quoted-insert] replaces the text at the cursor, just as
5454ordinary typing characters do.
5455
5456Note that Binary Overwrite mode is not its own minor mode; it is
5457a specialization of overwrite mode, entered by setting the
5437`overwrite-mode' variable to `overwrite-mode-binary'." 5458`overwrite-mode' variable to `overwrite-mode-binary'."
5438 :variable (eq overwrite-mode 'overwrite-mode-binary)) 5459 :variable (eq overwrite-mode 'overwrite-mode-binary))
5439 5460
5440(define-minor-mode line-number-mode 5461(define-minor-mode line-number-mode
5441 "Toggle Line Number mode. 5462 "Toggle line number display in the mode line (Line Number mode).
5442With ARG, turn Line Number mode on if ARG is positive, otherwise 5463With a prefix argument ARG, enable Line Number mode if ARG is
5443turn it off. When Line Number mode is enabled, the line number 5464positive, and disable it otherwise. If called from Lisp, enable
5444appears in the mode line. 5465the mode if ARG is omitted or nil.
5445 5466
5446Line numbers do not appear for very large buffers and buffers 5467Line numbers do not appear for very large buffers and buffers
5447with very long lines; see variables `line-number-display-limit' 5468with very long lines; see variables `line-number-display-limit'
@@ -5449,22 +5470,27 @@ and `line-number-display-limit-width'."
5449 :init-value t :global t :group 'mode-line) 5470 :init-value t :global t :group 'mode-line)
5450 5471
5451(define-minor-mode column-number-mode 5472(define-minor-mode column-number-mode
5452 "Toggle Column Number mode. 5473 "Toggle column number display in the mode line (Column Number mode).
5453With ARG, turn Column Number mode on if ARG is positive, 5474With a prefix argument ARG, enable Column Number mode if ARG is
5454otherwise turn it off. When Column Number mode is enabled, the 5475positive, and disable it otherwise.
5455column number appears in the mode line." 5476
5477If called from Lisp, enable the mode if ARG is omitted or nil."
5456 :global t :group 'mode-line) 5478 :global t :group 'mode-line)
5457 5479
5458(define-minor-mode size-indication-mode 5480(define-minor-mode size-indication-mode
5459 "Toggle Size Indication mode. 5481 "Toggle buffer size display in the mode line (Size Indication mode).
5460With ARG, turn Size Indication mode on if ARG is positive, 5482With a prefix argument ARG, enable Size Indication mode if ARG is
5461otherwise turn it off. When Size Indication mode is enabled, the 5483positive, and disable it otherwise.
5462size of the accessible part of the buffer appears in the mode line." 5484
5485If called from Lisp, enable the mode if ARG is omitted or nil."
5463 :global t :group 'mode-line) 5486 :global t :group 'mode-line)
5464 5487
5465(define-minor-mode auto-save-mode 5488(define-minor-mode auto-save-mode
5466 "Toggle auto-saving of contents of current buffer. 5489 "Toggle auto-saving in the current buffer (Auto Save mode).
5467With prefix argument ARG, turn auto-saving on if positive, else off." 5490With a prefix argument ARG, enable Auto Save mode if ARG is
5491positive, and disable it otherwise.
5492
5493If called from Lisp, enable the mode if ARG is omitted or nil."
5468 :variable ((and buffer-auto-save-file-name 5494 :variable ((and buffer-auto-save-file-name
5469 ;; If auto-save is off because buffer has shrunk, 5495 ;; If auto-save is off because buffer has shrunk,
5470 ;; then toggling should turn it on. 5496 ;; then toggling should turn it on.
@@ -6634,8 +6660,9 @@ call `normal-erase-is-backspace-mode' (which see) instead."
6634 6660
6635(define-minor-mode normal-erase-is-backspace-mode 6661(define-minor-mode normal-erase-is-backspace-mode
6636 "Toggle the Erase and Delete mode of the Backspace and Delete keys. 6662 "Toggle the Erase and Delete mode of the Backspace and Delete keys.
6637 6663With a prefix argument ARG, enable this feature if ARG is
6638With numeric ARG, turn the mode on if and only if ARG is positive. 6664positive, and disable it otherwise. If called from Lisp, enable
6665the mode if ARG is omitted or nil.
6639 6666
6640On window systems, when this mode is on, Delete is mapped to C-d 6667On window systems, when this mode is on, Delete is mapped to C-d
6641and Backspace is mapped to DEL; when this mode is off, both 6668and Backspace is mapped to DEL; when this mode is off, both
@@ -6709,13 +6736,13 @@ See also `normal-erase-is-backspace'."
6709 "Saved value of `buffer-invisibility-spec' when Visible mode is on.") 6736 "Saved value of `buffer-invisibility-spec' when Visible mode is on.")
6710 6737
6711(define-minor-mode visible-mode 6738(define-minor-mode visible-mode
6712 "Toggle Visible mode. 6739 "Toggle making all invisible text temporarily visible (Visible mode).
6713With argument ARG turn Visible mode on if ARG is positive, otherwise 6740With a prefix argument ARG, enable Visible mode if ARG is
6714turn it off. 6741positive, and disable it otherwise. If called from Lisp, enable
6742the mode if ARG is omitted or nil.
6715 6743
6716Enabling Visible mode makes all invisible text temporarily visible. 6744This mode works by saving the value of `buffer-invisibility-spec'
6717Disabling Visible mode turns off that effect. Visible mode works by 6745and setting it to nil."
6718saving the value of `buffer-invisibility-spec' and setting it to nil."
6719 :lighter " Vis" 6746 :lighter " Vis"
6720 :group 'editing-basics 6747 :group 'editing-basics
6721 (when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec) 6748 (when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec)
diff --git a/lisp/strokes.el b/lisp/strokes.el
index ca0086b3b97..5ff94bb22c6 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1386,8 +1386,12 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
1386 1386
1387;;;###autoload 1387;;;###autoload
1388(define-minor-mode strokes-mode 1388(define-minor-mode strokes-mode
1389 "Toggle Strokes global minor mode.\\<strokes-mode-map> 1389 "Toggle Strokes mode, a global minor mode.
1390With ARG, turn strokes on if and only if ARG is positive. 1390With a prefix argument ARG, enable Strokes mode if ARG is
1391positive, and disable it otherwise. If called from Lisp, enable
1392the mode if ARG is omitted or nil.
1393
1394\\<strokes-mode-map>
1391Strokes are pictographic mouse gestures which invoke commands. 1395Strokes are pictographic mouse gestures which invoke commands.
1392Strokes are invoked with \\[strokes-do-stroke]. You can define 1396Strokes are invoked with \\[strokes-do-stroke]. You can define
1393new strokes with \\[strokes-global-set-stroke]. See also 1397new strokes with \\[strokes-global-set-stroke]. See also
diff --git a/lisp/subr.el b/lisp/subr.el
index 05ac198dd13..c88cef0ba0f 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -116,8 +116,6 @@ BODY should be a list of Lisp expressions.
116 ;; depend on backquote.el. 116 ;; depend on backquote.el.
117 (list 'function (cons 'lambda cdr))) 117 (list 'function (cons 'lambda cdr)))
118 118
119;; Partial application of functions (similar to "currying").
120;; This function is here rather than in subr.el because it uses CL.
121(defun apply-partially (fun &rest args) 119(defun apply-partially (fun &rest args)
122 "Return a function that is a partial application of FUN to ARGS. 120 "Return a function that is a partial application of FUN to ARGS.
123ARGS is a list of the first N arguments to pass to FUN. 121ARGS is a list of the first N arguments to pass to FUN.
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 059024c4bce..78857b04143 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -33,7 +33,7 @@
33;; mev. Now the interface with gpm is directly through a Unix socket, so this 33;; mev. Now the interface with gpm is directly through a Unix socket, so this
34;; file is reduced to a single minor mode macro call. 34;; file is reduced to a single minor mode macro call.
35 35
36;; 36;;
37 37
38;;; Code: 38;;; Code:
39 39
@@ -65,9 +65,10 @@
65(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1") 65(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1")
66;;;###autoload 66;;;###autoload
67(define-minor-mode gpm-mouse-mode 67(define-minor-mode gpm-mouse-mode
68 "Toggle gpm-mouse mode to use the mouse in GNU/Linux consoles. 68 "Toggle mouse support in GNU/Linux consoles (GPM Mouse mode).
69With prefix arg, turn gpm-mouse mode on if arg is positive, 69With a prefix argument ARG, enable GPM Mouse mode if ARG is
70otherwise turn it off. 70positive, and disable it otherwise. If called from Lisp, enable
71the mode if ARG is omitted or nil.
71 72
72This allows the use of the mouse when operating on a GNU/Linux console, 73This allows the use of the mouse when operating on a GNU/Linux console,
73in the same way as you can use the mouse under X11. 74in the same way as you can use the mouse under X11.
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 62171328979..cfa406c2b48 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -404,13 +404,19 @@ MODE should be an integer which is a file mode value."
404 (string 404 (string
405 (if (zerop (logand 256 mode)) ?- ?r) 405 (if (zerop (logand 256 mode)) ?- ?r)
406 (if (zerop (logand 128 mode)) ?- ?w) 406 (if (zerop (logand 128 mode)) ?- ?w)
407 (if (zerop (logand 1024 mode)) (if (zerop (logand 64 mode)) ?- ?x) ?s) 407 (if (zerop (logand 2048 mode))
408 (if (zerop (logand 64 mode)) ?- ?x)
409 (if (zerop (logand 64 mode)) ?S ?s))
408 (if (zerop (logand 32 mode)) ?- ?r) 410 (if (zerop (logand 32 mode)) ?- ?r)
409 (if (zerop (logand 16 mode)) ?- ?w) 411 (if (zerop (logand 16 mode)) ?- ?w)
410 (if (zerop (logand 2048 mode)) (if (zerop (logand 8 mode)) ?- ?x) ?s) 412 (if (zerop (logand 1024 mode))
413 (if (zerop (logand 8 mode)) ?- ?x)
414 (if (zerop (logand 8 mode)) ?S ?s))
411 (if (zerop (logand 4 mode)) ?- ?r) 415 (if (zerop (logand 4 mode)) ?- ?r)
412 (if (zerop (logand 2 mode)) ?- ?w) 416 (if (zerop (logand 2 mode)) ?- ?w)
413 (if (zerop (logand 1 mode)) ?- ?x))) 417 (if (zerop (logand 512 mode))
418 (if (zerop (logand 1 mode)) ?- ?x)
419 (if (zerop (logand 1 mode)) ?T ?t))))
414 420
415(defun tar-header-block-summarize (tar-hblock &optional mod-p) 421(defun tar-header-block-summarize (tar-hblock &optional mod-p)
416 "Return a line similar to the output of `tar -vtf'." 422 "Return a line similar to the output of `tar -vtf'."
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index 5d852e52105..e154074a033 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -104,14 +104,17 @@
104 104
105;; Should keypad numbers send ordinary digits or distinct escape sequences? 105;; Should keypad numbers send ordinary digits or distinct escape sequences?
106(define-minor-mode tvi970-set-keypad-mode 106(define-minor-mode tvi970-set-keypad-mode
107 "Set the current mode of the TVI 970 numeric keypad. 107 "Toggle alternate keypad mode on TVI 970 keypad.
108In ``numeric keypad mode'', the number keys on the keypad act as 108With a prefix argument ARG, enable the mode if ARG is positive,
109ordinary digits. In ``alternate keypad mode'', the keys send distinct 109and disable it otherwise. If called from Lisp, enable the mode
110escape sequences, meaning that they can have their own bindings, 110if ARG is omitted or nil.
111
112In ``alternate keypad mode'', the keys send distinct escape
113sequences, meaning that they can have their own bindings,
111independent of the normal number keys. 114independent of the normal number keys.
112With no argument, toggle between the two possible modes. 115
113With a positive argument, select alternate keypad mode. 116When disabled, the terminal enters ``numeric keypad mode'', in
114With a negative argument, select numeric keypad mode." 117which the keypad's keys act as ordinary digits."
115 :variable (terminal-parameter nil 'tvi970-keypad-numeric) 118 :variable (terminal-parameter nil 'tvi970-keypad-numeric)
116 (send-string-to-terminal 119 (send-string-to-terminal
117 (if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>"))) 120 (if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>")))
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el
index 406c20a0e81..ca16f356b20 100644
--- a/lisp/term/vt100.el
+++ b/lisp/term/vt100.el
@@ -42,8 +42,9 @@
42;;; Controlling the screen width. 42;;; Controlling the screen width.
43(define-minor-mode vt100-wide-mode 43(define-minor-mode vt100-wide-mode
44 "Toggle 132/80 column mode for vt100s. 44 "Toggle 132/80 column mode for vt100s.
45With positive argument, switch to 132-column mode. 45With a prefix argument ARG, switch to 132-column mode if ARG is
46With negative argument, switch to 80-column mode." 46positive, and 80-column mode otherwise. If called from Lisp,
47switch to 132-column mode if ARG is omitted or nil."
47 :global t :init-value (= (frame-width) 132) 48 :global t :init-value (= (frame-width) 132)
48 (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) 49 (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
49 (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) 50 (set-frame-width terminal-frame (if vt100-wide-mode 132 80)))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d496298768d..4a57d00d702 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -469,12 +469,14 @@ See also `flyspell-duplicate-distance'."
469;;;###autoload(defvar flyspell-mode nil) 469;;;###autoload(defvar flyspell-mode nil)
470;;;###autoload 470;;;###autoload
471(define-minor-mode flyspell-mode 471(define-minor-mode flyspell-mode
472 "Minor mode performing on-the-fly spelling checking. 472 "Toggle on-the-fly spell checking (Flyspell mode).
473This spawns a single Ispell process and checks each word. 473With a prefix argument ARG, enable Flyspell mode if ARG is
474The default flyspell behavior is to highlight incorrect words. 474positive, and disable it otherwise. If called from Lisp, enable
475With no argument, this command toggles Flyspell mode. 475the mode if ARG is omitted or nil.
476With a prefix argument ARG, turn Flyspell minor mode on if ARG is positive, 476
477otherwise turn it off. 477Flyspell mode is a buffer-local minor mode. When enabled, it
478spawns a single Ispell process and checks each word. The default
479flyspell behavior is to highlight incorrect words.
478 480
479Bindings: 481Bindings:
480\\[ispell-word]: correct words (using Ispell). 482\\[ispell-word]: correct words (using Ispell).
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index b76b0a303df..62f899d1730 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3462,15 +3462,21 @@ available on the net."
3462 3462
3463;;;###autoload 3463;;;###autoload
3464(define-minor-mode ispell-minor-mode 3464(define-minor-mode ispell-minor-mode
3465 "Toggle Ispell minor mode. 3465 "Toggle last-word spell checking (Ispell minor mode).
3466With prefix argument ARG, turn Ispell minor mode on if ARG is positive, 3466With a prefix argument ARG, enable Ispell minor mode if ARG is
3467otherwise turn it off. 3467positive, and disable it otherwise. If called from Lisp, enable
3468the mode if ARG is omitted or nil.
3468 3469
3469In Ispell minor mode, pressing SPC or RET 3470Ispell minor mode is a buffer-local mior mode. When enabled,
3470warns you if the previous word is incorrectly spelled. 3471typing SPC or RET warns you if the previous word is incorrectly
3472spelled.
3471 3473
3472All the buffer-local variables and dictionaries are ignored -- to read 3474All the buffer-local variables and dictionaries are ignored. To
3473them into the running ispell process, type \\[ispell-word] SPC." 3475read them into the running ispell process, type \\[ispell-word]
3476SPC.
3477
3478For spell-checking \"on the fly\", not just after typing SPC or
3479RET, use `flyspell-mode'."
3474 nil " Spell" ispell-minor-keymap) 3480 nil " Spell" ispell-minor-keymap)
3475 3481
3476(defun ispell-minor-check () 3482(defun ispell-minor-check ()
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 8fb0bd85dab..1be78ed293f 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -297,11 +297,17 @@ automatically inserts the matching closing request after point."
297 (forward-char 1)))) 297 (forward-char 1))))
298 298
299(define-minor-mode nroff-electric-mode 299(define-minor-mode nroff-electric-mode
300 "Toggle `nroff-electric-newline' minor mode. 300 "Toggle automatic nroff request pairing (Nroff Electric mode).
301`nroff-electric-newline' forces Emacs to check for an nroff request at the 301With a prefix argument ARG, enable Nroff Electric mode if ARG is
302beginning of the line, and insert the matching closing request if necessary. 302positive, and disable it otherwise. If called from Lisp, enable
303This command toggles that mode (off->on, on->off), with an argument, 303the mode if ARG is omitted or nil.
304turns it on if arg is positive, otherwise off." 304
305Nroff Electric mode is a buffer-local minor mode, for use with
306`nroff-mode'. When enabled, Emacs checks for an nroff request at
307the beginning of the line, and inserts the matching closing
308request if necessary. This command toggles that mode (off->on,
309on->off), with an argument, turns it on if arg is positive,
310otherwise off."
305 :lighter " Electric" 311 :lighter " Electric"
306 (or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode"))) 312 (or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode")))
307 313
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 8fd055f7d87..b47924bc1f2 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -35,19 +35,23 @@
35 35
36(put 'use-hard-newlines 'permanent-local t) 36(put 'use-hard-newlines 'permanent-local t)
37(define-minor-mode use-hard-newlines 37(define-minor-mode use-hard-newlines
38 "Minor mode to distinguish hard and soft newlines. 38 "Toggle distinguishing between hard and soft newlines.
39When active, the functions `newline' and `open-line' add the 39With a prefix argument ARG, enable the feature if ARG is
40positive, and disable it otherwise. If called from Lisp, enable
41it if ARG is omitted or nil.
42
43When enabled, the functions `newline' and `open-line' add the
40text-property `hard' to newlines that they insert, and a line is 44text-property `hard' to newlines that they insert, and a line is
41only considered as a candidate to match `paragraph-start' or 45only considered as a candidate to match `paragraph-start' or
42`paragraph-separate' if it follows a hard newline. 46`paragraph-separate' if it follows a hard newline.
43 47
44Prefix argument says to turn mode on if positive, off if negative. 48When enabling, if there are newlines in the buffer but no hard
45When the mode is turned on, if there are newlines in the buffer but no hard 49newlines, ask the user whether to mark as hard any newlines
46newlines, ask the user whether to mark as hard any newlines preceding a 50preceding a `paragraph-start' line. From a program, second arg
47`paragraph-start' line. From a program, second arg INSERT specifies whether 51INSERT specifies whether to do this; it can be `never' to change
48to do this; it can be `never' to change nothing, t or `always' to force 52nothing, t or `always' to force marking, `guess' to try to do the
49marking, `guess' to try to do the right thing with no questions, nil 53right thing with no questions, nil or anything else to ask the
50or anything else to ask the user. 54user.
51 55
52Newlines not marked hard are called \"soft\", and are always internal 56Newlines not marked hard are called \"soft\", and are always internal
53to paragraphs. The fill functions insert and delete only soft newlines." 57to paragraphs. The fill functions insert and delete only soft newlines."
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el
index 474872955b4..d60b7594c07 100644
--- a/lisp/textmodes/refill.el
+++ b/lisp/textmodes/refill.el
@@ -213,12 +213,17 @@ complex processing.")
213 213
214;;;###autoload 214;;;###autoload
215(define-minor-mode refill-mode 215(define-minor-mode refill-mode
216 "Toggle Refill minor mode. 216 "Toggle automatic refilling (Refill mode).
217With prefix arg, turn Refill mode on if arg is positive, otherwise turn it off. 217With a prefix argument ARG, enable Refill mode if ARG is
218positive, and disable it otherwise. If called from Lisp, enable
219the mode if ARG is omitted or nil.
218 220
219When Refill mode is on, the current paragraph will be formatted when 221Refill mode is a buffer-local minor mode. When enabled, the
220changes are made within it. Self-inserting characters only cause 222current paragraph is refilled as you edit. Self-inserting
221refilling if they would cause auto-filling." 223characters only cause refilling if they would cause
224auto-filling.
225
226For true \"word wrap\" behavior, use `visual-line-mode' instead."
222 :group 'refill 227 :group 'refill
223 :lighter " Refill" 228 :lighter " Refill"
224 :keymap '(("\177" . backward-delete-char-untabify)) 229 :keymap '(("\177" . backward-delete-char-untabify))
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 7e150bff997..6f6993980db 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -503,7 +503,13 @@
503(put 'reftex-mode :menu-tag "RefTeX Mode") 503(put 'reftex-mode :menu-tag "RefTeX Mode")
504;;;###autoload 504;;;###autoload
505(define-minor-mode reftex-mode 505(define-minor-mode reftex-mode
506 "Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX. 506 "Toggle RefTeX mode.
507With a prefix argument ARG, enable RefTeX mode if ARG is
508positive, and disable it otherwise. If called from Lisp, enable
509the mode if ARG is omitted or nil.
510
511RefTeX mode is a buffer-local minor mode with distinct support
512for \\label, \\ref and \\cite in LaTeX.
507 513
508\\<reftex-mode-map>A Table of Contents of the entire (multifile) document with browsing 514\\<reftex-mode-map>A Table of Contents of the entire (multifile) document with browsing
509capabilities is available with `\\[reftex-toc]'. 515capabilities is available with `\\[reftex-toc]'.
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index c1ce950522c..f9fda7e0a74 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -442,11 +442,10 @@ font-locking of blocks.
442 442
443;;;###autoload 443;;;###autoload
444(define-minor-mode rst-minor-mode 444(define-minor-mode rst-minor-mode
445 "ReST Minor Mode. 445 "Toggle ReST minor mode.
446Toggle ReST minor mode. 446With a prefix argument ARG, enable ReST minor mode if ARG is
447With no argument, this command toggles the mode. 447positive, and disable it otherwise. If called from Lisp, enable
448Non-null prefix argument turns on the mode. 448the mode if ARG is omitted or nil.
449Null prefix argument turns off the mode.
450 449
451When ReST minor mode is enabled, the ReST mode keybindings 450When ReST minor mode is enabled, the ReST mode keybindings
452are installed on top of the major mode bindings. Use this 451are installed on top of the major mode bindings. Use this
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 314fbf9671b..be8dd9c9130 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -841,7 +841,14 @@ Return non-nil if we skipped over matched tags."
841 (delete-overlay (pop sgml-electric-tag-pair-overlays)))) 841 (delete-overlay (pop sgml-electric-tag-pair-overlays))))
842 842
843(define-minor-mode sgml-electric-tag-pair-mode 843(define-minor-mode sgml-electric-tag-pair-mode
844 "Automatically update the closing tag when editing the opening one." 844 "Toggle SGML Electric Tag Pair mode.
845With a prefix argument ARG, enable the mode if ARG is positive,
846and disable it otherwise. If called from Lisp, enable the mode
847if ARG is omitted or nil.
848
849SGML Electric Tag Pair mode is a buffer-local minor mode for use
850with `sgml-mode' and related maor modes. When enabled, editing
851an opening markup tag automatically updates the closing tag."
845 :lighter "/e" 852 :lighter "/e"
846 (if sgml-electric-tag-pair-mode 853 (if sgml-electric-tag-pair-mode
847 (progn 854 (progn
@@ -2024,9 +2031,14 @@ The third `match-string' will be the used in the menu.")
2024 (nreverse toc-index))) 2031 (nreverse toc-index)))
2025 2032
2026(define-minor-mode html-autoview-mode 2033(define-minor-mode html-autoview-mode
2027 "Toggle automatic viewing via `browse-url-of-buffer' upon saving buffer. 2034 "Toggle viewing of HTML files on save (HTML Autoview mode).
2028With positive prefix ARG always turns viewing on, with negative ARG always off. 2035With a prefix argument ARG, enable HTML Autoview mode if ARG is
2029Can be used as a value for `html-mode-hook'." 2036positive, and disable it otherwise. If called from Lisp, enable
2037the mode if ARG is omitted or nil.
2038
2039HTML Autoview mode is a buffer-local minor mode for use with
2040`html-mode'. If enabled, saving the file automatically runs
2041`browse-url-of-buffer' to view it."
2030 nil nil nil 2042 nil nil nil
2031 :group 'sgml 2043 :group 'sgml
2032 (if html-autoview-mode 2044 (if html-autoview-mode
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 428fc1db3a9..deb92fc0243 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -677,8 +677,14 @@ An alternative value is \" . \", if you use a font with a narrow period."
677 (put-text-property start end 'latex-env-pair t))) 677 (put-text-property start end 'latex-env-pair t)))
678 678
679(define-minor-mode latex-electric-env-pair-mode 679(define-minor-mode latex-electric-env-pair-mode
680 "Automatically update the \\end arg when editing the \\begin one. 680 "Toggle Latex Electric Env Pair mode.
681And vice-versa." 681With a prefix argument ARG, enable the mode if ARG is positive,
682and disable it otherwise. If called from Lisp, enable it if ARG
683is omitted or nil.
684
685Latex Electric Env Pair mode is a buffer-local minor mode for use
686with `latex-mode'. When enabled, typing a \\begin or \\end tag
687automatically inserts its partner."
682 :lighter "/e" 688 :lighter "/e"
683 (if latex-electric-env-pair-mode 689 (if latex-electric-env-pair-mode
684 (add-hook 'before-change-functions 690 (add-hook 'before-change-functions
diff --git a/lisp/time.el b/lisp/time.el
index f8fea0c64a2..ac4a011bdf8 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -484,14 +484,15 @@ update which can wait for the next redisplay."
484;;;###autoload 484;;;###autoload
485(define-minor-mode display-time-mode 485(define-minor-mode display-time-mode
486 "Toggle display of time, load level, and mail flag in mode lines. 486 "Toggle display of time, load level, and mail flag in mode lines.
487With a numeric arg, enable this display if arg is positive. 487With a prefix argument ARG, enable Display Time mode if ARG is
488 488positive, and disable it otherwise. If called from Lisp, enable
489When this display is enabled, it updates automatically every minute 489it if ARG is omitted or nil.
490\(you can control the number of seconds between updates by 490
491customizing `display-time-interval'). 491When Display Time mode is enabled, it updates every minute (you
492If `display-time-day-and-date' is non-nil, the current day and date 492can control the number of seconds between updates by customizing
493are displayed as well. 493`display-time-interval'). If `display-time-day-and-date' is
494This runs the normal hook `display-time-hook' after each update." 494non-nil, the current day and date are displayed as well. This
495runs the normal hook `display-time-hook' after each update."
495 :global t :group 'display-time 496 :global t :group 'display-time
496 (and display-time-timer (cancel-timer display-time-timer)) 497 (and display-time-timer (cancel-timer display-time-timer))
497 (setq display-time-timer nil) 498 (setq display-time-timer nil)
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 05208abb720..8759e0f77fb 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -43,9 +43,10 @@
43;; Deleting it means invoking this command won't work 43;; Deleting it means invoking this command won't work
44;; when you are on a tty. I hope that won't cause too much trouble -- rms. 44;; when you are on a tty. I hope that won't cause too much trouble -- rms.
45(define-minor-mode tool-bar-mode 45(define-minor-mode tool-bar-mode
46 "Toggle use of the tool bar. 46 "Toggle the tool bar in all graphical frames (Tool Bar mode).
47With a numeric argument, if the argument is positive, turn on the 47With a prefix argument ARG, enable Tool Bar mode if ARG is
48tool bar; otherwise, turn off the tool bar. 48positive, and disable it otherwise. If called from Lisp, enable
49Tool Bar mode if ARG is omitted or nil.
49 50
50See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for 51See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for
51conveniently adding tool bar items." 52conveniently adding tool bar items."
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index bfe53dc71b7..59115122c34 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -39,11 +39,14 @@
39;;; Switching tooltips on/off 39;;; Switching tooltips on/off
40 40
41(define-minor-mode tooltip-mode 41(define-minor-mode tooltip-mode
42 "Toggle Tooltip mode. 42 "Toggle use of graphical tooltips (Tooltip mode).
43With ARG, turn Tooltip mode on if and only if ARG is positive. 43With a prefix argument ARG, enable Tooltip mode if ARG is
44When this minor mode is enabled, Emacs displays help text 44positive, and disable it otherwise. If called from Lisp, enable
45in a pop-up window for buttons and menu items that you put the mouse on. 45it if ARG is omitted or nil.
46\(However, if `tooltip-use-echo-area' is non-nil, this and 46
47When Tooltip mode is enabled, Emacs displays help text in a
48pop-up window for buttons and menu items that you put the mouse
49on. \(However, if `tooltip-use-echo-area' is non-nil, this and
47all pop-up help appears in the echo area.) 50all pop-up help appears in the echo area.)
48 51
49When Tooltip mode is disabled, Emacs displays one line of 52When Tooltip mode is disabled, Emacs displays one line of
diff --git a/lisp/type-break.el b/lisp/type-break.el
index d276e64f6db..da3129ec576 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -431,13 +431,13 @@ problems."
431 type-break-mode) 431 type-break-mode)
432 432
433(define-minor-mode type-break-mode-line-message-mode 433(define-minor-mode type-break-mode-line-message-mode
434 "Enable or disable warnings in the mode line about typing breaks. 434 "Toggle warnings about typing breaks in the mode line.
435With a prefix argument ARG, enable these warnings if ARG is
436positive, and disable them otherwise. If called from Lisp,
437enable them if ARG is omitted or nil.
435 438
436A negative PREFIX argument disables this mode. 439The user may also enable or disable this mode simply by setting
437No argument or any non-negative argument enables it. 440the variable of the same name.
438
439The user may also enable or disable this mode simply by setting the
440variable of the same name.
441 441
442Variables controlling the display of messages in the mode line include: 442Variables controlling the display of messages in the mode line include:
443 443
@@ -448,17 +448,13 @@ Variables controlling the display of messages in the mode line include:
448 :global t) 448 :global t)
449 449
450(define-minor-mode type-break-query-mode 450(define-minor-mode type-break-query-mode
451 "Enable or disable warnings in the mode line about typing breaks. 451 "Toggle typing break queries.
452 452With a prefix argument ARG, enable these queries if ARG is
453When enabled, the user is periodically queried about whether to take a 453positive, and disable them otherwise. If called from Lisp,
454typing break at that moment. The function which does this query is 454enable them if ARG is omitted or nil.
455specified by the variable `type-break-query-function'.
456
457A negative PREFIX argument disables this mode.
458No argument or any non-negative argument enables it.
459 455
460The user may also enable or disable this mode simply by setting the 456The user may also enable or disable this mode simply by setting
461variable of the same name." 457the variable of the same name."
462 :global t) 458 :global t)
463 459
464 460
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index fbc267df44a..1b6890e5252 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,7 @@
12011-10-19 Chong Yidong <cyd@gnu.org>
2
3 * url-handlers.el (url-handler-mode): Doc fix.
4
12011-09-24 Christopher J. White <chris@grierwhite.com> (tiny change) 52011-09-24 Christopher J. White <chris@grierwhite.com> (tiny change)
2 6
3 * url-http.el (url-http-create-request): Avoid adding extra CRLF 7 * url-http.el (url-http-create-request): Avoid adding extra CRLF
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index fef0ef15e95..d5f7eb7dd36 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -100,7 +100,10 @@ particularly bad at this\).")
100 100
101;;;###autoload 101;;;###autoload
102(define-minor-mode url-handler-mode 102(define-minor-mode url-handler-mode
103 "Use URL to handle URL-like file names." 103 "Toggle using `url' library for URL filenames (URL Handler mode).
104With a prefix argument ARG, enable URL Handler mode if ARG is
105positive, and disable it otherwise. If called from Lisp, enable
106the mode if ARG is omitted or nil."
104 :global t :group 'url 107 :global t :group 'url
105 (if (not (boundp 'file-name-handler-alist)) 108 (if (not (boundp 'file-name-handler-alist))
106 ;; Can't be turned ON anyway. 109 ;; Can't be turned ON anyway.
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 392973e08fe..9f0fa584b0d 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -225,9 +225,16 @@ when editing big diffs)."
225 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.") 225 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.")
226 226
227(define-minor-mode diff-auto-refine-mode 227(define-minor-mode diff-auto-refine-mode
228 "Automatically highlight changes in detail as the user visits hunks. 228 "Toggle automatic diff hunk highlighting (Diff Auto Refine mode).
229When transitioning from disabled to enabled, 229With a prefix argument ARG, enable Diff Auto Refine mode if ARG
230try to refine the current hunk, as well." 230is positive, and disable it otherwise. If called from Lisp,
231enable the mode if ARG is omitted or nil.
232
233Diff Auto Refine mode is a buffer-local minor mode used with
234`diff-mode'. When enabled, Emacs automatically highlights
235changes in detail as the user visits hunks. When transitioning
236from disabled to enabled, it tries to refine the current hunk, as
237well."
231 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" 238 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
232 (when diff-auto-refine-mode 239 (when diff-auto-refine-mode
233 (condition-case-no-debug nil (diff-refine-hunk) (error nil)))) 240 (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
@@ -1306,7 +1313,11 @@ a diff with \\[diff-reverse-direction].
1306 1313
1307;;;###autoload 1314;;;###autoload
1308(define-minor-mode diff-minor-mode 1315(define-minor-mode diff-minor-mode
1309 "Minor mode for viewing/editing context diffs. 1316 "Toggle Diff minor mode.
1317With a prefix argument ARG, enable Diff minor mode if ARG is
1318positive, and disable it otherwise. If called from Lisp, enable
1319the mode if ARG is omitted or nil.
1320
1310\\{diff-minor-mode-map}" 1321\\{diff-minor-mode-map}"
1311 :group 'diff-mode :lighter " Diff" 1322 :group 'diff-mode :lighter " Diff"
1312 ;; FIXME: setup font-lock 1323 ;; FIXME: setup font-lock
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 0d904ec85c4..eeaa2cfa927 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1340,11 +1340,9 @@ this variable represents.")
1340 ovr-list)))))))) 1340 ovr-list))))))))
1341 1341
1342 1342
1343(defvar ediff-toggle-read-only-function nil 1343(defvar ediff-toggle-read-only-function 'toggle-read-only
1344 "*Specifies the function to be used to toggle read-only. 1344 "Function to be used to toggle read-only status of the buffer.
1345If nil, Ediff tries to deduce the function from the binding of C-x C-q. 1345If nil, Ediff tries using the command bound to C-x C-q.")
1346Normally, this is the `toggle-read-only' function, but, if version
1347control is used, it could be `vc-toggle-read-only' or `rcs-toggle-read-only'.")
1348 1346
1349(defcustom ediff-make-buffers-readonly-at-startup nil 1347(defcustom ediff-make-buffers-readonly-at-startup nil
1350 "Make all variant buffers read-only when Ediff starts up. 1348 "Make all variant buffers read-only when Ediff starts up.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index ebbe318fc15..c421304442f 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -536,7 +536,7 @@ If you want to abort the commit, simply delete the buffer."
536 (or (= (point-min) (point-max)) 536 (or (= (point-min) (point-max))
537 (save-excursion 537 (save-excursion
538 (goto-char (point-min)) 538 (goto-char (point-min))
539 (while (and (looking-at "^\\(Summary: \\)?$") 539 (while (and (looking-at "^\\([a-zA-Z]+: \\)?$")
540 (zerop (forward-line 1)))) 540 (zerop (forward-line 1))))
541 (eobp)))) 541 (eobp))))
542 542
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 3ab1caf2864..cc28db689e9 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -866,7 +866,7 @@ stream. Standard error output is discarded."
866 (" M " . edited) ;; file text modified 866 (" M " . edited) ;; file text modified
867 (" *" . edited) ;; execute bit changed 867 (" *" . edited) ;; execute bit changed
868 (" M*" . edited) ;; text modified + execute bit changed 868 (" M*" . edited) ;; text modified + execute bit changed
869 ;; FIXME: what about ignored files? 869 ("I " . ignored)
870 (" D " . missing) 870 (" D " . missing)
871 ;; For conflicts, should we list the .THIS/.BASE/.OTHER? 871 ;; For conflicts, should we list the .THIS/.BASE/.OTHER?
872 ("C " . conflict) 872 ("C " . conflict)
@@ -916,7 +916,7 @@ stream. Standard error output is discarded."
916 (push (list new-name 'edited 916 (push (list new-name 'edited
917 (vc-bzr-create-extra-fileinfo old-name)) result))) 917 (vc-bzr-create-extra-fileinfo old-name)) result)))
918 ;; do nothing for non existent files 918 ;; do nothing for non existent files
919 ((eq translated 'not-found)) 919 ((memq translated '(not-found ignored)))
920 (t 920 (t
921 (push (list (file-relative-name 921 (push (list (file-relative-name
922 (buffer-substring-no-properties 922 (buffer-substring-no-properties
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index e7bfd273732..35fa11c2e5e 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -648,22 +648,8 @@ this function."
648 (throw 'found trial)))) 648 (throw 'found trial))))
649 templates)))) 649 templates))))
650 650
651(defun vc-toggle-read-only (&optional verbose) 651(define-obsolete-function-alias
652 "Change read-only status of current buffer, perhaps via version control. 652 'vc-toggle-read-only 'toggle-read-only "24.1")
653
654If the buffer is visiting a file registered with version control,
655throw an error, because this is not a safe or really meaningful operation
656on any version-control system newer than RCS.
657
658Otherwise, just change the read-only flag of the buffer.
659
660If you bind this function to \\[toggle-read-only], then Emacs
661will properly intercept all attempts to toggle the read-only flag
662on version-controlled buffer."
663 (interactive "P")
664 (if (vc-backend buffer-file-name)
665 (error "Toggling the readability of a version controlled file is likely to wreak havoc")
666 (toggle-read-only)))
667 653
668(defun vc-default-make-version-backups-p (backend file) 654(defun vc-default-make-version-backups-p (backend file)
669 "Return non-nil if unmodified versions should be backed up locally. 655 "Return non-nil if unmodified versions should be backed up locally.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index cdc4f155083..909585138fc 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1120,9 +1120,13 @@ merge in the changes into your working copy."
1120 ;; Files have local changes 1120 ;; Files have local changes
1121 ((vc-compatible-state state 'edited) 1121 ((vc-compatible-state state 'edited)
1122 (let ((ready-for-commit files)) 1122 (let ((ready-for-commit files))
1123 ;; If files are edited but read-only, give user a chance to correct 1123 ;; If files are edited but read-only, give user a chance to correct.
1124 (dolist (file files) 1124 (dolist (file files)
1125 (unless (file-writable-p file) 1125 ;; If committing a mix of removed and edited files, the
1126 ;; fileset has state = 'edited. Rather than checking the
1127 ;; state of each individual file in the fileset, it seems
1128 ;; simplest to just check if the file exists. Bug#9781.
1129 (when (and (file-exists-p file) (not (file-writable-p file)))
1126 ;; Make the file+buffer read-write. 1130 ;; Make the file+buffer read-write.
1127 (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) 1131 (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file))
1128 (error "Aborted")) 1132 (error "Aborted"))
diff --git a/lisp/view.el b/lisp/view.el
index 11cbc79449f..ef865007332 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -369,19 +369,24 @@ this argument instead of explicitly setting `view-exit-action'."
369 ;; bindings instead of using the \\[] construction. The reason for this 369 ;; bindings instead of using the \\[] construction. The reason for this
370 ;; is that most commands have more than one key binding. 370 ;; is that most commands have more than one key binding.
371 "Toggle View mode, a minor mode for viewing text but not editing it. 371 "Toggle View mode, a minor mode for viewing text but not editing it.
372With prefix argument ARG, turn View mode on if ARG is positive, otherwise 372With a prefix argument ARG, enable View mode if ARG is positive,
373turn it off. 373and disable it otherwise. If called from Lisp, enable View mode
374if ARG is omitted or nil.
375
376When View mode is enabled, commands that do not change the buffer
377contents are available as usual. Kill commands insert text in
378kill buffers but do not delete. Most other commands beep and
379tell the user that the buffer is read-only.
374 380
375Emacs commands that do not change the buffer contents are available as usual.
376Kill commands insert text in kill buffers but do not delete. Other commands
377\(among them most letters and punctuation) beep and tell that the buffer is
378read-only.
379\\<view-mode-map> 381\\<view-mode-map>
380The following additional commands are provided. Most commands take prefix 382
381arguments. Page commands default to \"page size\" lines which is almost a whole 383The following additional commands are provided. Most commands
382window full, or number of lines set by \\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size]. Half page commands default to 384take prefix arguments. Page commands default to \"page size\"
383and set \"half page size\" lines which initially is half a window full. Search 385lines which is almost a whole window, or number of lines set by
384commands default to a repeat count of one. 386\\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size].
387Half page commands default to and set \"half page size\" lines
388which initially is half a window full. Search commands default
389to a repeat count of one.
385 390
386H, h, ? This message. 391H, h, ? This message.
387Digits provide prefix arguments. 392Digits provide prefix arguments.
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index e0bc74343d2..8dc1996734d 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1064,11 +1064,10 @@ Any other value is treated as nil."
1064 1064
1065;;;###autoload 1065;;;###autoload
1066(define-minor-mode whitespace-mode 1066(define-minor-mode whitespace-mode
1067 "Toggle whitespace minor mode visualization (\"ws\" on modeline). 1067 "Toggle whitespace visualization (Whitespace mode).
1068 1068With a prefix argument ARG, enable Whitespace mode if ARG is
1069If ARG is null, toggle whitespace visualization. 1069positive, and disable it otherwise. If called from Lisp, enable
1070If ARG is a number greater than zero, turn on visualization; 1070the mode if ARG is omitted or nil.
1071otherwise, turn off visualization.
1072 1071
1073See also `whitespace-style', `whitespace-newline' and 1072See also `whitespace-style', `whitespace-newline' and
1074`whitespace-display-mappings'." 1073`whitespace-display-mappings'."
@@ -1088,11 +1087,10 @@ See also `whitespace-style', `whitespace-newline' and
1088 1087
1089;;;###autoload 1088;;;###autoload
1090(define-minor-mode whitespace-newline-mode 1089(define-minor-mode whitespace-newline-mode
1091 "Toggle NEWLINE minor mode visualization (\"nl\" on modeline). 1090 "Toggle newline visualization (Whitespace Newline mode).
1092 1091With a prefix argument ARG, enable Whitespace Newline mode if ARG
1093If ARG is null, toggle NEWLINE visualization. 1092is positive, and disable it otherwise. If called from Lisp,
1094If ARG is a number greater than zero, turn on visualization; 1093enable the mode if ARG is omitted or nil.
1095otherwise, turn off visualization.
1096 1094
1097Use `whitespace-newline-mode' only for NEWLINE visualization 1095Use `whitespace-newline-mode' only for NEWLINE visualization
1098exclusively. For other visualizations, including NEWLINE 1096exclusively. For other visualizations, including NEWLINE
@@ -1116,11 +1114,10 @@ See also `whitespace-newline' and `whitespace-display-mappings'."
1116 1114
1117;;;###autoload 1115;;;###autoload
1118(define-minor-mode global-whitespace-mode 1116(define-minor-mode global-whitespace-mode
1119 "Toggle whitespace global minor mode visualization (\"WS\" on modeline). 1117 "Toggle whitespace visualization globally (Global Whitespace mode).
1120 1118With a prefix argument ARG, enable Global Whitespace mode if ARG
1121If ARG is null, toggle whitespace visualization. 1119is positive, and disable it otherwise. If called from Lisp,
1122If ARG is a number greater than zero, turn on visualization; 1120enable it if ARG is omitted or nil.
1123otherwise, turn off visualization.
1124 1121
1125See also `whitespace-style', `whitespace-newline' and 1122See also `whitespace-style', `whitespace-newline' and
1126`whitespace-display-mappings'." 1123`whitespace-display-mappings'."
@@ -1174,11 +1171,10 @@ See also `whitespace-style', `whitespace-newline' and
1174 1171
1175;;;###autoload 1172;;;###autoload
1176(define-minor-mode global-whitespace-newline-mode 1173(define-minor-mode global-whitespace-newline-mode
1177 "Toggle NEWLINE global minor mode visualization (\"NL\" on modeline). 1174 "Toggle global newline visualization (Global Whitespace Newline mode).
1178 1175With a prefix argument ARG, enable Global Whitespace Newline mode
1179If ARG is null, toggle NEWLINE visualization. 1176if ARG is positive, and disable it otherwise. If called from
1180If ARG is a number greater than zero, turn on visualization; 1177Lisp, enable it if ARG is omitted or nil.
1181otherwise, turn off visualization.
1182 1178
1183Use `global-whitespace-newline-mode' only for NEWLINE 1179Use `global-whitespace-newline-mode' only for NEWLINE
1184visualization exclusively. For other visualizations, including 1180visualization exclusively. For other visualizations, including
diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el
index b765e46b9c6..7ca13baeb53 100644
--- a/lisp/wid-browse.el
+++ b/lisp/wid-browse.el
@@ -270,8 +270,7 @@ VALUE is assumed to be a list of widgets."
270 270
271;;;###autoload 271;;;###autoload
272(define-minor-mode widget-minor-mode 272(define-minor-mode widget-minor-mode
273 "Togle minor mode for traversing widgets. 273 "Minor mode for traversing widgets."
274With arg, turn widget mode on if and only if arg is positive."
275 :lighter " Widget") 274 :lighter " Widget")
276 275
277;;; The End: 276;;; The End:
diff --git a/lisp/window.el b/lisp/window.el
index 4d8b3c92b95..968f47f4f31 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1084,6 +1084,35 @@ regardless of whether that buffer is current or not."
1084 (goto-char pos)) 1084 (goto-char pos))
1085 (set-window-point window pos))) 1085 (set-window-point window pos)))
1086 1086
1087(defun window-at-side-p (&optional window side)
1088 "Return t if WINDOW is at SIDE of its containing frame.
1089WINDOW can be any window and defaults to the selected one. SIDE
1090can be any of the symbols `left', `top', `right' or `bottom'.
1091The default value nil is handled like `bottom'."
1092 (setq window (window-normalize-any-window window))
1093 (let ((edge
1094 (cond
1095 ((eq side 'left) 0)
1096 ((eq side 'top) 1)
1097 ((eq side 'right) 2)
1098 ((memq side '(bottom nil)) 3))))
1099 (= (nth edge (window-edges window))
1100 (nth edge (window-edges (frame-root-window window))))))
1101
1102(defun windows-at-side (&optional frame side)
1103 "Return list of all windows on SIDE of FRAME.
1104FRAME must be a live frame and defaults to the selected frame.
1105SIDE can be any of the symbols `left', `top', `right' or
1106`bottom'. The default value nil is handled like `bottom'."
1107 (setq frame (window-normalize-frame frame))
1108 (let (windows)
1109 (walk-window-tree
1110 (lambda (window)
1111 (when (window-at-side-p window side)
1112 (setq windows (cons window windows))))
1113 frame)
1114 (nreverse windows)))
1115
1087(defun window-in-direction-2 (window posn &optional horizontal) 1116(defun window-in-direction-2 (window posn &optional horizontal)
1088 "Support function for `window-in-direction'." 1117 "Support function for `window-in-direction'."
1089 (if horizontal 1118 (if horizontal
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index eca5f813ca2..09b2a7b88bd 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -199,8 +199,9 @@
199;;;###autoload 199;;;###autoload
200(define-minor-mode xterm-mouse-mode 200(define-minor-mode xterm-mouse-mode
201 "Toggle XTerm mouse mode. 201 "Toggle XTerm mouse mode.
202With prefix arg, turn XTerm mouse mode on if arg is positive, otherwise turn 202With a prefix argument ARG, enable XTerm mouse mode if ARG is
203it off. 203positive, and disable it otherwise. If called from Lisp, enable
204the mode if ARG is omitted or nil.
204 205
205Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. 206Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
206This works in terminal emulators compatible with xterm. It only 207This works in terminal emulators compatible with xterm. It only
diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog
index 9fcad781339..4e8fe399970 100644
--- a/nextstep/ChangeLog
+++ b/nextstep/ChangeLog
@@ -1,3 +1,7 @@
12011-10-19 Jan Djärv <jan.h.d@swipnet.se>
2
3 * INSTALL: Remove XCode part.
4
12011-10-18 Jan Djärv <jan.h.d@swipnet.se> 52011-10-18 Jan Djärv <jan.h.d@swipnet.se>
2 6
3 * Cocoa/Emacs.xcodeproj: 7 * Cocoa/Emacs.xcodeproj:
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index 5bc59c6c6fa..2a3e1631986 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -30,27 +30,6 @@ Installation
30Move nextstep/Emacs.app to any desired install location. 30Move nextstep/Emacs.app to any desired install location.
31 31
32 32
33Xcode
34-----
35
36On OS X Emacs can be built under Xcode. You need to run "configure"
37as described above first. There are two targets: 'temacs' and 'Emacs.app'.
38
39'temacs' will build the undumped emacs executable, and copy it and the
40*.o files to the src directory. These steps are necessary so the next target
41works.
42
43'Emacs.app' uses "Run Script" build phases to assemble the Emacs.app bundle.
44It uses the 'ns-app' target in src/Makefile together with the 'install' target
45in the top level Makefile.
46
47The source files under the temacs target must list "pre-crt0" first
48and "lastfile" last, so that dumping works.
49
50(Note, under GNUstep, you CAN'T use ProjectCenter, since PC cannot work
51with files outside of its project directory.)
52
53
54Distributions and Universal Binaries 33Distributions and Universal Binaries
55------------------------------------ 34------------------------------------
56 35
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 8c2ca056aa1..fb3a168ebfe 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
12011-10-19 Eli Zaretskii <eliz@gnu.org>
2
3 * config.nt (HAVE_TZNAME, HAVE_DECL_TZNAME): Define.
4 (Bug#9794) (Bug#641)
5
12011-09-04 Paul Eggert <eggert@cs.ucla.edu> 62011-09-04 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * config.nt (HAVE_SNPRINTF): New macro. 8 * config.nt (HAVE_SNPRINTF): New macro.
diff --git a/nt/config.nt b/nt/config.nt
index 923143cf13e..7ab89add0fc 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -187,7 +187,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
187 187
188#undef TM_IN_SYS_TIME 188#undef TM_IN_SYS_TIME
189#undef HAVE_TM_ZONE 189#undef HAVE_TM_ZONE
190#undef HAVE_TZNAME 190
191/* Define to 1 if you don't have `tm_zone' but do have the external array
192 `tzname'. */
193#define HAVE_TZNAME 1
194
195/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
196 */
197#define HAVE_DECL_TZNAME 1
191 198
192#undef const 199#undef const
193 200
diff --git a/src/ChangeLog b/src/ChangeLog
index d21e6383764..3f9b5beeab6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,52 @@
12011-10-20 Eli Zaretskii <eliz@gnu.org>
2
3 * dispextern.h (struct bidi_it): New member next_en_type.
4
5 * bidi.c (bidi_line_init): Initialize the next_en_type member.
6 (bidi_resolve_explicit_1): When next_en_pos is valid for the
7 current character, check also for next_en_type being WEAK_EN.
8 (bidi_resolve_weak): Don't enter the expensive loop if the current
9 position is before next_en_pos. Record the bidi type of the first
10 non-ET, non-BN character we find, in addition to its position.
11 (bidi_level_of_next_char): Invalidate next_en_type when
12 next_en_pos is over-stepped.
13
142011-10-20 Paul Eggert <eggert@cs.ucla.edu>
15
16 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
17 * editfns.c: Rewrite current-time-zone so that it invokes
18 the equivalent of (format-time-string "%Z") to get the time zone name.
19 This fixes a bug when the time zone name contains characters that
20 need converting from the system time locale to Emacs internal format.
21 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
22 that patch fixed format-time-string to do the conversion, but
23 I forgot to fix current-time-zone.
24 (format_time_string): New function, containing most of
25 what Fformat_time_string used to contain.
26 (Fformat_time_string): Rewrite in terms of format_time_string.
27 This doesn't change this function's behavior.
28 (current-time-zone): Rewrite to use format_time_string.
29 This fixes the bug reported by Michael Schierl in
30 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
31 Jason Rumney's 2007-06-07 change worked around this bug, but
32 didn't fix it.
33 * systime.h (tzname, timezone): Remove no-longer-used declarations.
34
352011-10-19 Eli Zaretskii <eliz@gnu.org>
36
37 * xdisp.c (start_display): If the character at POS is displayed
38 via a display vector, reset IT->current.dpvec_index to zero.
39 (try_window_reusing_current_matrix): If a line ends in a display
40 vector or the next line starts in a display vector, continue
41 redrawing the window even though the character position of
42 start_row was reached.
43 (Bug#9771, part 2)
44
452011-10-18 Chong Yidong <cyd@gnu.org>
46
47 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
48 with nobreak-char-display too.
49
12011-10-18 Eli Zaretskii <eliz@gnu.org> 502011-10-18 Eli Zaretskii <eliz@gnu.org>
2 51
3 Fix part 3 of bug#9771. 52 Fix part 3 of bug#9771.
diff --git a/src/bidi.c b/src/bidi.c
index 29e3c817318..e688637a408 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -849,6 +849,7 @@ bidi_line_init (struct bidi_it *bidi_it)
849 /* Setting this to zero will force its recomputation the first time 849 /* Setting this to zero will force its recomputation the first time
850 we need it for W5. */ 850 we need it for W5. */
851 bidi_it->next_en_pos = 0; 851 bidi_it->next_en_pos = 0;
852 bidi_it->next_en_type = UNKNOWN_BT;
852 bidi_it->next_for_ws.type = UNKNOWN_BT; 853 bidi_it->next_for_ws.type = UNKNOWN_BT;
853 bidi_set_sor_type (bidi_it, 854 bidi_set_sor_type (bidi_it,
854 (bidi_it->paragraph_dir == R2L ? 1 : 0), 855 (bidi_it->paragraph_dir == R2L ? 1 : 0),
@@ -1437,7 +1438,8 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
1437 } 1438 }
1438 } 1439 }
1439 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */ 1440 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */
1440 || bidi_it->next_en_pos > bidi_it->charpos) 1441 || (bidi_it->next_en_pos > bidi_it->charpos
1442 && bidi_it->next_en_type == WEAK_EN))
1441 type = WEAK_EN; 1443 type = WEAK_EN;
1442 break; 1444 break;
1443 case LRE: /* X3 */ 1445 case LRE: /* X3 */
@@ -1473,7 +1475,8 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
1473 } 1475 }
1474 } 1476 }
1475 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */ 1477 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */
1476 || bidi_it->next_en_pos > bidi_it->charpos) 1478 || (bidi_it->next_en_pos > bidi_it->charpos
1479 && bidi_it->next_en_type == WEAK_EN))
1477 type = WEAK_EN; 1480 type = WEAK_EN;
1478 break; 1481 break;
1479 case PDF: /* X7 */ 1482 case PDF: /* X7 */
@@ -1499,7 +1502,8 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
1499 } 1502 }
1500 } 1503 }
1501 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */ 1504 else if (bidi_it->prev.type_after_w1 == WEAK_EN /* W5/Retaining */
1502 || bidi_it->next_en_pos > bidi_it->charpos) 1505 || (bidi_it->next_en_pos > bidi_it->charpos
1506 && bidi_it->next_en_type == WEAK_EN))
1503 type = WEAK_EN; 1507 type = WEAK_EN;
1504 break; 1508 break;
1505 default: 1509 default:
@@ -1731,10 +1735,15 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
1731 else if (type == WEAK_ET /* W5: ET with EN before or after it */ 1735 else if (type == WEAK_ET /* W5: ET with EN before or after it */
1732 || type == WEAK_BN) /* W5/Retaining */ 1736 || type == WEAK_BN) /* W5/Retaining */
1733 { 1737 {
1734 if (bidi_it->prev.type_after_w1 == WEAK_EN /* ET/BN w/EN before it */ 1738 if (bidi_it->prev.type_after_w1 == WEAK_EN) /* ET/BN w/EN before it */
1735 || bidi_it->next_en_pos > bidi_it->charpos)
1736 type = WEAK_EN; 1739 type = WEAK_EN;
1737 else if (bidi_it->next_en_pos >=0) /* W5: ET/BN with EN after it. */ 1740 else if (bidi_it->next_en_pos > bidi_it->charpos
1741 && bidi_it->next_en_type != WEAK_BN)
1742 {
1743 if (bidi_it->next_en_type == WEAK_EN) /* ET/BN with EN after it */
1744 type = WEAK_EN;
1745 }
1746 else if (bidi_it->next_en_pos >=0)
1738 { 1747 {
1739 EMACS_INT en_pos = bidi_it->charpos + bidi_it->nchars; 1748 EMACS_INT en_pos = bidi_it->charpos + bidi_it->nchars;
1740 const unsigned char *s = (STRINGP (bidi_it->string.lstring) 1749 const unsigned char *s = (STRINGP (bidi_it->string.lstring)
@@ -1763,25 +1772,27 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
1763 en_pos = bidi_it->charpos; 1772 en_pos = bidi_it->charpos;
1764 bidi_copy_it (bidi_it, &saved_it); 1773 bidi_copy_it (bidi_it, &saved_it);
1765 } 1774 }
1775 /* Remember this position, to speed up processing of the
1776 next ETs. */
1777 bidi_it->next_en_pos = en_pos;
1766 if (type_of_next == WEAK_EN) 1778 if (type_of_next == WEAK_EN)
1767 { 1779 {
1768 /* If the last strong character is AL, the EN we've 1780 /* If the last strong character is AL, the EN we've
1769 found will become AN when we get to it (W2). */ 1781 found will become AN when we get to it (W2). */
1770 if (bidi_it->last_strong.type_after_w1 != STRONG_AL) 1782 if (bidi_it->last_strong.type_after_w1 == STRONG_AL)
1771 { 1783 type_of_next = WEAK_AN;
1772 type = WEAK_EN;
1773 /* Remember this EN position, to speed up processing
1774 of the next ETs. */
1775 bidi_it->next_en_pos = en_pos;
1776 }
1777 else if (type == WEAK_BN) 1784 else if (type == WEAK_BN)
1778 type = NEUTRAL_ON; /* W6/Retaining */ 1785 type = NEUTRAL_ON; /* W6/Retaining */
1786 else
1787 type = WEAK_EN;
1779 } 1788 }
1780 else if (type_of_next == NEUTRAL_B) 1789 else if (type_of_next == NEUTRAL_B)
1781 /* Record the fact that there are no more ENs from 1790 /* Record the fact that there are no more ENs from
1782 here to the end of paragraph, to avoid entering the 1791 here to the end of paragraph, to avoid entering the
1783 loop above ever again in this paragraph. */ 1792 loop above ever again in this paragraph. */
1784 bidi_it->next_en_pos = -1; 1793 bidi_it->next_en_pos = -1;
1794 /* Record the type of the character where we ended our search. */
1795 bidi_it->next_en_type = type_of_next;
1785 } 1796 }
1786 } 1797 }
1787 } 1798 }
@@ -2053,7 +2064,10 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
2053 bidi_it->next_for_neutral.type = UNKNOWN_BT; 2064 bidi_it->next_for_neutral.type = UNKNOWN_BT;
2054 if (bidi_it->next_en_pos >= 0 2065 if (bidi_it->next_en_pos >= 0
2055 && bidi_it->charpos >= bidi_it->next_en_pos) 2066 && bidi_it->charpos >= bidi_it->next_en_pos)
2056 bidi_it->next_en_pos = 0; 2067 {
2068 bidi_it->next_en_pos = 0;
2069 bidi_it->next_en_type = UNKNOWN_BT;
2070 }
2057 if (bidi_it->next_for_ws.type != UNKNOWN_BT 2071 if (bidi_it->next_for_ws.type != UNKNOWN_BT
2058 && bidi_it->charpos >= bidi_it->next_for_ws.charpos) 2072 && bidi_it->charpos >= bidi_it->next_for_ws.charpos)
2059 bidi_it->next_for_ws.type = UNKNOWN_BT; 2073 bidi_it->next_for_ws.type = UNKNOWN_BT;
@@ -2179,7 +2193,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
2179 } 2193 }
2180 2194
2181 /* Resolve implicit levels, with a twist: PDFs get the embedding 2195 /* Resolve implicit levels, with a twist: PDFs get the embedding
2182 level of the enbedding they terminate. See below for the 2196 level of the embedding they terminate. See below for the
2183 reason. */ 2197 reason. */
2184 if (bidi_it->orig_type == PDF 2198 if (bidi_it->orig_type == PDF
2185 /* Don't do this if this formatting code didn't change the 2199 /* Don't do this if this formatting code didn't change the
diff --git a/src/dispextern.h b/src/dispextern.h
index bdc5008c94c..40e41923554 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1866,7 +1866,8 @@ struct bidi_it {
1866 struct bidi_saved_info next_for_neutral; /* surrounding characters for... */ 1866 struct bidi_saved_info next_for_neutral; /* surrounding characters for... */
1867 struct bidi_saved_info prev_for_neutral; /* ...resolving neutrals */ 1867 struct bidi_saved_info prev_for_neutral; /* ...resolving neutrals */
1868 struct bidi_saved_info next_for_ws; /* character after sequence of ws */ 1868 struct bidi_saved_info next_for_ws; /* character after sequence of ws */
1869 EMACS_INT next_en_pos; /* position of next EN char for ET */ 1869 EMACS_INT next_en_pos; /* pos. of next char for determining ET type */
1870 bidi_type_t next_en_type; /* type of char at next_en_pos */
1870 EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */ 1871 EMACS_INT ignore_bn_limit; /* position until which to ignore BNs */
1871 bidi_dir_t sor; /* direction of start-of-run in effect */ 1872 bidi_dir_t sor; /* direction of start-of-run in effect */
1872 int scan_dir; /* direction of text scan, 1: forw, -1: back */ 1873 int scan_dir; /* direction of text scan, 1: forw, -1: back */
diff --git a/src/editfns.c b/src/editfns.c
index 5f89391ce22..83cd4bd5535 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -85,6 +85,8 @@ extern Lisp_Object w32_get_internal_run_time (void);
85#endif 85#endif
86 86
87static void time_overflow (void) NO_RETURN; 87static void time_overflow (void) NO_RETURN;
88static Lisp_Object format_time_string (char const *, ptrdiff_t, Lisp_Object,
89 int, time_t *, struct tm **);
88static int tm_diff (struct tm *, struct tm *); 90static int tm_diff (struct tm *, struct tm *);
89static void update_buffer_properties (EMACS_INT, EMACS_INT); 91static void update_buffer_properties (EMACS_INT, EMACS_INT);
90 92
@@ -1700,33 +1702,41 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z".
1700usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */) 1702usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */)
1701 (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal) 1703 (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal)
1702{ 1704{
1703 time_t value; 1705 time_t t;
1706 struct tm *tm;
1707
1708 CHECK_STRING (format_string);
1709 format_string = code_convert_string_norecord (format_string,
1710 Vlocale_coding_system, 1);
1711 return format_time_string (SSDATA (format_string), SBYTES (format_string),
1712 timeval, ! NILP (universal), &t, &tm);
1713}
1714
1715static Lisp_Object
1716format_time_string (char const *format, ptrdiff_t formatlen,
1717 Lisp_Object timeval, int ut, time_t *tval, struct tm **tmp)
1718{
1704 ptrdiff_t size; 1719 ptrdiff_t size;
1705 int usec; 1720 int usec;
1706 int ns; 1721 int ns;
1707 struct tm *tm; 1722 struct tm *tm;
1708 int ut = ! NILP (universal);
1709
1710 CHECK_STRING (format_string);
1711 1723
1712 if (! (lisp_time_argument (timeval, &value, &usec) 1724 if (! (lisp_time_argument (timeval, tval, &usec)
1713 && 0 <= usec && usec < 1000000)) 1725 && 0 <= usec && usec < 1000000))
1714 error ("Invalid time specification"); 1726 error ("Invalid time specification");
1715 ns = usec * 1000; 1727 ns = usec * 1000;
1716 1728
1717 format_string = code_convert_string_norecord (format_string,
1718 Vlocale_coding_system, 1);
1719
1720 /* This is probably enough. */ 1729 /* This is probably enough. */
1721 size = SBYTES (format_string); 1730 size = formatlen;
1722 if (size <= (STRING_BYTES_BOUND - 50) / 6) 1731 if (size <= (STRING_BYTES_BOUND - 50) / 6)
1723 size = size * 6 + 50; 1732 size = size * 6 + 50;
1724 1733
1725 BLOCK_INPUT; 1734 BLOCK_INPUT;
1726 tm = ut ? gmtime (&value) : localtime (&value); 1735 tm = ut ? gmtime (tval) : localtime (tval);
1727 UNBLOCK_INPUT; 1736 UNBLOCK_INPUT;
1728 if (! tm) 1737 if (! tm)
1729 time_overflow (); 1738 time_overflow ();
1739 *tmp = tm;
1730 1740
1731 synchronize_system_time_locale (); 1741 synchronize_system_time_locale ();
1732 1742
@@ -1737,9 +1747,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */)
1737 1747
1738 buf[0] = '\1'; 1748 buf[0] = '\1';
1739 BLOCK_INPUT; 1749 BLOCK_INPUT;
1740 result = emacs_nmemftime (buf, size, SSDATA (format_string), 1750 result = emacs_nmemftime (buf, size, format, formatlen, tm, ut, ns);
1741 SBYTES (format_string),
1742 tm, ut, ns);
1743 UNBLOCK_INPUT; 1751 UNBLOCK_INPUT;
1744 if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) 1752 if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0'))
1745 return code_convert_string_norecord (make_unibyte_string (buf, result), 1753 return code_convert_string_norecord (make_unibyte_string (buf, result),
@@ -1747,9 +1755,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */)
1747 1755
1748 /* If buffer was too small, make it bigger and try again. */ 1756 /* If buffer was too small, make it bigger and try again. */
1749 BLOCK_INPUT; 1757 BLOCK_INPUT;
1750 result = emacs_nmemftime (NULL, (size_t) -1, 1758 result = emacs_nmemftime (NULL, (size_t) -1, format, formatlen,
1751 SSDATA (format_string),
1752 SBYTES (format_string),
1753 tm, ut, ns); 1759 tm, ut, ns);
1754 UNBLOCK_INPUT; 1760 UNBLOCK_INPUT;
1755 if (STRING_BYTES_BOUND <= result) 1761 if (STRING_BYTES_BOUND <= result)
@@ -1994,51 +2000,34 @@ the data it can't find. */)
1994{ 2000{
1995 time_t value; 2001 time_t value;
1996 struct tm *t; 2002 struct tm *t;
1997 struct tm gmt; 2003 struct tm localtm;
1998 2004 struct tm *localt;
1999 if (!lisp_time_argument (specified_time, &value, NULL)) 2005 Lisp_Object zone_offset, zone_name;
2000 t = NULL; 2006
2001 else 2007 zone_offset = Qnil;
2002 { 2008 zone_name = format_time_string ("%Z", sizeof "%Z" - 1, specified_time,
2003 BLOCK_INPUT; 2009 0, &value, &localt);
2004 t = gmtime (&value); 2010 localtm = *localt;
2005 if (t) 2011 BLOCK_INPUT;
2006 { 2012 t = gmtime (&value);
2007 gmt = *t; 2013 UNBLOCK_INPUT;
2008 t = localtime (&value);
2009 }
2010 UNBLOCK_INPUT;
2011 }
2012 2014
2013 if (t) 2015 if (t)
2014 { 2016 {
2015 int offset = tm_diff (t, &gmt); 2017 int offset = tm_diff (&localtm, t);
2016 char *s = 0; 2018 zone_offset = make_number (offset);
2017 char buf[sizeof "+00" + INT_STRLEN_BOUND (int)]; 2019 if (SCHARS (zone_name) == 0)
2018
2019#ifdef HAVE_TM_ZONE
2020 if (t->tm_zone)
2021 s = (char *)t->tm_zone;
2022#else /* not HAVE_TM_ZONE */
2023#ifdef HAVE_TZNAME
2024 if (t->tm_isdst == 0 || t->tm_isdst == 1)
2025 s = tzname[t->tm_isdst];
2026#endif
2027#endif /* not HAVE_TM_ZONE */
2028
2029 if (!s)
2030 { 2020 {
2031 /* No local time zone name is available; use "+-NNNN" instead. */ 2021 /* No local time zone name is available; use "+-NNNN" instead. */
2032 int m = offset / 60; 2022 int m = offset / 60;
2033 int am = offset < 0 ? - m : m; 2023 int am = offset < 0 ? - m : m;
2024 char buf[sizeof "+00" + INT_STRLEN_BOUND (int)];
2034 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); 2025 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60);
2035 s = buf; 2026 zone_name = build_string (buf);
2036 } 2027 }
2037
2038 return Fcons (make_number (offset), Fcons (build_string (s), Qnil));
2039 } 2028 }
2040 else 2029
2041 return Fmake_list (make_number (2), Qnil); 2030 return list2 (zone_offset, zone_name);
2042} 2031}
2043 2032
2044/* This holds the value of `environ' produced by the previous 2033/* This holds the value of `environ' produced by the previous
diff --git a/src/systime.h b/src/systime.h
index bed9ed4aa71..b90372dbe20 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -38,17 +38,6 @@ typedef unsigned long Time;
38# endif 38# endif
39#endif 39#endif
40 40
41#ifdef HAVE_TZNAME
42#ifndef tzname /* For SGI. */
43extern char *tzname[]; /* RS6000 and others want it this way. */
44#endif
45#endif
46
47/* SVr4 doesn't actually declare this in its #include files. */
48#ifdef USG5_4
49extern time_t timezone;
50#endif
51
52/* On some configurations (hpux8.0, X11R4), sys/time.h and X11/Xos.h 41/* On some configurations (hpux8.0, X11R4), sys/time.h and X11/Xos.h
53 disagree about the name of the guard symbol. */ 42 disagree about the name of the guard symbol. */
54#ifdef HPUX 43#ifdef HPUX
diff --git a/src/xdisp.c b/src/xdisp.c
index 1f4c98f8388..e0b36dbe100 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2856,6 +2856,13 @@ start_display (struct it *it, struct window *w, struct text_pos pos)
2856 2856
2857 it->continuation_lines_width += it->current_x; 2857 it->continuation_lines_width += it->current_x;
2858 } 2858 }
2859 /* If the character at POS is displayed via a display
2860 vector, move_it_to above stops at the final glyph of
2861 IT->dpvec. To make the caller redisplay that character
2862 again (a.k.a. start at POS), we need to reset the
2863 dpvec_index to the beginning of IT->dpvec. */
2864 else if (it->current.dpvec_index >= 0)
2865 it->current.dpvec_index = 0;
2859 2866
2860 /* We're starting a new display line, not affected by the 2867 /* We're starting a new display line, not affected by the
2861 height of the continued line, so clear the appropriate 2868 height of the continued line, so clear the appropriate
@@ -6409,8 +6416,8 @@ get_next_display_element (struct it *it)
6409 { 6416 {
6410 Lisp_Object dv; 6417 Lisp_Object dv;
6411 struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte); 6418 struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte);
6412 enum { char_is_other = 0, char_is_nbsp, char_is_soft_hyphen } 6419 int nonascii_space_p = 0;
6413 nbsp_or_shy = char_is_other; 6420 int nonascii_hyphen_p = 0;
6414 int c = it->c; /* This is the character to display. */ 6421 int c = it->c; /* This is the character to display. */
6415 6422
6416 if (! it->multibyte_p && ! ASCII_CHAR_P (c)) 6423 if (! it->multibyte_p && ! ASCII_CHAR_P (c))
@@ -6462,10 +6469,15 @@ get_next_display_element (struct it *it)
6462 goto get_next; 6469 goto get_next;
6463 } 6470 }
6464 6471
6472 /* If `nobreak-char-display' is non-nil, we display
6473 non-ASCII spaces and hyphens specially. */
6465 if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display)) 6474 if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display))
6466 nbsp_or_shy = (c == 0xA0 ? char_is_nbsp 6475 {
6467 : c == 0xAD ? char_is_soft_hyphen 6476 if (c == 0xA0)
6468 : char_is_other); 6477 nonascii_space_p = 1;
6478 else if (c == 0xAD || c == 0x2010 || c == 0x2011)
6479 nonascii_hyphen_p = 1;
6480 }
6469 6481
6470 /* Translate control characters into `\003' or `^C' form. 6482 /* Translate control characters into `\003' or `^C' form.
6471 Control characters coming from a display table entry are 6483 Control characters coming from a display table entry are
@@ -6473,7 +6485,8 @@ get_next_display_element (struct it *it)
6473 the translation. This could easily be changed but I 6485 the translation. This could easily be changed but I
6474 don't believe that it is worth doing. 6486 don't believe that it is worth doing.
6475 6487
6476 NBSP and SOFT-HYPEN are property translated too. 6488 The characters handled by `nobreak-char-display' must be
6489 translated too.
6477 6490
6478 Non-printable characters and raw-byte characters are also 6491 Non-printable characters and raw-byte characters are also
6479 translated to octal form. */ 6492 translated to octal form. */
@@ -6484,14 +6497,15 @@ get_next_display_element (struct it *it)
6484 && it->glyph_row 6497 && it->glyph_row
6485 && (it->glyph_row->mode_line_p || it->avoid_cursor_p)) 6498 && (it->glyph_row->mode_line_p || it->avoid_cursor_p))
6486 || (c != '\n' && c != '\t')) 6499 || (c != '\n' && c != '\t'))
6487 : (nbsp_or_shy 6500 : (nonascii_space_p
6501 || nonascii_hyphen_p
6488 || CHAR_BYTE8_P (c) 6502 || CHAR_BYTE8_P (c)
6489 || ! CHAR_PRINTABLE_P (c)))) 6503 || ! CHAR_PRINTABLE_P (c))))
6490 { 6504 {
6491 /* C is a control character, NBSP, SOFT-HYPEN, raw-byte, 6505 /* C is a control character, non-ASCII space/hyphen,
6492 or a non-printable character which must be displayed 6506 raw-byte, or a non-printable character which must be
6493 either as '\003' or as `^C' where the '\\' and '^' 6507 displayed either as '\003' or as `^C' where the '\\'
6494 can be defined in the display table. Fill 6508 and '^' can be defined in the display table. Fill
6495 IT->ctl_chars with glyphs for what we have to 6509 IT->ctl_chars with glyphs for what we have to
6496 display. Then, set IT->dpvec to these glyphs. */ 6510 display. Then, set IT->dpvec to these glyphs. */
6497 Lisp_Object gc; 6511 Lisp_Object gc;
@@ -6540,17 +6554,14 @@ get_next_display_element (struct it *it)
6540 goto display_control; 6554 goto display_control;
6541 } 6555 }
6542 6556
6543 /* Handle non-break space in the mode where it only gets 6557 /* Handle non-ascii space in the mode where it only gets
6544 highlighting. */ 6558 highlighting. */
6545 6559
6546 if (EQ (Vnobreak_char_display, Qt) 6560 if (nonascii_space_p && EQ (Vnobreak_char_display, Qt))
6547 && nbsp_or_shy == char_is_nbsp)
6548 { 6561 {
6549 /* Merge the no-break-space face into the current face. */ 6562 /* Merge `nobreak-space' into the current face. */
6550 face_id = merge_faces (it->f, Qnobreak_space, 0, 6563 face_id = merge_faces (it->f, Qnobreak_space, 0,
6551 it->face_id); 6564 it->face_id);
6552
6553 c = ' ';
6554 XSETINT (it->ctl_chars[0], ' '); 6565 XSETINT (it->ctl_chars[0], ' ');
6555 ctl_len = 1; 6566 ctl_len = 1;
6556 goto display_control; 6567 goto display_control;
@@ -6590,25 +6601,21 @@ get_next_display_element (struct it *it)
6590 last_escape_glyph_merged_face_id = face_id; 6601 last_escape_glyph_merged_face_id = face_id;
6591 } 6602 }
6592 6603
6593 /* Handle soft hyphens in the mode where they only get 6604 /* Draw non-ASCII hyphen with just highlighting: */
6594 highlighting. */
6595 6605
6596 if (EQ (Vnobreak_char_display, Qt) 6606 if (nonascii_hyphen_p && EQ (Vnobreak_char_display, Qt))
6597 && nbsp_or_shy == char_is_soft_hyphen)
6598 { 6607 {
6599 XSETINT (it->ctl_chars[0], '-'); 6608 XSETINT (it->ctl_chars[0], '-');
6600 ctl_len = 1; 6609 ctl_len = 1;
6601 goto display_control; 6610 goto display_control;
6602 } 6611 }
6603 6612
6604 /* Handle non-break space and soft hyphen 6613 /* Draw non-ASCII space/hyphen with escape glyph: */
6605 with the escape glyph. */
6606 6614
6607 if (nbsp_or_shy) 6615 if (nonascii_space_p || nonascii_hyphen_p)
6608 { 6616 {
6609 XSETINT (it->ctl_chars[0], escape_glyph); 6617 XSETINT (it->ctl_chars[0], escape_glyph);
6610 c = (nbsp_or_shy == char_is_nbsp ? ' ' : '-'); 6618 XSETINT (it->ctl_chars[1], nonascii_space_p ? ' ' : '-');
6611 XSETINT (it->ctl_chars[1], c);
6612 ctl_len = 2; 6619 ctl_len = 2;
6613 goto display_control; 6620 goto display_control;
6614 } 6621 }
@@ -16146,13 +16153,20 @@ try_window_reusing_current_matrix (struct window *w)
16146 16153
16147 start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); 16154 start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix);
16148 } 16155 }
16149 /* If we have reached alignment, 16156 /* If we have reached alignment, we can copy the rest of the
16150 we can copy the rest of the rows. */ 16157 rows. */
16151 if (IT_CHARPOS (it) == CHARPOS (start)) 16158 if (IT_CHARPOS (it) == CHARPOS (start)
16159 /* Don't accept "alignment" inside a display vector,
16160 since start_row could have started in the middle of
16161 that same display vector (thus their character
16162 positions match), and we have no way of telling if
16163 that is the case. */
16164 && it.current.dpvec_index < 0)
16152 break; 16165 break;
16153 16166
16154 if (display_line (&it)) 16167 if (display_line (&it))
16155 last_text_row = it.glyph_row - 1; 16168 last_text_row = it.glyph_row - 1;
16169
16156 } 16170 }
16157 16171
16158 /* A value of current_y < last_visible_y means that we stopped 16172 /* A value of current_y < last_visible_y means that we stopped
@@ -28239,12 +28253,18 @@ The face used for trailing whitespace is `trailing-whitespace'. */);
28239 Vshow_trailing_whitespace = Qnil; 28253 Vshow_trailing_whitespace = Qnil;
28240 28254
28241 DEFVAR_LISP ("nobreak-char-display", Vnobreak_char_display, 28255 DEFVAR_LISP ("nobreak-char-display", Vnobreak_char_display,
28242 doc: /* *Control highlighting of nobreak space and soft hyphen. 28256 doc: /* Control highlighting of non-ASCII space and hyphen chars.
28243A value of t means highlight the character itself (for nobreak space, 28257If the value is t, Emacs highlights non-ASCII chars which have the
28244use face `nobreak-space'). 28258same appearance as an ASCII space or hyphen, using the `nobreak-space'
28245A value of nil means no highlighting. 28259or `escape-glyph' face respectively.
28246Other values mean display the escape glyph followed by an ordinary 28260
28247space or ordinary hyphen. */); 28261U+00A0 (no-break space), U+00AD (soft hyphen), U+2010 (hyphen), and
28262U+2011 (non-breaking hyphen) are affected.
28263
28264Any other non-nil value means to display these characters as a escape
28265glyph followed by an ordinary space or hyphen.
28266
28267A value of nil means no special handling of these characters. */);
28248 Vnobreak_char_display = Qt; 28268 Vnobreak_char_display = Qt;
28249 28269
28250 DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer, 28270 DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer,
diff --git a/test/ChangeLog b/test/ChangeLog
index ea6d90b534c..396273bab37 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
12011-10-20 Glenn Morris <rgm@gnu.org>
2
3 * automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
4
5 * automated/vc-bzr.el: New file.
6
12011-10-15 Glenn Morris <rgm@gnu.org> 72011-10-15 Glenn Morris <rgm@gnu.org>
2 8
3 * automated/f90.el: New file. 9 * automated/f90.el: New file.
diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el
new file mode 100644
index 00000000000..b2cbda4d669
--- /dev/null
+++ b/test/automated/vc-bzr.el
@@ -0,0 +1,101 @@
1;;; vc-bzr.el --- tests for vc/vc-bzr.el
2
3;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5;; Author: Glenn Morris <rgm@gnu.org>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;;; Code:
25
26(require 'ert)
27(require 'vc-bzr)
28(require 'vc-dir)
29
30;; FIXME it would be better to skip all these tests if there is no
31;; bzr installed. We could just put everything inside an IF
32;; statement, but it would be nice if ERT had a "skipped" facility (?).
33
34(ert-deftest vc-bzr-test-bug9726 ()
35 "Test for http://debbugs.gnu.org/9726 ."
36 :expected-result (if (executable-find vc-bzr-program) :passed :failed)
37 (should (executable-find vc-bzr-program))
38 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
39 (ignored-dir (expand-file-name "ignored-dir" tempdir))
40 (default-directory (file-name-as-directory tempdir)))
41 (unwind-protect
42 (progn
43 (make-directory ignored-dir)
44 (with-temp-buffer
45 (insert (file-name-nondirectory ignored-dir))
46 (write-region nil nil (expand-file-name ".bzrignore" tempdir)
47 nil 'silent))
48 (call-process vc-bzr-program nil nil nil "init")
49 (call-process vc-bzr-program nil nil nil "add")
50 (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1")
51 (with-temp-buffer
52 (insert "unregistered file")
53 (write-region nil nil (expand-file-name "testfile2" ignored-dir)
54 nil 'silent))
55 (vc-dir ignored-dir)
56 (while (vc-dir-busy)
57 (sit-for 0.1))
58 ;; FIXME better to explicitly test for error from process sentinel.
59 (with-current-buffer "*vc-dir*"
60 (goto-char (point-min))
61 (should (search-forward "unregistered" nil t))))
62 (delete-directory tempdir t))))
63
64;; Not specific to bzr.
65(ert-deftest vc-bzr-test-bug9781 ()
66 "Test for http://debbugs.gnu.org/9781 ."
67 :expected-result (if (executable-find vc-bzr-program) :passed :failed)
68 (should (executable-find vc-bzr-program))
69 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
70 (subdir (expand-file-name "subdir" tempdir))
71 (file (expand-file-name "file" tempdir))
72 (default-directory (file-name-as-directory tempdir)))
73 (unwind-protect
74 (progn
75 (call-process vc-bzr-program nil nil nil "init")
76 (make-directory subdir)
77 (with-temp-buffer
78 (insert "text")
79 (write-region nil nil file nil 'silent)
80 (write-region nil nil (expand-file-name "subfile" subdir)
81 nil 'silent))
82 (call-process vc-bzr-program nil nil nil "add")
83 (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1")
84 (call-process vc-bzr-program nil nil nil "remove" subdir)
85 (with-temp-buffer
86 (insert "different text")
87 (write-region nil nil file nil 'silent))
88 (vc-dir tempdir)
89 (while (vc-dir-busy)
90 (sit-for 0.1))
91 (vc-dir-mark-all-files t)
92 (let ((f (symbol-function 'y-or-n-p)))
93 (unwind-protect
94 (progn
95 (fset 'y-or-n-p (lambda (prompt) t))
96 (vc-next-action nil))
97 (fset 'y-or-n-p f)))
98 (should (get-buffer "*vc-log*")))
99 (delete-directory tempdir t))))
100
101;;; vc-bzr.el ends here