diff options
| author | Karl Heuer | 1994-03-23 22:30:22 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-23 22:30:22 +0000 |
| commit | dd675b05fa02aed16160f15cd26df6519d94d206 (patch) | |
| tree | 399c16318df69f62c218b1b8642de41d1305289d /src/intervals.c | |
| parent | ab9f008dfcc7647d3b621557b61ba34ed8d9f716 (diff) | |
| download | emacs-dd675b05fa02aed16160f15cd26df6519d94d206.tar.gz emacs-dd675b05fa02aed16160f15cd26df6519d94d206.zip | |
(adjust_intervals_for_insertion, merge_properties_sticky, delete_interval):
Use assignment, not initialization.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/intervals.c b/src/intervals.c index 400ef43d0d6..6c7ce7ee898 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -804,10 +804,11 @@ adjust_intervals_for_insertion (tree, position, length) | |||
| 804 | we check the stickyness property by property. */ | 804 | we check the stickyness property by property. */ |
| 805 | if (END_NONSTICKY_P (prev) || FRONT_STICKY_P (i)) | 805 | if (END_NONSTICKY_P (prev) || FRONT_STICKY_P (i)) |
| 806 | { | 806 | { |
| 807 | Lisp_Object pleft = NULL_INTERVAL_P (prev) ? Qnil : prev->plist; | 807 | Lisp_Object pleft, pright; |
| 808 | Lisp_Object pright = NULL_INTERVAL_P (i) ? Qnil : i->plist; | ||
| 809 | struct interval newi; | 808 | struct interval newi; |
| 810 | 809 | ||
| 810 | pleft = NULL_INTERVAL_P (prev) ? Qnil : prev->plist; | ||
| 811 | pright = NULL_INTERVAL_P (i) ? Qnil : i->plist; | ||
| 811 | newi.plist = merge_properties_sticky (pleft, pright); | 812 | newi.plist = merge_properties_sticky (pleft, pright); |
| 812 | 813 | ||
| 813 | if(! prev) /* i.e. position == BEG */ | 814 | if(! prev) /* i.e. position == BEG */ |
| @@ -894,16 +895,19 @@ Lisp_Object | |||
| 894 | merge_properties_sticky (pleft, pright) | 895 | merge_properties_sticky (pleft, pright) |
| 895 | Lisp_Object pleft, pright; | 896 | Lisp_Object pleft, pright; |
| 896 | { | 897 | { |
| 897 | register Lisp_Object props = Qnil, front = Qnil, rear = Qnil; | 898 | register Lisp_Object props, front, rear; |
| 898 | 899 | Lisp_Object lfront, lrear, rfront, rrear; | |
| 899 | Lisp_Object lfront = textget (pleft, Qfront_sticky); | ||
| 900 | Lisp_Object lrear = textget (pleft, Qrear_nonsticky); | ||
| 901 | Lisp_Object rfront = textget (pright, Qfront_sticky); | ||
| 902 | Lisp_Object rrear = textget (pright, Qrear_nonsticky); | ||
| 903 | |||
| 904 | register Lisp_Object tail1, tail2, sym, lval, rval; | 900 | register Lisp_Object tail1, tail2, sym, lval, rval; |
| 905 | int use_left, use_right; | 901 | int use_left, use_right; |
| 906 | 902 | ||
| 903 | props = Qnil; | ||
| 904 | front = Qnil; | ||
| 905 | rear = Qnil; | ||
| 906 | lfront = textget (pleft, Qfront_sticky); | ||
| 907 | lrear = textget (pleft, Qrear_nonsticky); | ||
| 908 | rfront = textget (pright, Qfront_sticky); | ||
| 909 | rrear = textget (pright, Qrear_nonsticky); | ||
| 910 | |||
| 907 | /* Go through each element of PRIGHT. */ | 911 | /* Go through each element of PRIGHT. */ |
| 908 | for (tail1 = pright; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1))) | 912 | for (tail1 = pright; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1))) |
| 909 | { | 913 | { |
| @@ -1041,7 +1045,8 @@ delete_interval (i) | |||
| 1041 | 1045 | ||
| 1042 | if (ROOT_INTERVAL_P (i)) | 1046 | if (ROOT_INTERVAL_P (i)) |
| 1043 | { | 1047 | { |
| 1044 | Lisp_Object owner = (Lisp_Object) i->parent; | 1048 | Lisp_Object owner; |
| 1049 | owner = (Lisp_Object) i->parent; | ||
| 1045 | parent = delete_node (i); | 1050 | parent = delete_node (i); |
| 1046 | if (! NULL_INTERVAL_P (parent)) | 1051 | if (! NULL_INTERVAL_P (parent)) |
| 1047 | parent->parent = (INTERVAL) owner; | 1052 | parent->parent = (INTERVAL) owner; |