aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-11-09 09:04:52 +0000
committerRichard M. Stallman1996-11-09 09:04:52 +0000
commit7e7c9c4eedf0bfc8cfec3d31a6056e2041e945b1 (patch)
tree85e6462e1098369c72151ee37a68b069a2068f77
parent55b4b20a0ccee22ddecbf830559179ebe222e434 (diff)
downloademacs-7e7c9c4eedf0bfc8cfec3d31a6056e2041e945b1.tar.gz
emacs-7e7c9c4eedf0bfc8cfec3d31a6056e2041e945b1.zip
(revert-buffer): Doc fix.
(wildcard-to-regexp): Don't treat [] as special.
-rw-r--r--lisp/files.el18
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 8828e281e6a..21063197298 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2197,11 +2197,16 @@ If `revert-buffer-function' is used to override the normal revert
2197mechanism, this hook is not used.") 2197mechanism, this hook is not used.")
2198 2198
2199(defun revert-buffer (&optional ignore-auto noconfirm preserve-modes) 2199(defun revert-buffer (&optional ignore-auto noconfirm preserve-modes)
2200 "Replace the buffer text with the text of the visited file on disk. 2200 "Replace current buffer text with the text of the visited file on disk.
2201This undoes all changes since the file was visited or saved. 2201This undoes all changes since the file was visited or saved.
2202With a prefix argument, offer to revert from latest auto-save file, if 2202With a prefix argument, offer to revert from latest auto-save file, if
2203that is more recent than the visited file. 2203that is more recent than the visited file.
2204 2204
2205This command also works for special buffers that contain text which
2206doesn't come from a file, but reflects some other data base instead:
2207for example, Dired buffers and buffer-list buffers. In these cases,
2208it reconstructs the buffer contents from the appropriate data base.
2209
2205When called from Lisp, the first argument is IGNORE-AUTO; only offer 2210When called from Lisp, the first argument is IGNORE-AUTO; only offer
2206to revert from the auto-save file when this is nil. Note that the 2211to revert from the auto-save file when this is nil. Note that the
2207sense of this argument is the reverse of the prefix argument, for the 2212sense of this argument is the reverse of the prefix argument, for the
@@ -2215,10 +2220,11 @@ Optional third argument PRESERVE-MODES non-nil means don't alter
2215the files modes. Normally we reinitialize them using `normal-mode'. 2220the files modes. Normally we reinitialize them using `normal-mode'.
2216 2221
2217If the value of `revert-buffer-function' is non-nil, it is called to 2222If the value of `revert-buffer-function' is non-nil, it is called to
2218do the work. 2223do all the work for this command. Otherwise, the hooks
2224`before-revert-hook' and `after-revert-hook' are run at the beginning
2225and the end, and if `revert-buffer-insert-file-contents-function' is
2226non-nil, it is called instead of rereading visited file contents."
2219 2227
2220The default revert function runs the hook `before-revert-hook' at the
2221beginning and `after-revert-hook' at the end."
2222 ;; I admit it's odd to reverse the sense of the prefix argument, but 2228 ;; I admit it's odd to reverse the sense of the prefix argument, but
2223 ;; there is a lot of code out there which assumes that the first 2229 ;; there is a lot of code out there which assumes that the first
2224 ;; argument should be t to avoid consulting the auto-save file, and 2230 ;; argument should be t to avoid consulting the auto-save file, and
@@ -2536,6 +2542,10 @@ by `sh' are supported."
2536 result 2542 result
2537 (concat result 2543 (concat result
2538 (cond 2544 (cond
2545 ((and (eq ch ?\[)
2546 (< (1+ i) len)
2547 (eq (aref wildcard (1+ i)) ?\]))
2548 "\\[")
2539 ((eq ch ?\[) ; [...] maps to regexp char class 2549 ((eq ch ?\[) ; [...] maps to regexp char class
2540 (progn 2550 (progn
2541 (setq i (1+ i)) 2551 (setq i (1+ i))