diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-01-12 11:18:20 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-01-12 11:18:20 +0000 |
commit | 2b4b027f3a0e46f42b306b758446970a0a1c0c43 (patch) | |
tree | 1c2a768ab12f750f5986d807ff3f4d36108b29fd /src/intervals.c | |
parent | 24a40fbb28b6873892208e55954527e72fb8b95e (diff) | |
download | emacs-2b4b027f3a0e46f42b306b758446970a0a1c0c43.tar.gz |
(get_local_map): Change TYPE to Lisp_Object.
Diffstat (limited to 'src/intervals.c')
-rw-r--r-- | src/intervals.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/intervals.c b/src/intervals.c index cfdf8923403..3e15a3cbf41 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2161,18 +2161,16 @@ get_property_and_range (pos, prop, val, start, end, object) return 1; } -/* If TYPE is `keymap', return the map specified by the `keymap' - property at POSITION in BUFFER or nil. - - Otherwise return the proper local map for position POSITION in - BUFFER. Use the map specified by the local-map property, if any. - Otherwise, use BUFFER's local map. */ +/* Return the proper local keymap TYPE for position POSITION in + BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map + specified by the PROP property, if any. Otherwise, if TYPE is + `local-map' use BUFFER's local map. */ Lisp_Object get_local_map (position, buffer, type) register int position; register struct buffer *buffer; - enum map_property type; + Lisp_Object type; { Lisp_Object prop, lispy_position, lispy_buffer; int old_begv, old_zv, old_begv_byte, old_zv_byte; @@ -2198,9 +2196,7 @@ get_local_map (position, buffer, type) --position; XSETFASTINT (lispy_position, position); XSETBUFFER (lispy_buffer, buffer); - prop = Fget_char_property (lispy_position, - type == keymap ? Qkeymap : Qlocal_map, - lispy_buffer); + prop = Fget_char_property (lispy_position, type, lispy_buffer); BUF_BEGV (buffer) = old_begv; BUF_ZV (buffer) = old_zv; @@ -2212,7 +2208,7 @@ get_local_map (position, buffer, type) if (CONSP (prop)) return prop; - if (type == keymap) + if (EQ (type, Qkeymap)) return Qnil; else return buffer->keymap; |