aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-02-01 23:37:07 +0000
committerChong Yidong2008-02-01 23:37:07 +0000
commit6613bf7ab8908affe84741035f9a744fa25fc9e2 (patch)
tree5ed9182edde120e0be26021b1f08f38c6f3ff1ef
parent62ef651999f2ea7bcb0c1ecc492d3de3e0c0c79e (diff)
downloademacs-6613bf7ab8908affe84741035f9a744fa25fc9e2.tar.gz
emacs-6613bf7ab8908affe84741035f9a744fa25fc9e2.zip
Undo last change.
(next-file): Improve revert message.
-rw-r--r--lisp/progmodes/etags.el30
1 files changed, 13 insertions, 17 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index d69d1de6cdc..fcc05b14d6c 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1629,14 +1629,12 @@ where they were found."
1629 (and (search-forward "\177" (save-excursion (end-of-line) (point)) t) 1629 (and (search-forward "\177" (save-excursion (end-of-line) (point)) t)
1630 (re-search-backward re bol t))))) 1630 (re-search-backward re bol t)))))
1631 1631
1632(defcustom tags-loop-revert-buffers 'ask 1632(defcustom tags-loop-revert-buffers nil
1633 "Whether the tags-scanning loop should reread changed files. 1633 "*Non-nil means tags-scanning loops should offer to reread changed files.
1634This loop normally reads each file into Emacs, but when a file is 1634These loops normally read each file into Emacs, but when a file
1635already visited, it uses the existing buffer. 1635is already visited, they use the existing buffer.
1636If this variable is nil, the loop uses the existing buffer even 1636When this flag is non-nil, they offer to revert the existing buffer
1637if the file has changed since you visited it. 1637in the case where the file has changed since you visited it."
1638If the value is `ask', the loop offers to revert the buffer.
1639Any other non-nil value means to revert the buffer automatically."
1640 :type 'boolean 1638 :type 'boolean
1641 :group 'etags) 1639 :group 'etags)
1642 1640
@@ -1698,16 +1696,14 @@ if the file was newly read in, the value is the filename."
1698 ;; if the files have changed on disk. 1696 ;; if the files have changed on disk.
1699 (and buffer tags-loop-revert-buffers 1697 (and buffer tags-loop-revert-buffers
1700 (not (verify-visited-file-modtime buffer)) 1698 (not (verify-visited-file-modtime buffer))
1701 (or (not (eq tags-loop-revert-buffers 'ask)) 1699 (y-or-n-p
1702 noninteractive 1700 (format
1703 (y-or-n-p 1701 (if (buffer-modified-p buffer)
1704 (format 1702 "File %s changed on disk. Discard your edits? "
1705 (if (buffer-modified-p buffer) 1703 "File %s changed on disk. Reread from disk? ")
1706 "File %s changed on disk. Discard your edits? " 1704 next))
1707 "File %s changed on disk. Reread from disk? ")
1708 next)))
1709 (with-current-buffer buffer 1705 (with-current-buffer buffer
1710 (revert-buffer t))) 1706 (revert-buffer t t)))
1711 (if (not (and new novisit)) 1707 (if (not (and new novisit))
1712 (set-buffer (find-file-noselect next novisit)) 1708 (set-buffer (find-file-noselect next novisit))
1713 ;; Like find-file, but avoids random warning messages. 1709 ;; Like find-file, but avoids random warning messages.