Mercurial > emacs
comparison src/syntax.c @ 26060:6edf64bf5e22
(Fforward_word): Supply new ESCAPE_FROM_EDGE parameter
to Fconstrain_to_field.
(Fforward_word): Likewise.
Constrain to any field.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 17 Oct 1999 12:56:25 +0000 |
parents | 21925339c7d2 |
children | 1cbb1b30793d |
comparison
equal
deleted
inserted
replaced
26059:2a7f35e0072b | 26060:6edf64bf5e22 |
---|---|
1 /* GNU Emacs routines to deal with syntax tables; also word and list parsing. | 1 /* GNU Emacs routines to deal with syntax tables; also word and list parsing. |
2 Copyright (C) 1985, 87, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GNU Emacs. | 4 This file is part of GNU Emacs. |
5 | 5 |
6 GNU Emacs is free software; you can redistribute it and/or modify | 6 GNU Emacs is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
1234 { | 1234 { |
1235 SET_PT (XINT (count) > 0 ? ZV : BEGV); | 1235 SET_PT (XINT (count) > 0 ? ZV : BEGV); |
1236 return Qnil; | 1236 return Qnil; |
1237 } | 1237 } |
1238 | 1238 |
1239 /* If in a mini-buffer and moving backwards, stop at the end of the | 1239 /* Avoid jumping out of an input field. */ |
1240 prompt. This prevents accidentially moving into the read-only | 1240 val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), |
1241 prompt. */ | 1241 Qt, Qnil)); |
1242 if (INTEGERP (current_buffer->prompt_end_charpos) | 1242 |
1243 && (prompt_end = XINT (current_buffer->prompt_end_charpos), | |
1244 ((PT > prompt_end && val < prompt_end) | |
1245 || (PT < prompt_end && val > prompt_end)))) | |
1246 val = prompt_end; | |
1247 | |
1248 SET_PT (val); | 1243 SET_PT (val); |
1249 return Qt; | 1244 return Qt; |
1250 } | 1245 } |
1251 | 1246 |
1252 Lisp_Object skip_chars (); | 1247 Lisp_Object skip_chars (); |