aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/ChangeLog14
-rw-r--r--doc/lispref/os.texi169
-rw-r--r--doc/lispref/processes.texi4
-rw-r--r--doc/lispref/searching.texi41
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/startup.el4
-rw-r--r--src/ChangeLog5
-rw-r--r--src/search.c9
8 files changed, 135 insertions, 115 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d80732833e8..a326117cdce 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,17 @@
12012-03-27 Glenn Morris <rgm@gnu.org>
2
3 * searching.texi (String Search): Add xref to Emacs manual.
4 Copyedits. Mention the function word-search-regexp.
5 (Searching and Case): Add xref to Emacs manual. Copyedits.
6
7 * processes.texi (Network Servers): Standardize apostrophe usage.
8
9 * os.texi (System Environment): Copyedits. Remove some examples
10 that do not seem useful. Mention setenv third arg.
11 tty-erase-char does not seem to be nil under a window-system.
12 (User Identification): Copyedits.
13 Remove some examples that do not seem useful.
14
12012-03-26 Glenn Morris <rgm@gnu.org> 152012-03-26 Glenn Morris <rgm@gnu.org>
2 16
3 * os.texi (Startup Summary): Copyedits. Fix startup screen logic. 17 * os.texi (Startup Summary): Copyedits. Fix startup screen logic.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 7e4cfc0e31f..ebf2a35925a 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -833,15 +833,15 @@ system, the user's @acronym{UID}, and so on.
833 833
834@defvar system-configuration 834@defvar system-configuration
835This variable holds the standard GNU configuration name for the 835This variable holds the standard GNU configuration name for the
836hardware/software configuration of your system, as a string. The 836hardware/software configuration of your system, as a string. For
837convenient way to test parts of this string is with 837example, a typical value for a 64-bit GNU/Linux system is
838@code{string-match}. 838@samp{"x86_64-unknown-linux-gnu"}.
839@end defvar 839@end defvar
840 840
841@cindex system type and name 841@cindex system type and name
842@defvar system-type 842@defvar system-type
843The value of this variable is a symbol indicating the type of operating 843The value of this variable is a symbol indicating the type of operating
844system Emacs is operating on. Here is a table of the possible values: 844system Emacs is running on. The possible values are:
845 845
846@table @code 846@table @code
847@item aix 847@item aix
@@ -861,7 +861,7 @@ The GNU system (using the GNU kernel, which consists of the HURD and Mach).
861 861
862@item gnu/linux 862@item gnu/linux
863A GNU/Linux system---that is, a variant GNU system, using the Linux 863A GNU/Linux system---that is, a variant GNU system, using the Linux
864kernel. (These systems are the ones people often call ``Linux,'' but 864kernel. (These systems are the ones people often call ``Linux'', but
865actually Linux is just the kernel, not the whole system.) 865actually Linux is just the kernel, not the whole system.)
866 866
867@item gnu/kfreebsd 867@item gnu/kfreebsd
@@ -874,33 +874,28 @@ Hewlett-Packard HPUX operating system.
874Silicon Graphics Irix system. 874Silicon Graphics Irix system.
875 875
876@item ms-dos 876@item ms-dos
877Microsoft MS-DOS ``operating system.'' Emacs compiled with DJGPP for 877Microsoft's DOS. Emacs compiled with DJGPP for MS-DOS binds
878MS-DOS binds @code{system-type} to @code{ms-dos} even when you run it on 878@code{system-type} to @code{ms-dos} even when you run it on MS-Windows.
879MS-Windows.
880 879
881@item usg-unix-v 880@item usg-unix-v
882AT&T Unix System V. 881AT&T Unix System V.
883 882
884@item windows-nt 883@item windows-nt
885Microsoft Windows NT and later. The same executable supports Windows 884Microsoft Windows NT, 9X and later. The value of @code{system-type}
8869X, but the value of @code{system-type} is @code{windows-nt} in either 885is always @code{windows-nt}, e.g. even on Windows 7.
887case.
888 886
889@end table 887@end table
890 888
891We do not wish to add new symbols to make finer distinctions unless it 889We do not wish to add new symbols to make finer distinctions unless it
892is absolutely necessary! In fact, we hope to eliminate some of these 890is absolutely necessary! In fact, we hope to eliminate some of these
893alternatives in the future. We recommend using 891alternatives in the future. If you need to make a finer distinction
894@code{system-configuration} to distinguish between different operating 892than @code{system-type} allows for, you can test
895systems. 893@code{system-configuration}, e.g. against a regexp.
896@end defvar 894@end defvar
897 895
898@defun system-name 896@defun system-name
899This function returns the name of the machine you are running on. 897This function returns the name of the machine you are running on, as a
900@example 898string.
901(system-name)
902 @result{} "www.gnu.org"
903@end example
904@end defun 899@end defun
905 900
906 The symbol @code{system-name} is a variable as well as a function. In 901 The symbol @code{system-name} is a variable as well as a function. In
@@ -910,6 +905,7 @@ fact, the function returns whatever value the variable
910system. The variable is also useful for constructing frame titles 905system. The variable is also useful for constructing frame titles
911(@pxref{Frame Titles}). 906(@pxref{Frame Titles}).
912 907
908@c FIXME seems like this section is not the best place for this option?
913@defopt mail-host-address 909@defopt mail-host-address
914If this variable is non-@code{nil}, it is used instead of 910If this variable is non-@code{nil}, it is used instead of
915@code{system-name} for purposes of generating email addresses. For 911@code{system-name} for purposes of generating email addresses. For
@@ -917,37 +913,43 @@ example, it is used when constructing the default value of
917@code{user-mail-address}. @xref{User Identification}. (Since this is 913@code{user-mail-address}. @xref{User Identification}. (Since this is
918done when Emacs starts up, the value actually used is the one saved when 914done when Emacs starts up, the value actually used is the one saved when
919Emacs was dumped. @xref{Building Emacs}.) 915Emacs was dumped. @xref{Building Emacs}.)
916@c FIXME sounds like should probably give this a :set-after and some
917@c custom-initialize-delay voodoo.
920@end defopt 918@end defopt
921 919
922@deffn Command getenv var &optional frame 920@deffn Command getenv var &optional frame
923@cindex environment variable access 921@cindex environment variable access
924This function returns the value of the environment variable @var{var}, 922This function returns the value of the environment variable @var{var},
925as a string. @var{var} should be a string. If @var{var} is undefined 923as a string. @var{var} should be a string. If @var{var} is undefined
926in the environment, @code{getenv} returns @code{nil}. If returns 924in the environment, @code{getenv} returns @code{nil}. It returns
927@samp{""} if @var{var} is set but null. Within Emacs, the environment 925@samp{""} if @var{var} is set but null. Within Emacs, a list of environment
928variable values are kept in the Lisp variable @code{process-environment}. 926variables and their values is kept in the variable @code{process-environment}.
929 927
930@example 928@example
931@group 929@group
932(getenv "USER") 930(getenv "USER")
933 @result{} "lewis" 931 @result{} "lewis"
934@end group 932@end group
933@end example
934
935The shell command @code{printenv} prints all or part of the environment:
935 936
937@example
936@group 938@group
937lewis@@slug[10] % printenv 939bash$ printenv
938PATH=.:/user/lewis/bin:/usr/bin:/usr/local/bin 940PATH=/usr/local/bin:/usr/bin:/bin
939USER=lewis 941USER=lewis
940@end group 942@end group
941@group 943@group
942TERM=ibmapa16 944TERM=xterm
943SHELL=/bin/csh 945SHELL=/bin/bash
944HOME=/user/lewis 946HOME=/home/lewis
945@end group 947@end group
948@dots{}
946@end example 949@end example
947@end deffn 950@end deffn
948 951
949@c Emacs 19 feature 952@deffn Command setenv variable &optional value substitute
950@deffn Command setenv variable &optional value
951This command sets the value of the environment variable named 953This command sets the value of the environment variable named
952@var{variable} to @var{value}. @var{variable} should be a string. 954@var{variable} to @var{value}. @var{variable} should be a string.
953Internally, Emacs Lisp can handle any string. However, normally 955Internally, Emacs Lisp can handle any string. However, normally
@@ -955,8 +957,13 @@ Internally, Emacs Lisp can handle any string. However, normally
955of letters, digits and underscores, starting with a letter or 957of letters, digits and underscores, starting with a letter or
956underscore. Otherwise, errors may occur if subprocesses of Emacs try 958underscore. Otherwise, errors may occur if subprocesses of Emacs try
957to access the value of @var{variable}. If @var{value} is omitted or 959to access the value of @var{variable}. If @var{value} is omitted or
958@code{nil}, @code{setenv} removes @var{variable} from the environment. 960@code{nil} (or, interactively, with a prefix argument), @code{setenv}
959Otherwise, @var{value} should be a string. 961removes @var{variable} from the environment. Otherwise, @var{value}
962should be a string.
963
964If the optional argument @var{substitute} is non-@code{nil}, Emacs
965calls the function @code{substitute-env-vars} to expand any
966environment variables in @var{value}.
960 967
961@code{setenv} works by modifying @code{process-environment}; binding 968@code{setenv} works by modifying @code{process-environment}; binding
962that variable with @code{let} is also reasonable practice. 969that variable with @code{let} is also reasonable practice.
@@ -973,14 +980,14 @@ of this variable.
973@smallexample 980@smallexample
974@group 981@group
975process-environment 982process-environment
976@result{} ("l=/usr/stanford/lib/gnuemacs/lisp" 983@result{} ("PATH=/usr/local/bin:/usr/bin:/bin"
977 "PATH=.:/user/lewis/bin:/usr/class:/nfsusr/local/bin"
978 "USER=lewis" 984 "USER=lewis"
979@end group 985@end group
980@group 986@group
981 "TERM=ibmapa16" 987 "TERM=xterm"
982 "SHELL=/bin/csh" 988 "SHELL=/bin/bash"
983 "HOME=/user/lewis") 989 "HOME=/home/lewis"
990 @dots{})
984@end group 991@end group
985@end smallexample 992@end smallexample
986 993
@@ -991,23 +998,21 @@ specifies the variable, and the other ``duplicates'' are ignored.
991 998
992@defvar initial-environment 999@defvar initial-environment
993This variable holds the list of environment variables Emacs inherited 1000This variable holds the list of environment variables Emacs inherited
994from its parent process. It is computed during startup, see 1001from its parent process when Emacs started.
995@ref{Startup Summary}.
996@end defvar 1002@end defvar
997 1003
998@defvar path-separator 1004@defvar path-separator
999This variable holds a string which says which character separates 1005This variable holds a string that says which character separates
1000directories in a search path (as found in an environment variable). Its 1006directories in a search path (as found in an environment variable). Its
1001value is @code{":"} for Unix and GNU systems, and @code{";"} for MS-DOS 1007value is @code{":"} for Unix and GNU systems, and @code{";"} for MS systems.
1002and MS-Windows.
1003@end defvar 1008@end defvar
1004 1009
1005@defun parse-colon-path path 1010@defun parse-colon-path path
1006This function takes a search path string such as would be the value of 1011This function takes a search path string such as the value of
1007the @code{PATH} environment variable, and splits it at the separators, 1012the @code{PATH} environment variable, and splits it at the separators,
1008returning a list of directory names. @code{nil} in this list stands for 1013returning a list of directory names. @code{nil} in this list means
1009``use the current directory.'' Although the function's name says 1014the current directory. Although the function's name says
1010``colon,'' it actually uses the value of @code{path-separator}. 1015``colon'', it actually uses the value of @code{path-separator}.
1011 1016
1012@example 1017@example
1013(parse-colon-path ":/foo:/bar") 1018(parse-colon-path ":/foo:/bar")
@@ -1022,30 +1027,32 @@ value is a string, and does not include a directory name.
1022 1027
1023@defvar invocation-directory 1028@defvar invocation-directory
1024This variable holds the directory from which the Emacs executable was 1029This variable holds the directory from which the Emacs executable was
1025invoked, or perhaps @code{nil} if that directory cannot be determined. 1030invoked, or @code{nil} if that directory cannot be determined.
1026@end defvar 1031@end defvar
1027 1032
1028@defvar installation-directory 1033@defvar installation-directory
1029If non-@code{nil}, this is a directory within which to look for the 1034If non-@code{nil}, this is a directory within which to look for the
1030@file{lib-src} and @file{etc} subdirectories. This is non-@code{nil} 1035@file{lib-src} and @file{etc} subdirectories. In an installed Emacs,
1036it is normally @code{nil}. It is non-@code{nil}
1031when Emacs can't find those directories in their standard installed 1037when Emacs can't find those directories in their standard installed
1032locations, but can find them in a directory related somehow to the one 1038locations, but can find them in a directory related somehow to the one
1033containing the Emacs executable. 1039containing the Emacs executable (i.e., @code{invocation-directory}).
1034@end defvar 1040@end defvar
1035 1041
1036@defun load-average &optional use-float 1042@defun load-average &optional use-float
1037This function returns the current 1-minute, 5-minute, and 15-minute load 1043This function returns the current 1-minute, 5-minute, and 15-minute
1038averages, in a list. 1044system load averages, in a list. The load average indicates the
1045number of processes trying to run on the system.
1039 1046
1040By default, the values are integers that are 100 times the system load 1047By default, the values are integers that are 100 times the system load
1041averages, which indicate the average number of processes trying to run. 1048averages, but if @var{use-float} is non-@code{nil}, then they are
1042If @var{use-float} is non-@code{nil}, then they are returned 1049returned as floating point numbers without multiplying by 100.
1043as floating point numbers and without multiplying by 100.
1044 1050
1045If it is impossible to obtain the load average, this function signals 1051If it is impossible to obtain the load average, this function signals
1046an error. On some platforms, access to load averages requires 1052an error. On some platforms, access to load averages requires
1047installing Emacs as setuid or setgid so that it can read kernel 1053installing Emacs as setuid or setgid so that it can read kernel
1048information, and that usually isn't advisable. 1054information, and that usually isn't advisable.
1055@c FIXME which platforms are these? Are they still relevant?
1049 1056
1050If the 1-minute load average is available, but the 5- or 15-minute 1057If the 1-minute load average is available, but the 5- or 15-minute
1051averages are not, this function returns a shortened list containing 1058averages are not, this function returns a shortened list containing
@@ -1060,13 +1067,9 @@ the available averages.
1060(load-average t) 1067(load-average t)
1061 @result{} (1.69 0.48 0.36) 1068 @result{} (1.69 0.48 0.36)
1062@end group 1069@end group
1063
1064@group
1065lewis@@rocky[5] % uptime
1066 11:55am up 1 day, 19:37, 3 users,
1067 load average: 1.69, 0.48, 0.36
1068@end group
1069@end example 1070@end example
1071
1072The shell command @code{uptime} returns similar information.
1070@end defun 1073@end defun
1071 1074
1072@defun emacs-pid 1075@defun emacs-pid
@@ -1077,7 +1080,8 @@ as an integer.
1077@defvar tty-erase-char 1080@defvar tty-erase-char
1078This variable holds the erase character that was selected 1081This variable holds the erase character that was selected
1079in the system's terminal driver, before Emacs was started. 1082in the system's terminal driver, before Emacs was started.
1080The value is @code{nil} if Emacs is running under a window system. 1083@c FIXME? Seems untrue since 23.1. For me, it is 0.
1084@c The value is @code{nil} if Emacs is running under a window system.
1081@end defvar 1085@end defvar
1082 1086
1083@node User Identification 1087@node User Identification
@@ -1107,27 +1111,18 @@ want to use the default value.
1107@end defopt 1111@end defopt
1108 1112
1109@defun user-login-name &optional uid 1113@defun user-login-name &optional uid
1110If you don't specify @var{uid}, this function returns the name under 1114This function returns the name under which the user is logged in.
1111which the user is logged in. If the environment variable @code{LOGNAME} 1115It uses the environment variables @code{LOGNAME} or @code{USER} if
1112is set, that value is used. Otherwise, if the environment variable 1116either is set. Otherwise, the value is based on the effective
1113@code{USER} is set, that value is used. Otherwise, the value is based 1117@acronym{UID}, not the real @acronym{UID}.
1114on the effective @acronym{UID}, not the real @acronym{UID}.
1115 1118
1116If you specify @var{uid}, the value is the user name that corresponds 1119If you specify @var{uid} (a number), the result is the user name that
1117to @var{uid} (which should be an integer), or @code{nil} if there is 1120corresponds to @var{uid}, or @code{nil} if there is no such user.
1118no such user.
1119
1120@example
1121@group
1122(user-login-name)
1123 @result{} "lewis"
1124@end group
1125@end example
1126@end defun 1121@end defun
1127 1122
1128@defun user-real-login-name 1123@defun user-real-login-name
1129This function returns the user name corresponding to Emacs's real 1124This function returns the user name corresponding to Emacs's real
1130@acronym{UID}. This ignores the effective @acronym{UID} and ignores the 1125@acronym{UID}. This ignores the effective @acronym{UID}, and the
1131environment variables @code{LOGNAME} and @code{USER}. 1126environment variables @code{LOGNAME} and @code{USER}.
1132@end defun 1127@end defun
1133 1128
@@ -1135,16 +1130,8 @@ environment variables @code{LOGNAME} and @code{USER}.
1135This function returns the full name of the logged-in user---or the value 1130This function returns the full name of the logged-in user---or the value
1136of the environment variable @code{NAME}, if that is set. 1131of the environment variable @code{NAME}, if that is set.
1137 1132
1138@c "Bil" is the correct spelling. 1133If the Emacs process's user-id does not correspond to any known user (and
1139@example 1134provided @code{NAME} is not set), the result is @code{"unknown"}.
1140@group
1141(user-full-name)
1142 @result{} "Bil Lewis"
1143@end group
1144@end example
1145
1146If the Emacs job's user-id does not correspond to any known user (and
1147provided @code{NAME} is not set), the value is @code{"unknown"}.
1148 1135
1149If @var{uid} is non-@code{nil}, then it should be a number (a user-id) 1136If @var{uid} is non-@code{nil}, then it should be a number (a user-id)
1150or a string (a login name). Then @code{user-full-name} returns the full 1137or a string (a login name). Then @code{user-full-name} returns the full
@@ -1164,14 +1151,8 @@ Titles}).
1164 1151
1165@defun user-real-uid 1152@defun user-real-uid
1166This function returns the real @acronym{UID} of the user. 1153This function returns the real @acronym{UID} of the user.
1167The value may be a floating point number. 1154The value may be a floating point number, in the (unlikely) event that
1168 1155the UID is too large to fit in a Lisp integer.
1169@example
1170@group
1171(user-real-uid)
1172 @result{} 19
1173@end group
1174@end example
1175@end defun 1156@end defun
1176 1157
1177@defun user-uid 1158@defun user-uid
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 04aa50ebc84..0dae20427c6 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -2054,7 +2054,7 @@ parameters:
2054@itemize @bullet 2054@itemize @bullet
2055@item 2055@item
2056The connection's process name is constructed by concatenating the 2056The connection's process name is constructed by concatenating the
2057server process' @var{name} with a client identification string. The 2057server process's @var{name} with a client identification string. The
2058client identification string for an IPv4 connection looks like 2058client identification string for an IPv4 connection looks like
2059@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}. Otherwise, it is a 2059@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}. Otherwise, it is a
2060unique number in brackets, as in @samp{<@var{nnn}>}. The number 2060unique number in brackets, as in @samp{<@var{nnn}>}. The number
@@ -2087,7 +2087,7 @@ The connection's local address is set up according to the port
2087number used for the connection. 2087number used for the connection.
2088 2088
2089@item 2089@item
2090The client process' plist is initialized from the server's plist. 2090The client process's plist is initialized from the server's plist.
2091@end itemize 2091@end itemize
2092 2092
2093@node Datagrams 2093@node Datagrams
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 5bda1940b51..9a508d37340 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -38,7 +38,8 @@ properties, see @ref{Property Search}.
38buffer. They are meant for use in programs, but you may call them 38buffer. They are meant for use in programs, but you may call them
39interactively. If you do so, they prompt for the search string; the 39interactively. If you do so, they prompt for the search string; the
40arguments @var{limit} and @var{noerror} are @code{nil}, and @var{repeat} 40arguments @var{limit} and @var{noerror} are @code{nil}, and @var{repeat}
41is 1. 41is 1. For more details on interactive searching, @pxref{Search,,
42Searching and Replacement, emacs, The GNU Emacs Manual}.
42 43
43 These search functions convert the search string to multibyte if the 44 These search functions convert the search string to multibyte if the
44buffer is multibyte; they convert the search string to unibyte if the 45buffer is multibyte; they convert the search string to unibyte if the
@@ -71,8 +72,8 @@ The quick brown fox@point{} jumped over the lazy dog.
71@end group 72@end group
72@end example 73@end example
73 74
74The argument @var{limit} specifies the upper bound to the search. (It 75The argument @var{limit} specifies the bound to the search, and should
75must be a position in the current buffer.) No match extending after 76be a position in the current buffer. No match extending after
76that position is accepted. If @var{limit} is omitted or @code{nil}, it 77that position is accepted. If @var{limit} is omitted or @code{nil}, it
77defaults to the end of the accessible portion of the buffer. 78defaults to the end of the accessible portion of the buffer.
78 79
@@ -82,9 +83,14 @@ What happens when the search fails depends on the value of
82error is signaled. If @var{noerror} is @code{t}, @code{search-forward} 83error is signaled. If @var{noerror} is @code{t}, @code{search-forward}
83returns @code{nil} and does nothing. If @var{noerror} is neither 84returns @code{nil} and does nothing. If @var{noerror} is neither
84@code{nil} nor @code{t}, then @code{search-forward} moves point to the 85@code{nil} nor @code{t}, then @code{search-forward} moves point to the
85upper bound and returns @code{nil}. (It would be more consistent now to 86upper bound and returns @code{nil}.
86return the new position of point in that case, but some existing 87@c I see no prospect of this ever changing, and frankly the current
87programs may depend on a value of @code{nil}.) 88@c behavior seems better, so there seems no need to mention this.
89@ignore
90(It would be more consistent now to return the new position of point
91in that case, but some existing programs may depend on a value of
92@code{nil}.)
93@end ignore
88 94
89The argument @var{noerror} only affects valid searches which fail to 95The argument @var{noerror} only affects valid searches which fail to
90find a match. Invalid arguments cause errors regardless of 96find a match. Invalid arguments cause errors regardless of
@@ -132,7 +138,7 @@ the ball boy!"
132 138
133@group 139@group
134(word-search-forward "Please find the ball, boy.") 140(word-search-forward "Please find the ball, boy.")
135 @result{} 35 141 @result{} 36
136 142
137---------- Buffer: foo ---------- 143---------- Buffer: foo ----------
138He said "Please! Find 144He said "Please! Find
@@ -153,11 +159,16 @@ end of the accessible portion of the buffer) and returns @code{nil}.
153 159
154If @var{repeat} is non-@code{nil}, then the search is repeated that many 160If @var{repeat} is non-@code{nil}, then the search is repeated that many
155times. Point is positioned at the end of the last match. 161times. Point is positioned at the end of the last match.
162
163@findex word-search-regexp
164Internal, @code{word-search-forward} and related functions use the
165function @code{word-search-regexp} to convert @var{string} to a
166regular expression that ignores punctuation.
156@end deffn 167@end deffn
157 168
158@deffn Command word-search-forward-lax string &optional limit noerror repeat 169@deffn Command word-search-forward-lax string &optional limit noerror repeat
159This command is identical to @code{word-search-forward}, except that 170This command is identical to @code{word-search-forward}, except that
160the end of @code{string} need not match a word boundary unless it ends 171the end of @var{string} need not match a word boundary, unless @var{string} ends
161in whitespace. For instance, searching for @samp{ball boy} matches 172in whitespace. For instance, searching for @samp{ball boy} matches
162@samp{ball boyee}, but does not match @samp{aball boy}. 173@samp{ball boyee}, but does not match @samp{aball boy}.
163@end deffn 174@end deffn
@@ -171,7 +182,7 @@ beginning of the match.
171 182
172@deffn Command word-search-backward-lax string &optional limit noerror repeat 183@deffn Command word-search-backward-lax string &optional limit noerror repeat
173This command is identical to @code{word-search-backward}, except that 184This command is identical to @code{word-search-backward}, except that
174the end of @code{string} need not match a word boundary unless it ends 185the end of @var{string} need not match a word boundary, unless @var{string} ends
175in whitespace. 186in whitespace.
176@end deffn 187@end deffn
177 188
@@ -189,24 +200,26 @@ regular expressions, too; thus, @samp{[aB]} would match @samp{a} or
189@code{case-fold-search} to @code{nil}. Then all letters must match 200@code{case-fold-search} to @code{nil}. Then all letters must match
190exactly, including case. This is a buffer-local variable; altering the 201exactly, including case. This is a buffer-local variable; altering the
191variable affects only the current buffer. (@xref{Intro to 202variable affects only the current buffer. (@xref{Intro to
192Buffer-Local}.) Alternatively, you may change the default value of 203Buffer-Local}.) Alternatively, you may change the default value.
193@code{case-fold-search}. 204In Lisp code, you will more typically use @code{let} to bind
205@code{case-fold-search} to the desired value.
194 206
195 Note that the user-level incremental search feature handles case 207 Note that the user-level incremental search feature handles case
196distinctions differently. When the search string contains only lower 208distinctions differently. When the search string contains only lower
197case letters, the search ignores case, but when the search string 209case letters, the search ignores case, but when the search string
198contains one or more upper case letters, the search becomes 210contains one or more upper case letters, the search becomes
199case-sensitive. But this has nothing to do with the searching 211case-sensitive. But this has nothing to do with the searching
200functions used in Lisp code. 212functions used in Lisp code. @xref{Incremental Search,,, emacs,
213The GNU Emacs Manual}.
201 214
202@defopt case-fold-search 215@defopt case-fold-search
203This buffer-local variable determines whether searches should ignore 216This buffer-local variable determines whether searches should ignore
204case. If the variable is @code{nil} they do not ignore case; otherwise 217case. If the variable is @code{nil} they do not ignore case; otherwise
205they do ignore case. 218(and by default) they do ignore case.
206@end defopt 219@end defopt
207 220
208@defopt case-replace 221@defopt case-replace
209This variable determines whether the higher level replacement 222This variable determines whether the higher-level replacement
210functions should preserve case. If the variable is @code{nil}, that 223functions should preserve case. If the variable is @code{nil}, that
211means to use the replacement text verbatim. A non-@code{nil} value 224means to use the replacement text verbatim. A non-@code{nil} value
212means to convert the case of the replacement text according to the 225means to convert the case of the replacement text according to the
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 93ae0f12862..ca07cc36062 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12012-03-27 Glenn Morris <rgm@gnu.org>
2
3 * startup.el (mail-host-address): Doc fix.
4
12012-03-26 Stefan Monnier <monnier@iro.umontreal.ca> 52012-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * emacs-lisp/bytecomp.el (byte-compile-constants-vector): Allow more 7 * emacs-lisp/bytecomp.el (byte-compile-constants-vector): Allow more
diff --git a/lisp/startup.el b/lisp/startup.el
index 57d7a74e5ec..37e4f550dcd 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -339,7 +339,9 @@ this variable usefully is to set it while building and dumping Emacs."
339 (error "Customizing `site-run-file' does not work"))) 339 (error "Customizing `site-run-file' does not work")))
340 340
341(defcustom mail-host-address nil 341(defcustom mail-host-address nil
342 "Name of this machine, for purposes of naming users." 342 "Name of this machine, for purposes of naming users.
343If non-nil, Emacs uses this instead of `system-name' when constructing
344email addresses."
343 :type '(choice (const nil) string) 345 :type '(choice (const nil) string)
344 :group 'mail) 346 :group 'mail)
345 347
diff --git a/src/ChangeLog b/src/ChangeLog
index 81448982563..381d2ad631c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-03-27 Glenn Morris <rgm@gnu.org>
2
3 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
4 Doc fixes.
5
12012-03-26 Kenichi Handa <handa@m17n.org> 62012-03-26 Kenichi Handa <handa@m17n.org>
2 7
3 * dispextern.h (struct glyph): Fix previous change. Change the 8 * dispextern.h (struct glyph): Fix previous change. Change the
diff --git a/src/search.c b/src/search.c
index 55a6d893479..1f3ccc25dc8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,6 +1,7 @@
1/* String search routines for GNU Emacs. 1/* String search routines for GNU Emacs.
2 Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012 2
3 Free Software Foundation, Inc. 3Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012
4 Free Software Foundation, Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
@@ -2257,7 +2258,7 @@ DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backw
2257Set point to the beginning of the occurrence found, and return point. 2258Set point to the beginning of the occurrence found, and return point.
2258 2259
2259Unlike `word-search-backward', the end of STRING need not match a word 2260Unlike `word-search-backward', the end of STRING need not match a word
2260boundary unless it ends in whitespace. 2261boundary, unless STRING ends in whitespace.
2261 2262
2262An optional second argument bounds the search; it is a buffer position. 2263An optional second argument bounds the search; it is a buffer position.
2263The match found must not extend before that position. 2264The match found must not extend before that position.
@@ -2279,7 +2280,7 @@ DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward
2279Set point to the end of the occurrence found, and return point. 2280Set point to the end of the occurrence found, and return point.
2280 2281
2281Unlike `word-search-forward', the end of STRING need not match a word 2282Unlike `word-search-forward', the end of STRING need not match a word
2282boundary unless it ends in whitespace. 2283boundary, unless STRING ends in whitespace.
2283 2284
2284An optional second argument bounds the search; it is a buffer position. 2285An optional second argument bounds the search; it is a buffer position.
2285The match found must not extend after that position. 2286The match found must not extend after that position.