aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-05-07 17:30:36 +0000
committerRichard M. Stallman1995-05-07 17:30:36 +0000
commite73997a15d945f01aab80fb3adbed7d3a8fb9967 (patch)
tree009a46ac4f91573c67378eb1d0a299a46cd21e87 /src
parente856a264dd228101e26cd52a229248bc524a16f2 (diff)
downloademacs-e73997a15d945f01aab80fb3adbed7d3a8fb9967.tar.gz
emacs-e73997a15d945f01aab80fb3adbed7d3a8fb9967.zip
(isfloat_string): Reject strings like "0.5+".
(init_lread): Don't warn about missing installation dirs when using dirs derived from the executable.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/src/lread.c b/src/lread.c
index 5f1643e86d6..55a9df43e74 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1501,9 +1501,9 @@ isfloat_string (cp)
1501 { 1501 {
1502 state |= E_CHAR; 1502 state |= E_CHAR;
1503 cp++; 1503 cp++;
1504 if (*cp == '+' || *cp == '-')
1505 cp++;
1504 } 1506 }
1505 if ((*cp == '+') || (*cp == '-'))
1506 cp++;
1507 1507
1508 if (*cp >= '0' && *cp <= '9') 1508 if (*cp >= '0' && *cp <= '9')
1509 { 1509 {
@@ -2068,6 +2068,7 @@ defvar_kboard (namestring, offset)
2068init_lread () 2068init_lread ()
2069{ 2069{
2070 char *normal; 2070 char *normal;
2071 int turn_off_warning = 0;
2071 2072
2072 /* Compute the default load-path. */ 2073 /* Compute the default load-path. */
2073#ifdef CANNOT_DUMP 2074#ifdef CANNOT_DUMP
@@ -2103,7 +2104,10 @@ init_lread ()
2103 if (!NILP (tem1)) 2104 if (!NILP (tem1))
2104 { 2105 {
2105 if (NILP (Fmember (tem, Vload_path))) 2106 if (NILP (Fmember (tem, Vload_path)))
2106 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 2107 {
2108 turn_off_warning = 1;
2109 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
2110 }
2107 } 2111 }
2108 else 2112 else
2109 /* That dir doesn't exist, so add the build-time 2113 /* That dir doesn't exist, so add the build-time
@@ -2133,25 +2137,26 @@ init_lread ()
2133 EMACSLOADPATH environment variable below, disable the warning on NT. */ 2137 EMACSLOADPATH environment variable below, disable the warning on NT. */
2134 2138
2135 /* Warn if dirs in the *standard* path don't exist. */ 2139 /* Warn if dirs in the *standard* path don't exist. */
2136 { 2140 if (!turn_off_warning)
2137 Lisp_Object path_tail; 2141 {
2142 Lisp_Object path_tail;
2138 2143
2139 for (path_tail = Vload_path; 2144 for (path_tail = Vload_path;
2140 !NILP (path_tail); 2145 !NILP (path_tail);
2141 path_tail = XCONS (path_tail)->cdr) 2146 path_tail = XCONS (path_tail)->cdr)
2142 { 2147 {
2143 Lisp_Object dirfile; 2148 Lisp_Object dirfile;
2144 dirfile = Fcar (path_tail); 2149 dirfile = Fcar (path_tail);
2145 if (STRINGP (dirfile)) 2150 if (STRINGP (dirfile))
2146 { 2151 {
2147 dirfile = Fdirectory_file_name (dirfile); 2152 dirfile = Fdirectory_file_name (dirfile);
2148 if (access (XSTRING (dirfile)->data, 0) < 0) 2153 if (access (XSTRING (dirfile)->data, 0) < 0)
2149 fprintf (stderr, 2154 fprintf (stderr,
2150 "Warning: Lisp directory `%s' does not exist.\n", 2155 "Warning: Lisp directory `%s' does not exist.\n",
2151 XSTRING (Fcar (path_tail))->data); 2156 XSTRING (Fcar (path_tail))->data);
2152 } 2157 }
2153 } 2158 }
2154 } 2159 }
2155#endif /* WINDOWSNT */ 2160#endif /* WINDOWSNT */
2156 2161
2157 /* If the EMACSLOADPATH environment variable is set, use its value. 2162 /* If the EMACSLOADPATH environment variable is set, use its value.