Skip to content

Commit d7b6196

Browse files
yuki3yukawa
authored andcommitted
Do not affect buffer-modified-p.
Not only buffer-undo-list but also buffer-modified-p shouldn't be affected unless text is committed. Closes #254. BUG=#254 TEST=none
1 parent cee212a commit d7b6196

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/mozc_version_template.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MAJOR=2
22
MINOR=17
3-
BUILD=2110
3+
BUILD=2111
44
REVISION=102
55
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
66
# downloaded by NaCl Mozc.

src/unix/emacs/mozc.el

+8-6
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,11 @@ The undo list will not be affected. ARGS defaults to
541541
The return value is a cons which holds two markers which point to the region of
542542
added characters."
543543
(let ((beg (point-marker)))
544-
(mozc-with-undo-list-unchanged
545-
(if args
546-
(apply #'insert args)
547-
(insert mozc-buffer-placeholder-char)))
544+
(mozc-with-buffer-modified-p-unchanged
545+
(mozc-with-undo-list-unchanged
546+
(if args
547+
(apply #'insert args)
548+
(insert mozc-buffer-placeholder-char))))
548549
(cons beg (point-marker))))
549550

550551
(defun mozc-buffer-insert-char (&optional character count)
@@ -563,8 +564,9 @@ added characters."
563564
(defun mozc-buffer-delete-region (region)
564565
"Delete the text in the REGION."
565566
(when region
566-
(mozc-with-undo-list-unchanged
567-
(delete-region (car region) (cdr region)))))
567+
(mozc-with-buffer-modified-p-unchanged
568+
(mozc-with-undo-list-unchanged
569+
(delete-region (car region) (cdr region))))))
568570

569571
(defun mozc-buffer-delete-all-regions (regions)
570572
"Delete each text in the REGIONS.

0 commit comments

Comments
 (0)