comparison src/syntax.c @ 27079:638b309011d9

(Fforward_word): Notice field boundaries only if inhibit-field-text-motion is nil.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 01 Jan 2000 17:06:50 +0000
parents b7438760079b
children b1afaefff576
comparison
equal deleted inserted replaced
27078:bedae2f61170 27079:638b309011d9
1220 1220
1221 DEFUN ("forward-word", Fforward_word, Sforward_word, 1, 1, "p", 1221 DEFUN ("forward-word", Fforward_word, Sforward_word, 1, 1, "p",
1222 "Move point forward ARG words (backward if ARG is negative).\n\ 1222 "Move point forward ARG words (backward if ARG is negative).\n\
1223 Normally returns t.\n\ 1223 Normally returns t.\n\
1224 If an edge of the buffer or a field boundary is reached, point is left there\n\ 1224 If an edge of the buffer or a field boundary is reached, point is left there\n\
1225 and the function returns nil.") 1225 and the function returns nil. Field boundaries are not noticed if\n\
1226 `inhibit-field-text-motion' is non-nil.")
1226 (count) 1227 (count)
1227 Lisp_Object count; 1228 Lisp_Object count;
1228 { 1229 {
1229 int orig_val, val; 1230 int orig_val, val;
1230 CHECK_NUMBER (count, 0); 1231 CHECK_NUMBER (count, 0);
1232 val = orig_val = scan_words (PT, XINT (count)); 1233 val = orig_val = scan_words (PT, XINT (count));
1233 if (! orig_val) 1234 if (! orig_val)
1234 val = XINT (count) > 0 ? ZV : BEGV; 1235 val = XINT (count) > 0 ? ZV : BEGV;
1235 1236
1236 /* Avoid jumping out of an input field. */ 1237 /* Avoid jumping out of an input field. */
1237 val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), 1238 if (NILP (Vinhibit_field_text_motion))
1238 Qt, Qnil)); 1239 val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
1240 Qt, Qnil));
1239 1241
1240 SET_PT (val); 1242 SET_PT (val);
1241 return (val == orig_val ? Qt : Qnil); 1243 return val == orig_val ? Qt : Qnil;
1242 } 1244 }
1243 1245
1244 Lisp_Object skip_chars (); 1246 Lisp_Object skip_chars ();
1245 1247
1246 DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, 1248 DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0,