mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
misc/emacs: stop go-mode from spuriously marking the buffer modified when it loads
R=golang-dev, sameer, bradfitz CC=golang-dev, jba https://golang.org/cl/6213056
This commit is contained in:
parent
c48ce6930f
commit
c9e698bdfb
1 changed files with 6 additions and 2 deletions
|
|
@ -706,8 +706,12 @@ functions, and some types. It also provides indentation that is
|
|||
;; Remove stale text properties
|
||||
(save-restriction
|
||||
(widen)
|
||||
(remove-text-properties 1 (point-max)
|
||||
'(go-mode-cs nil go-mode-nesting nil)))
|
||||
(let ((modified (buffer-modified-p)))
|
||||
(remove-text-properties 1 (point-max)
|
||||
'(go-mode-cs nil go-mode-nesting nil))
|
||||
;; remove-text-properties marks the buffer modified. undo that if it
|
||||
;; wasn't originally marked modified.
|
||||
(set-buffer-modified-p modified)))
|
||||
|
||||
;; Reset the syntax mark caches
|
||||
(setq go-mode-mark-cs-end 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue