comparison src/indent.c @ 573:f0ffd1764382

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Thu, 12 Mar 1992 03:48:12 +0000
parents 937bccff8155
children 0085dcbad4bd
comparison
equal deleted inserted replaced
572:0c2e4ee42304 573:f0ffd1764382
1 /* Indentation functions. 1 /* Indentation functions.
2 Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 1987, 1988, 1992 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
342 342
343 /* If a tab char made us overshoot, change it to spaces 343 /* If a tab char made us overshoot, change it to spaces
344 and scan through it again. */ 344 and scan through it again. */
345 if (!NILP (force) && col > goal && c == '\t' && prev_col < goal) 345 if (!NILP (force) && col > goal && c == '\t' && prev_col < goal)
346 { 346 {
347 int old_point;
348
347 del_range (point - 1, point); 349 del_range (point - 1, point);
348 Findent_to (make_number (col - 1)); 350 Findent_to (make_number (goal), Qnil);
349 insert_char (' '); 351 old_point = point;
350 goto retry; 352 Findent_to (make_number (col), Qnil);
353 SET_PT (old_point);
351 } 354 }
352 355
353 /* If line ends prematurely, add space to the end. */ 356 /* If line ends prematurely, add space to the end. */
354 if (col < goal && !NILP (force)) 357 if (col < goal && !NILP (force))
355 Findent_to (make_number (col = goal)); 358 Findent_to (make_number (col = goal));