aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c7
-rw-r--r--src/keyboard.c14
2 files changed, 20 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 59a7c9eeec..144ebe00ef 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1364,6 +1364,13 @@ duplicates what `expand-file-name' does.")
#endif /* not VMS */
}
+/* A slightly faster and more convenient way to get
+ (directory-file-name (expand-file-name FOO)). The return value may
+ have had its last character zapped with a '\0' character, meaning
+ that it is acceptable to system calls, but not to other lisp
+ functions. Callers should make sure that the return value doesn't
+ escape. */
+
Lisp_Object
expand_and_dir_to_file (filename, defdir)
Lisp_Object filename, defdir;
diff --git a/src/keyboard.c b/src/keyboard.c
index 442a4f318e..ceab36647f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2697,8 +2697,20 @@ read_key_sequence (keybuf, bufsize, prompt)
/* Scan from fkey_end until we find a bound suffix. */
while (fkey_end < t)
{
+ /* Look up meta-characters by prefixing them
+ with meta_prefix_char. I hate this. */
+ if (keybuf[fkey_end++] & 0x80)
+ fkey_next =
+ get_keymap_1 (get_keyelt
+ (access_keymap (fkey_map, meta_prefix_char)),
+ 0);
+ else
+ fkey_next = fkey_map;
+
fkey_next =
- get_keyelt (access_keymap (fkey_map, keybuf[fkey_end++]));
+ get_keyelt (access_keymap
+ (fkey_next, keybuf[(fkey_end++) & 0x7f]));
+
/* If keybuf[fkey_start..fkey_next] is bound in the
function key map and it's a suffix of the current
sequence (i.e. fkey_next == t), replace it with