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
86f0d932
Commit
86f0d932
authored
Mar 14, 2009
by
Stefan Monnier
Browse files
(undo): Don't loop when encountering empty undo records.
parent
7dae1ce2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/simple.el
lisp/simple.el
+7
-3
No files found.
lisp/ChangeLog
View file @
86f0d932
2009-03-14 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (undo): Don't loop when encountering empty undo records.
2009-03-13 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode-map): Bind RET to image-next-line.
...
...
lisp/simple.el
View file @
86f0d932
...
...
@@ -1682,9 +1682,13 @@ as an argument limits undo to changes within the current region."
;; In the ordinary case (not within a region), map the redo
;; record to the following undos.
;; I don't know how to do that in the undo-in-region case.
(puthash buffer-undo-list
(if undo-in-region t pending-undo-list)
undo-equiv-table)
(let ((list buffer-undo-list))
;; Strip any leading undo boundaries there might be, like we do
;; above when checking.
(while (eq (car list) nil)
(setq list (cdr list)))
(puthash list (if undo-in-region t pending-undo-list)
undo-equiv-table))
;; Don't specify a position in the undo record for the undo command.
;; Instead, undoing this should move point to where the change is.
(let ((tail buffer-undo-list)
...
...
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