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
b6e8e8e5
Commit
b6e8e8e5
authored
Dec 21, 2004
by
Richard M. Stallman
Browse files
(undo-outer-limit-truncate): New function.
(undo-outer-limit-function): Use undo-outer-limit-truncate.
parent
d2acc90a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
lisp/simple.el
lisp/simple.el
+11
-0
No files found.
lisp/simple.el
View file @
b6e8e8e5
...
...
@@ -1484,6 +1484,17 @@ is not *inside* the region START...END."
(t
'(0 . 0)))
'(0 . 0)))
;; When the first undo batch in an undo list is longer than undo-outer-limit,
;; this function gets called to ask the user what to do.
;; Garbage collection is inhibited around the call,
;; so it had better not do a lot of consing.
(setq undo-outer-limit-function 'undo-outer-limit-truncate)
(defun undo-outer-limit-truncate (size)
(if (yes-or-no-p (format "
Buffer
%s
undo
info
is
%d
bytes
long
; discard it? "
(
buffer-name
)
size
)
)
(
progn
(
setq
buffer-undo-list
nil
)
t
)
nil
))
(
defvar
shell-command-history
nil
"History list for some commands that read shell commands."
)
...
...
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