aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indent.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c
index 3a8cce764df..b6806f628f7 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
23#include "lisp.h" 23#include "lisp.h"
24#include "buffer.h" 24#include "buffer.h"
25#include "charset.h" 25#include "charset.h"
26#include "category.h"
26#include "indent.h" 27#include "indent.h"
27#include "frame.h" 28#include "frame.h"
28#include "window.h" 29#include "window.h"
@@ -680,6 +681,9 @@ position_indentation (pos)
680 } 681 }
681 switch (*p++) 682 switch (*p++)
682 { 683 {
684 case 0240:
685 if (! NILP (current_buffer->enable_multibyte_characters))
686 return column;
683 case ' ': 687 case ' ':
684 column++; 688 column++;
685 break; 689 break;
@@ -687,7 +691,21 @@ position_indentation (pos)
687 column += tab_width - column % tab_width; 691 column += tab_width - column % tab_width;
688 break; 692 break;
689 default: 693 default:
690 return column; 694 if (ASCII_BYTE_P (p[-1])
695 || NILP (current_buffer->enable_multibyte_characters))
696 return column;
697 {
698 int pos = PTR_CHAR_POS (p - 1);
699 int c = FETCH_MULTIBYTE_CHAR (pos);
700 if (CHAR_HAS_CATEGORY (c, ' '))
701 {
702 column++;
703 INC_POS (pos);
704 p = POS_ADDR (pos);
705 }
706 else
707 return column;
708 }
691 } 709 }
692 } 710 }
693} 711}