summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-09-16 18:42:59 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-09-16 18:42:59 +0200
commit55d3dfaaf8f915f6634208325f3ee5c76e3993b0 (patch)
treec3948eccf8335d776541a5da5ad7f7df084e1c0c
parent02f506baf8f35f10338c0a23bb69b7ef0c535d20 (diff)
downloadorg-mode-55d3dfaaf8f915f6634208325f3ee5c76e3993b0.tar.gz
org-macs: Fix indentation for full-width characters
* lisp/org-macs.el (org-do-remove-indentation): Handle full-width characters. When the least indented line in buffer begins from fullwidth character like 'あ', a Japanese character, `org-do-remove-indentation' doesn't remove indentation at all or removes improperly. e.g. 'あ' with 2 spaces indent -----[buffer begin]----- あ -----[buffer end]----- `org-do-remove-indentation' does nothing in this buffer. Expected result is: -----[buffer begin]----- あ -----[buffer end]----- Reported-by: Yuichiro Hakozaki <sankaku.git@gmail.com> <http://lists.gnu.org/r/emacs-orgmode/2019-09/msg00075.html>
-rw-r--r--lisp/org-macs.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index d9c5e8d..10b339e 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -335,7 +335,7 @@ if it fails."
(let ((min-ind (point-max)))
(save-excursion
(while (re-search-forward "^[ \t]*\\S-" nil t)
- (let ((ind (1- (current-column))))
+ (let ((ind (current-indentation)))
(if (zerop ind) (throw :exit nil)
(setq min-ind (min min-ind ind))))))
min-ind))))