aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-29 20:04:54 +0000
committerRichard M. Stallman1996-06-29 20:04:54 +0000
commit11fc9165cdd3155c408fe5ded0aab7be1a149f7f (patch)
treefadb2a441113bbc3ef8bfd17ed906b74bfd5737b
parent6a6b62f802347f8f6bf85497871d33cb0b2f33f5 (diff)
downloademacs-11fc9165cdd3155c408fe5ded0aab7be1a149f7f.tar.gz
emacs-11fc9165cdd3155c408fe5ded0aab7be1a149f7f.zip
(ask-user-about-supersession-help): Change help text.
(ask-user-about-supersession-threat): Add new `r' alternative.
-rw-r--r--lisp/userlock.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/userlock.el b/lisp/userlock.el
index 92bf0bef3b4..7844f4544bf 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -98,7 +98,7 @@ The buffer in question is current when this function is called."
98 (save-window-excursion 98 (save-window-excursion
99 (let (answer) 99 (let (answer)
100 (while (null answer) 100 (while (null answer)
101 (message "%s changed on disk; really edit the buffer? (y, n or C-h) " 101 (message "%s changed on disk; really edit the buffer? (y, n, r or C-h) "
102 (file-name-nondirectory fn)) 102 (file-name-nondirectory fn))
103 (let ((tem (downcase (let ((cursor-in-echo-area t)) 103 (let ((tem (downcase (let ((cursor-in-echo-area t))
104 (read-char))))) 104 (read-char)))))
@@ -108,14 +108,20 @@ The buffer in question is current when this function is called."
108 (cdr (assoc tem '((?n . yield) 108 (cdr (assoc tem '((?n . yield)
109 (?\C-g . yield) 109 (?\C-g . yield)
110 (?y . proceed) 110 (?y . proceed)
111 (?r . revert)
111 (?? . help)))))) 112 (?? . help))))))
112 (cond ((null answer) 113 (cond ((null answer)
113 (beep) 114 (beep)
114 (message "Please type y or n; or ? for help") 115 (message "Please type y, n or r; or ? for help")
115 (sit-for 3)) 116 (sit-for 3))
116 ((eq answer 'help) 117 ((eq answer 'help)
117 (ask-user-about-supersession-help) 118 (ask-user-about-supersession-help)
118 (setq answer nil)) 119 (setq answer nil))
120 ((eq answer 'revert)
121 (revert-buffer nil (not (buffer-modified-p)))
122 ; ask confirmation iff buffer modified
123 (signal 'file-supersession
124 (list "File reverted" fn)))
119 ((eq answer 'yield) 125 ((eq answer 'yield)
120 (signal 'file-supersession 126 (signal 'file-supersession
121 (list "File changed on disk" fn)))))) 127 (list "File changed on disk" fn))))))
@@ -130,6 +136,8 @@ since you last read it in or saved it with this buffer.
130 136
131If you say `y' to go ahead and modify this buffer, 137If you say `y' to go ahead and modify this buffer,
132you risk ruining the work of whoever rewrote the file. 138you risk ruining the work of whoever rewrote the file.
139If you say `r' to revert, the contents of the buffer are refreshed
140from the file on disk.
133If you say `n', the change you started to make will be aborted. 141If you say `n', the change you started to make will be aborted.
134 142
135Usually, you should type `n' and then `M-x revert-buffer', 143Usually, you should type `n' and then `M-x revert-buffer',