diff options
| -rw-r--r-- | doc/lispref/ChangeLog | 14 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 169 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/searching.texi | 41 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/startup.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/search.c | 9 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-03-26 Glenn Morris <rgm@gnu.org> | 15 | 2012-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 |
| 835 | This variable holds the standard GNU configuration name for the | 835 | This variable holds the standard GNU configuration name for the |
| 836 | hardware/software configuration of your system, as a string. The | 836 | hardware/software configuration of your system, as a string. For |
| 837 | convenient way to test parts of this string is with | 837 | example, 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 |
| 843 | The value of this variable is a symbol indicating the type of operating | 843 | The value of this variable is a symbol indicating the type of operating |
| 844 | system Emacs is operating on. Here is a table of the possible values: | 844 | system 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 |
| 863 | A GNU/Linux system---that is, a variant GNU system, using the Linux | 863 | A GNU/Linux system---that is, a variant GNU system, using the Linux |
| 864 | kernel. (These systems are the ones people often call ``Linux,'' but | 864 | kernel. (These systems are the ones people often call ``Linux'', but |
| 865 | actually Linux is just the kernel, not the whole system.) | 865 | actually 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. | |||
| 874 | Silicon Graphics Irix system. | 874 | Silicon Graphics Irix system. |
| 875 | 875 | ||
| 876 | @item ms-dos | 876 | @item ms-dos |
| 877 | Microsoft MS-DOS ``operating system.'' Emacs compiled with DJGPP for | 877 | Microsoft's DOS. Emacs compiled with DJGPP for MS-DOS binds |
| 878 | MS-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. |
| 879 | MS-Windows. | ||
| 880 | 879 | ||
| 881 | @item usg-unix-v | 880 | @item usg-unix-v |
| 882 | AT&T Unix System V. | 881 | AT&T Unix System V. |
| 883 | 882 | ||
| 884 | @item windows-nt | 883 | @item windows-nt |
| 885 | Microsoft Windows NT and later. The same executable supports Windows | 884 | Microsoft Windows NT, 9X and later. The value of @code{system-type} |
| 886 | 9X, but the value of @code{system-type} is @code{windows-nt} in either | 885 | is always @code{windows-nt}, e.g. even on Windows 7. |
| 887 | case. | ||
| 888 | 886 | ||
| 889 | @end table | 887 | @end table |
| 890 | 888 | ||
| 891 | We do not wish to add new symbols to make finer distinctions unless it | 889 | We do not wish to add new symbols to make finer distinctions unless it |
| 892 | is absolutely necessary! In fact, we hope to eliminate some of these | 890 | is absolutely necessary! In fact, we hope to eliminate some of these |
| 893 | alternatives in the future. We recommend using | 891 | alternatives in the future. If you need to make a finer distinction |
| 894 | @code{system-configuration} to distinguish between different operating | 892 | than @code{system-type} allows for, you can test |
| 895 | systems. | 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 |
| 899 | This function returns the name of the machine you are running on. | 897 | This function returns the name of the machine you are running on, as a |
| 900 | @example | 898 | string. |
| 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 | |||
| 910 | system. The variable is also useful for constructing frame titles | 905 | system. 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 |
| 914 | If this variable is non-@code{nil}, it is used instead of | 910 | If 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 |
| 918 | done when Emacs starts up, the value actually used is the one saved when | 914 | done when Emacs starts up, the value actually used is the one saved when |
| 919 | Emacs was dumped. @xref{Building Emacs}.) | 915 | Emacs 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 |
| 924 | This function returns the value of the environment variable @var{var}, | 922 | This function returns the value of the environment variable @var{var}, |
| 925 | as a string. @var{var} should be a string. If @var{var} is undefined | 923 | as a string. @var{var} should be a string. If @var{var} is undefined |
| 926 | in the environment, @code{getenv} returns @code{nil}. If returns | 924 | in 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 |
| 928 | variable values are kept in the Lisp variable @code{process-environment}. | 926 | variables 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 | |||
| 935 | The shell command @code{printenv} prints all or part of the environment: | ||
| 935 | 936 | ||
| 937 | @example | ||
| 936 | @group | 938 | @group |
| 937 | lewis@@slug[10] % printenv | 939 | bash$ printenv |
| 938 | PATH=.:/user/lewis/bin:/usr/bin:/usr/local/bin | 940 | PATH=/usr/local/bin:/usr/bin:/bin |
| 939 | USER=lewis | 941 | USER=lewis |
| 940 | @end group | 942 | @end group |
| 941 | @group | 943 | @group |
| 942 | TERM=ibmapa16 | 944 | TERM=xterm |
| 943 | SHELL=/bin/csh | 945 | SHELL=/bin/bash |
| 944 | HOME=/user/lewis | 946 | HOME=/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 | ||
| 951 | This command sets the value of the environment variable named | 953 | This 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. |
| 953 | Internally, Emacs Lisp can handle any string. However, normally | 955 | Internally, Emacs Lisp can handle any string. However, normally |
| @@ -955,8 +957,13 @@ Internally, Emacs Lisp can handle any string. However, normally | |||
| 955 | of letters, digits and underscores, starting with a letter or | 957 | of letters, digits and underscores, starting with a letter or |
| 956 | underscore. Otherwise, errors may occur if subprocesses of Emacs try | 958 | underscore. Otherwise, errors may occur if subprocesses of Emacs try |
| 957 | to access the value of @var{variable}. If @var{value} is omitted or | 959 | to 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} |
| 959 | Otherwise, @var{value} should be a string. | 961 | removes @var{variable} from the environment. Otherwise, @var{value} |
| 962 | should be a string. | ||
| 963 | |||
| 964 | If the optional argument @var{substitute} is non-@code{nil}, Emacs | ||
| 965 | calls the function @code{substitute-env-vars} to expand any | ||
| 966 | environment 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 |
| 962 | that variable with @code{let} is also reasonable practice. | 969 | that variable with @code{let} is also reasonable practice. |
| @@ -973,14 +980,14 @@ of this variable. | |||
| 973 | @smallexample | 980 | @smallexample |
| 974 | @group | 981 | @group |
| 975 | process-environment | 982 | process-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 |
| 993 | This variable holds the list of environment variables Emacs inherited | 1000 | This variable holds the list of environment variables Emacs inherited |
| 994 | from its parent process. It is computed during startup, see | 1001 | from 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 |
| 999 | This variable holds a string which says which character separates | 1005 | This variable holds a string that says which character separates |
| 1000 | directories in a search path (as found in an environment variable). Its | 1006 | directories in a search path (as found in an environment variable). Its |
| 1001 | value is @code{":"} for Unix and GNU systems, and @code{";"} for MS-DOS | 1007 | value is @code{":"} for Unix and GNU systems, and @code{";"} for MS systems. |
| 1002 | and MS-Windows. | ||
| 1003 | @end defvar | 1008 | @end defvar |
| 1004 | 1009 | ||
| 1005 | @defun parse-colon-path path | 1010 | @defun parse-colon-path path |
| 1006 | This function takes a search path string such as would be the value of | 1011 | This function takes a search path string such as the value of |
| 1007 | the @code{PATH} environment variable, and splits it at the separators, | 1012 | the @code{PATH} environment variable, and splits it at the separators, |
| 1008 | returning a list of directory names. @code{nil} in this list stands for | 1013 | returning a list of directory names. @code{nil} in this list means |
| 1009 | ``use the current directory.'' Although the function's name says | 1014 | the 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 |
| 1024 | This variable holds the directory from which the Emacs executable was | 1029 | This variable holds the directory from which the Emacs executable was |
| 1025 | invoked, or perhaps @code{nil} if that directory cannot be determined. | 1030 | invoked, 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 |
| 1029 | If non-@code{nil}, this is a directory within which to look for the | 1034 | If 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, |
| 1036 | it is normally @code{nil}. It is non-@code{nil} | ||
| 1031 | when Emacs can't find those directories in their standard installed | 1037 | when Emacs can't find those directories in their standard installed |
| 1032 | locations, but can find them in a directory related somehow to the one | 1038 | locations, but can find them in a directory related somehow to the one |
| 1033 | containing the Emacs executable. | 1039 | containing 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 |
| 1037 | This function returns the current 1-minute, 5-minute, and 15-minute load | 1043 | This function returns the current 1-minute, 5-minute, and 15-minute |
| 1038 | averages, in a list. | 1044 | system load averages, in a list. The load average indicates the |
| 1045 | number of processes trying to run on the system. | ||
| 1039 | 1046 | ||
| 1040 | By default, the values are integers that are 100 times the system load | 1047 | By default, the values are integers that are 100 times the system load |
| 1041 | averages, which indicate the average number of processes trying to run. | 1048 | averages, but if @var{use-float} is non-@code{nil}, then they are |
| 1042 | If @var{use-float} is non-@code{nil}, then they are returned | 1049 | returned as floating point numbers without multiplying by 100. |
| 1043 | as floating point numbers and without multiplying by 100. | ||
| 1044 | 1050 | ||
| 1045 | If it is impossible to obtain the load average, this function signals | 1051 | If it is impossible to obtain the load average, this function signals |
| 1046 | an error. On some platforms, access to load averages requires | 1052 | an error. On some platforms, access to load averages requires |
| 1047 | installing Emacs as setuid or setgid so that it can read kernel | 1053 | installing Emacs as setuid or setgid so that it can read kernel |
| 1048 | information, and that usually isn't advisable. | 1054 | information, and that usually isn't advisable. |
| 1055 | @c FIXME which platforms are these? Are they still relevant? | ||
| 1049 | 1056 | ||
| 1050 | If the 1-minute load average is available, but the 5- or 15-minute | 1057 | If the 1-minute load average is available, but the 5- or 15-minute |
| 1051 | averages are not, this function returns a shortened list containing | 1058 | averages 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 | ||
| 1065 | lewis@@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 | |||
| 1072 | The 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 |
| 1078 | This variable holds the erase character that was selected | 1081 | This variable holds the erase character that was selected |
| 1079 | in the system's terminal driver, before Emacs was started. | 1082 | in the system's terminal driver, before Emacs was started. |
| 1080 | The 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 |
| 1110 | If you don't specify @var{uid}, this function returns the name under | 1114 | This function returns the name under which the user is logged in. |
| 1111 | which the user is logged in. If the environment variable @code{LOGNAME} | 1115 | It uses the environment variables @code{LOGNAME} or @code{USER} if |
| 1112 | is set, that value is used. Otherwise, if the environment variable | 1116 | either 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}. |
| 1114 | on the effective @acronym{UID}, not the real @acronym{UID}. | ||
| 1115 | 1118 | ||
| 1116 | If you specify @var{uid}, the value is the user name that corresponds | 1119 | If you specify @var{uid} (a number), the result is the user name that |
| 1117 | to @var{uid} (which should be an integer), or @code{nil} if there is | 1120 | corresponds to @var{uid}, or @code{nil} if there is no such user. |
| 1118 | no 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 |
| 1129 | This function returns the user name corresponding to Emacs's real | 1124 | This 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 |
| 1131 | environment variables @code{LOGNAME} and @code{USER}. | 1126 | environment 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}. | |||
| 1135 | This function returns the full name of the logged-in user---or the value | 1130 | This function returns the full name of the logged-in user---or the value |
| 1136 | of the environment variable @code{NAME}, if that is set. | 1131 | of the environment variable @code{NAME}, if that is set. |
| 1137 | 1132 | ||
| 1138 | @c "Bil" is the correct spelling. | 1133 | If the Emacs process's user-id does not correspond to any known user (and |
| 1139 | @example | 1134 | provided @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 | |||
| 1146 | If the Emacs job's user-id does not correspond to any known user (and | ||
| 1147 | provided @code{NAME} is not set), the value is @code{"unknown"}. | ||
| 1148 | 1135 | ||
| 1149 | If @var{uid} is non-@code{nil}, then it should be a number (a user-id) | 1136 | If @var{uid} is non-@code{nil}, then it should be a number (a user-id) |
| 1150 | or a string (a login name). Then @code{user-full-name} returns the full | 1137 | or 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 |
| 1166 | This function returns the real @acronym{UID} of the user. | 1153 | This function returns the real @acronym{UID} of the user. |
| 1167 | The value may be a floating point number. | 1154 | The value may be a floating point number, in the (unlikely) event that |
| 1168 | 1155 | the 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 |
| 2056 | The connection's process name is constructed by concatenating the | 2056 | The connection's process name is constructed by concatenating the |
| 2057 | server process' @var{name} with a client identification string. The | 2057 | server process's @var{name} with a client identification string. The |
| 2058 | client identification string for an IPv4 connection looks like | 2058 | client 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 |
| 2060 | unique number in brackets, as in @samp{<@var{nnn}>}. The number | 2060 | unique 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 | |||
| 2087 | number used for the connection. | 2087 | number used for the connection. |
| 2088 | 2088 | ||
| 2089 | @item | 2089 | @item |
| 2090 | The client process' plist is initialized from the server's plist. | 2090 | The 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}. | |||
| 38 | buffer. They are meant for use in programs, but you may call them | 38 | buffer. They are meant for use in programs, but you may call them |
| 39 | interactively. If you do so, they prompt for the search string; the | 39 | interactively. If you do so, they prompt for the search string; the |
| 40 | arguments @var{limit} and @var{noerror} are @code{nil}, and @var{repeat} | 40 | arguments @var{limit} and @var{noerror} are @code{nil}, and @var{repeat} |
| 41 | is 1. | 41 | is 1. For more details on interactive searching, @pxref{Search,, |
| 42 | Searching 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 |
| 44 | buffer is multibyte; they convert the search string to unibyte if the | 45 | buffer 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 | ||
| 74 | The argument @var{limit} specifies the upper bound to the search. (It | 75 | The argument @var{limit} specifies the bound to the search, and should |
| 75 | must be a position in the current buffer.) No match extending after | 76 | be a position in the current buffer. No match extending after |
| 76 | that position is accepted. If @var{limit} is omitted or @code{nil}, it | 77 | that position is accepted. If @var{limit} is omitted or @code{nil}, it |
| 77 | defaults to the end of the accessible portion of the buffer. | 78 | defaults 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 | |||
| 82 | error is signaled. If @var{noerror} is @code{t}, @code{search-forward} | 83 | error is signaled. If @var{noerror} is @code{t}, @code{search-forward} |
| 83 | returns @code{nil} and does nothing. If @var{noerror} is neither | 84 | returns @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 |
| 85 | upper bound and returns @code{nil}. (It would be more consistent now to | 86 | upper bound and returns @code{nil}. |
| 86 | return 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 |
| 87 | programs 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 | ||
| 91 | in that case, but some existing programs may depend on a value of | ||
| 92 | @code{nil}.) | ||
| 93 | @end ignore | ||
| 88 | 94 | ||
| 89 | The argument @var{noerror} only affects valid searches which fail to | 95 | The argument @var{noerror} only affects valid searches which fail to |
| 90 | find a match. Invalid arguments cause errors regardless of | 96 | find 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 ---------- |
| 138 | He said "Please! Find | 144 | He said "Please! Find |
| @@ -153,11 +159,16 @@ end of the accessible portion of the buffer) and returns @code{nil}. | |||
| 153 | 159 | ||
| 154 | If @var{repeat} is non-@code{nil}, then the search is repeated that many | 160 | If @var{repeat} is non-@code{nil}, then the search is repeated that many |
| 155 | times. Point is positioned at the end of the last match. | 161 | times. Point is positioned at the end of the last match. |
| 162 | |||
| 163 | @findex word-search-regexp | ||
| 164 | Internal, @code{word-search-forward} and related functions use the | ||
| 165 | function @code{word-search-regexp} to convert @var{string} to a | ||
| 166 | regular 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 |
| 159 | This command is identical to @code{word-search-forward}, except that | 170 | This command is identical to @code{word-search-forward}, except that |
| 160 | the end of @code{string} need not match a word boundary unless it ends | 171 | the end of @var{string} need not match a word boundary, unless @var{string} ends |
| 161 | in whitespace. For instance, searching for @samp{ball boy} matches | 172 | in 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 |
| 173 | This command is identical to @code{word-search-backward}, except that | 184 | This command is identical to @code{word-search-backward}, except that |
| 174 | the end of @code{string} need not match a word boundary unless it ends | 185 | the end of @var{string} need not match a word boundary, unless @var{string} ends |
| 175 | in whitespace. | 186 | in 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 |
| 190 | exactly, including case. This is a buffer-local variable; altering the | 201 | exactly, including case. This is a buffer-local variable; altering the |
| 191 | variable affects only the current buffer. (@xref{Intro to | 202 | variable affects only the current buffer. (@xref{Intro to |
| 192 | Buffer-Local}.) Alternatively, you may change the default value of | 203 | Buffer-Local}.) Alternatively, you may change the default value. |
| 193 | @code{case-fold-search}. | 204 | In 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 |
| 196 | distinctions differently. When the search string contains only lower | 208 | distinctions differently. When the search string contains only lower |
| 197 | case letters, the search ignores case, but when the search string | 209 | case letters, the search ignores case, but when the search string |
| 198 | contains one or more upper case letters, the search becomes | 210 | contains one or more upper case letters, the search becomes |
| 199 | case-sensitive. But this has nothing to do with the searching | 211 | case-sensitive. But this has nothing to do with the searching |
| 200 | functions used in Lisp code. | 212 | functions used in Lisp code. @xref{Incremental Search,,, emacs, |
| 213 | The GNU Emacs Manual}. | ||
| 201 | 214 | ||
| 202 | @defopt case-fold-search | 215 | @defopt case-fold-search |
| 203 | This buffer-local variable determines whether searches should ignore | 216 | This buffer-local variable determines whether searches should ignore |
| 204 | case. If the variable is @code{nil} they do not ignore case; otherwise | 217 | case. If the variable is @code{nil} they do not ignore case; otherwise |
| 205 | they 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 |
| 209 | This variable determines whether the higher level replacement | 222 | This variable determines whether the higher-level replacement |
| 210 | functions should preserve case. If the variable is @code{nil}, that | 223 | functions should preserve case. If the variable is @code{nil}, that |
| 211 | means to use the replacement text verbatim. A non-@code{nil} value | 224 | means to use the replacement text verbatim. A non-@code{nil} value |
| 212 | means to convert the case of the replacement text according to the | 225 | means 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 @@ | |||
| 1 | 2012-03-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * startup.el (mail-host-address): Doc fix. | ||
| 4 | |||
| 1 | 2012-03-26 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2012-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. |
| 343 | If non-nil, Emacs uses this instead of `system-name' when constructing | ||
| 344 | email 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 @@ | |||
| 1 | 2012-03-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * search.c (Fword_search_backward_lax, Fword_search_forward_lax): | ||
| 4 | Doc fixes. | ||
| 5 | |||
| 1 | 2012-03-26 Kenichi Handa <handa@m17n.org> | 6 | 2012-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. | 3 | Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -2257,7 +2258,7 @@ DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backw | |||
| 2257 | Set point to the beginning of the occurrence found, and return point. | 2258 | Set point to the beginning of the occurrence found, and return point. |
| 2258 | 2259 | ||
| 2259 | Unlike `word-search-backward', the end of STRING need not match a word | 2260 | Unlike `word-search-backward', the end of STRING need not match a word |
| 2260 | boundary unless it ends in whitespace. | 2261 | boundary, unless STRING ends in whitespace. |
| 2261 | 2262 | ||
| 2262 | An optional second argument bounds the search; it is a buffer position. | 2263 | An optional second argument bounds the search; it is a buffer position. |
| 2263 | The match found must not extend before that position. | 2264 | The match found must not extend before that position. |
| @@ -2279,7 +2280,7 @@ DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward | |||
| 2279 | Set point to the end of the occurrence found, and return point. | 2280 | Set point to the end of the occurrence found, and return point. |
| 2280 | 2281 | ||
| 2281 | Unlike `word-search-forward', the end of STRING need not match a word | 2282 | Unlike `word-search-forward', the end of STRING need not match a word |
| 2282 | boundary unless it ends in whitespace. | 2283 | boundary, unless STRING ends in whitespace. |
| 2283 | 2284 | ||
| 2284 | An optional second argument bounds the search; it is a buffer position. | 2285 | An optional second argument bounds the search; it is a buffer position. |
| 2285 | The match found must not extend after that position. | 2286 | The match found must not extend after that position. |