/* Lisp parsing and input streams.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object prompt, inherit_input_method, seconds;
{
Lisp_Object val;
- int c;
if (! NILP (prompt))
message_with_string ("%s", prompt, 0);
val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
- c = XINT (val);
- return make_number (char_resolve_modifier_mask (c));
+
+ return (NILP (val) ? Qnil
+ : make_number (char_resolve_modifier_mask (XINT (val))));
}
DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0,
Lisp_Object prompt, inherit_input_method, seconds;
{
Lisp_Object val;
- int c;
if (! NILP (prompt))
message_with_string ("%s", prompt, 0);
+
val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
- c = XINT (val);
- return make_number (char_resolve_modifier_mask (c));
+
+ return (NILP (val) ? Qnil
+ : make_number (char_resolve_modifier_mask (XINT (val))));
}
DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0,
2000-09-21: It's not possible to just check for the file loaded
being a member of Vloads_in_progress. This fails because of the
way the byte compiler currently works; `provide's are not
- evaluted, see font-lock.el/jit-lock.el as an example. This
+ evaluated, see font-lock.el/jit-lock.el as an example. This
leads to a certain amount of ``normal'' recursion.
Also, just loading a file recursively is not always an error in
register const unsigned char *s = SDATA (pathname);
return (IS_DIRECTORY_SEP (s[0])
|| (SCHARS (pathname) > 2
- && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))
-#ifdef VMS
- || index (s, ':')
-#endif /* VMS */
- );
+ && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2])));
}
DEFUN ("locate-file-internal", Flocate_file_internal, Slocate_file_internal, 2, 4, 0,
}
/* This is sometimes needed in the middle of GC. */
obsize &= ~ARRAY_MARK_FLAG;
- /* Combining next two lines breaks VMS C 2.3. */
- hash = hash_string (ptr, size_byte);
- hash %= obsize;
+ hash = hash_string (ptr, size_byte) % obsize;
bucket = XVECTOR (obarray)->contents[hash];
oblookup_last_bucket_number = hash;
if (EQ (bucket, make_number (0)))
}
#endif
-#if (!(defined(WINDOWSNT) || (defined(HAVE_CARBON)) || (defined(HAVE_NS))))
+#if (!(defined(WINDOWSNT) || (defined(HAVE_NS))))
/* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
almost never correct, thereby causing a warning to be printed out that
confuses users. Since PATH_LOADSEARCH is always overridden by the
- EMACSLOADPATH environment variable below, disable the warning on NT.
- Also, when using the "self-contained" option for Carbon Emacs for MacOSX,
- the "standard" paths may not exist and would be overridden by
- EMACSLOADPATH as on NT. Since this depends on how the executable
- was build and packaged, turn off the warnings in general */
+ EMACSLOADPATH environment variable below, disable the warning on NT. */
/* Warn if dirs in the *standard* path don't exist. */
if (!turn_off_warning)
}
}
}
-#endif /* !(WINDOWSNT || HAVE_CARBON || HAVE_NS) */
+#endif /* !(WINDOWSNT || HAVE_NS) */
/* If the EMACSLOADPATH environment variable is set, use its value.
This doesn't apply if we're dumping. */