X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c4f6e489aa5c0d3559f442587b32b01cf7dbdb8d..2b34df4ebc935a834a77b930b35c4a42f7236440:/lisp/smerge-mode.el diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 289c4afd98..95efbc513f 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -367,9 +367,8 @@ according to `smerge-match-conflict'.") ;; during font-locking so inhibit-modification-hooks is non-nil, so we ;; can't just modify the buffer and expect font-lock to be triggered as in: ;; (put-text-property beg end 'smerge-force-highlighting nil) - (let ((modified (buffer-modified-p))) - (remove-text-properties beg end '(fontified nil)) - (restore-buffer-modified-p modified))) + (with-silent-modifications + (remove-text-properties beg end '(fontified nil)))) (defun smerge-popup-context-menu (event) "Pop up the Smerge mode context menu under mouse." @@ -706,7 +705,7 @@ An error is raised if not inside a conflict." ((save-excursion (goto-char mine-start) (re-search-forward smerge-begin-re end t)) - ;; There's a nested conflict and we're after the the beginning + ;; There's a nested conflict and we're after the beginning ;; of the outer one but before the beginning of the inner one. ;; Of course, maybe this is not a nested conflict but in that ;; case it can only be something nastier that we don't know how @@ -1015,9 +1014,10 @@ repeating the command will highlight other 2 parts." (n2 (if (eq part 3) 2 3))) (smerge-ensure-match n1) (smerge-ensure-match n2) - (put-text-property (match-beginning 0) (1+ (match-beginning 0)) - 'smerge-refine-part - (cons (buffer-chars-modified-tick) part)) + (with-silent-modifications + (put-text-property (match-beginning 0) (1+ (match-beginning 0)) + 'smerge-refine-part + (cons (buffer-chars-modified-tick) part))) (smerge-refine-subst (match-beginning n1) (match-end n1) (match-beginning n2) (match-end n2) '((smerge . refine)