aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-12 11:18:20 +0000
committerGerd Moellmann2001-01-12 11:18:20 +0000
commit2b4b027f3a0e46f42b306b758446970a0a1c0c43 (patch)
tree1c2a768ab12f750f5986d807ff3f4d36108b29fd /src
parent24a40fbb28b6873892208e55954527e72fb8b95e (diff)
downloademacs-2b4b027f3a0e46f42b306b758446970a0a1c0c43.tar.gz
emacs-2b4b027f3a0e46f42b306b758446970a0a1c0c43.zip
(get_local_map): Change TYPE to Lisp_Object.
Diffstat (limited to 'src')
-rw-r--r--src/intervals.c18
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)
2161 return 1; 2161 return 1;
2162} 2162}
2163 2163
2164/* If TYPE is `keymap', return the map specified by the `keymap' 2164/* Return the proper local keymap TYPE for position POSITION in
2165 property at POSITION in BUFFER or nil. 2165 BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map
2166 2166 specified by the PROP property, if any. Otherwise, if TYPE is
2167 Otherwise return the proper local map for position POSITION in 2167 `local-map' use BUFFER's local map. */
2168 BUFFER. Use the map specified by the local-map property, if any.
2169 Otherwise, use BUFFER's local map. */
2170 2168
2171Lisp_Object 2169Lisp_Object
2172get_local_map (position, buffer, type) 2170get_local_map (position, buffer, type)
2173 register int position; 2171 register int position;
2174 register struct buffer *buffer; 2172 register struct buffer *buffer;
2175 enum map_property type; 2173 Lisp_Object type;
2176{ 2174{
2177 Lisp_Object prop, lispy_position, lispy_buffer; 2175 Lisp_Object prop, lispy_position, lispy_buffer;
2178 int old_begv, old_zv, old_begv_byte, old_zv_byte; 2176 int old_begv, old_zv, old_begv_byte, old_zv_byte;
@@ -2198,9 +2196,7 @@ get_local_map (position, buffer, type)
2198 --position; 2196 --position;
2199 XSETFASTINT (lispy_position, position); 2197 XSETFASTINT (lispy_position, position);
2200 XSETBUFFER (lispy_buffer, buffer); 2198 XSETBUFFER (lispy_buffer, buffer);
2201 prop = Fget_char_property (lispy_position, 2199 prop = Fget_char_property (lispy_position, type, lispy_buffer);
2202 type == keymap ? Qkeymap : Qlocal_map,
2203 lispy_buffer);
2204 2200
2205 BUF_BEGV (buffer) = old_begv; 2201 BUF_BEGV (buffer) = old_begv;
2206 BUF_ZV (buffer) = old_zv; 2202 BUF_ZV (buffer) = old_zv;
@@ -2212,7 +2208,7 @@ get_local_map (position, buffer, type)
2212 if (CONSP (prop)) 2208 if (CONSP (prop))
2213 return prop; 2209 return prop;
2214 2210
2215 if (type == keymap) 2211 if (EQ (type, Qkeymap))
2216 return Qnil; 2212 return Qnil;
2217 else 2213 else
2218 return buffer->keymap; 2214 return buffer->keymap;