aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-01-01 17:06:00 +0000
committerGerd Moellmann2000-01-01 17:06:00 +0000
commit9a74e7e566f04285b5f4e961b9edd0c8ce78bd67 (patch)
tree0db509286f738450f3f36e0af35a67687ec76798 /src
parent518df5c440b75b15837957c0b07340beaaf69608 (diff)
downloademacs-9a74e7e566f04285b5f4e961b9edd0c8ce78bd67.tar.gz
emacs-9a74e7e566f04285b5f4e961b9edd0c8ce78bd67.zip
(Vinhibit_field_text_motion): New variable.
(inhibit-field-text-motion): New DEFVAR_LISP. (Fline_beginning_position, Fline_end_position): Notice field boundaries only if inhibit-field-text-motion is nil.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 3f713f1f134..3f74b3a8753 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -63,6 +63,10 @@ Lisp_Object Vbuffer_access_fontified_property;
63 63
64Lisp_Object Fuser_full_name (); 64Lisp_Object Fuser_full_name ();
65 65
66/* Non-nil means don't stop at field boundary in text motion commands. */
67
68Lisp_Object Vinhibit_field_text_motion;
69
66/* Some static data, and a function to initialize it for each run */ 70/* Some static data, and a function to initialize it for each run */
67 71
68Lisp_Object Vsystem_name; 72Lisp_Object Vsystem_name;
@@ -597,9 +601,11 @@ This function does not move point.")
597 SET_PT_BOTH (orig, orig_byte); 601 SET_PT_BOTH (orig, orig_byte);
598 602
599 /* Return END constrained to the current input field. */ 603 /* Return END constrained to the current input field. */
600 return Fconstrain_to_field (make_number (end), make_number (orig), 604 if (NILP (Vinhibit_field_text_motion))
601 XINT (n) != 1 ? Qt : Qnil, 605 end = Fconstrain_to_field (make_number (end), make_number (orig),
602 Qt); 606 XINT (n) != 1 ? Qt : Qnil,
607 Qt);
608 return end;
603} 609}
604 610
605DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 611DEFUN ("line-end-position", Fline_end_position, Sline_end_position,
@@ -622,8 +628,10 @@ This function does not move point.")
622 end_pos = find_before_next_newline (orig, 0, XINT (n) - (XINT (n) <= 0)); 628 end_pos = find_before_next_newline (orig, 0, XINT (n) - (XINT (n) <= 0));
623 629
624 /* Return END_POS constrained to the current input field. */ 630 /* Return END_POS constrained to the current input field. */
625 return 631 if (NILP (Vinhibit_field_text_motion))
626 Fconstrain_to_field (make_number (end_pos), make_number (orig), Qnil, Qt); 632 end_pos = Fconstrain_to_field (make_number (end_pos), make_number (orig),
633 Qnil, Qt);
634 return end_pos;
627} 635}
628 636
629Lisp_Object 637Lisp_Object
@@ -3668,6 +3676,10 @@ syms_of_editfns ()
3668 = intern ("buffer-access-fontify-functions"); 3676 = intern ("buffer-access-fontify-functions");
3669 staticpro (&Qbuffer_access_fontify_functions); 3677 staticpro (&Qbuffer_access_fontify_functions);
3670 3678
3679 DEFVAR_LISP ("inhibit-field-text-motion", &Vinhibit_field_text_motion,
3680 "Non-nil means.text motion commands don't notice fields.");
3681 Vinhibit_field_text_motion = Qnil;
3682
3671 DEFVAR_LISP ("buffer-access-fontify-functions", 3683 DEFVAR_LISP ("buffer-access-fontify-functions",
3672 &Vbuffer_access_fontify_functions, 3684 &Vbuffer_access_fontify_functions,
3673 "List of functions called by `buffer-substring' to fontify if necessary.\n\ 3685 "List of functions called by `buffer-substring' to fontify if necessary.\n\