Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6272cd3f
Commit
6272cd3f
authored
Feb 01, 2008
by
Chong Yidong
Browse files
(tags-loop-revert-buffers): Value `ask' means to query the user interactively.
(next-file): Implement it.
parent
bee68a7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
lisp/progmodes/etags.el
lisp/progmodes/etags.el
+16
-6
No files found.
lisp/progmodes/etags.el
View file @
6272cd3f
...
...
@@ -1629,12 +1629,14 @@ where they were found."
(and (search-forward "\177" (save-excursion (end-of-line) (point)) t)
(re-search-backward re bol t)))))
(defcustom tags-loop-revert-buffers nil
"*Non-nil means tags-scanning loops should offer to reread changed files.
These loops normally read each file into Emacs, but when a file
is already visited, they use the existing buffer.
When this flag is non-nil, they offer to revert the existing buffer
in the case where the file has changed since you visited it."
(defcustom tags-loop-revert-buffers 'ask
"Whether the tags-scanning loop should reread changed files.
This loop normally reads each file into Emacs, but when a file is
already visited, it uses the existing buffer.
If this variable is nil, the loop uses the existing buffer even
if the file has changed since you visited it.
If the value is `ask', the loop offers to revert the buffer.
Any other non-nil value means to revert the buffer automatically."
:type 'boolean
:group 'etags)
...
...
@@ -1696,6 +1698,14 @@ if the file was newly read in, the value is the filename."
;; if the files have changed on disk.
(and buffer tags-loop-revert-buffers
(not (verify-visited-file-modtime buffer))
(or (not (eq tags-loop-revert-buffers 'ask))
noninteractive
(y-or-n-p
(format
(if (buffer-modified-p buffer)
"File %s changed on disk. Discard your edits? "
"File %s changed on disk. Reread from disk? ")
next)))
(with-current-buffer buffer
(revert-buffer t)))
(if (not (and new novisit))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment