]> git.eshelyaron.com Git - emacs.git/commitdiff
(cancel-change-group): Don't move point.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Feb 2008 15:29:44 +0000 (15:29 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Feb 2008 15:29:44 +0000 (15:29 +0000)
lisp/ChangeLog
lisp/subr.el

index 20554f8442db2f5435c5c2d3b727d453c969aa1a..93b63a00f55f8d2faba555d37246a26acd2880f1 100644 (file)
@@ -1,10 +1,14 @@
+2008-02-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (cancel-change-group): Don't move point.
+
 2008-02-02  Michael Albinus  <michael.albinus@gmx.de>
 
        Sync with Tramp 2.0.57.
 
        * net/tramp.el (tramp-handle-make-auto-save-file-name)
-       (tramp-completion-dissect-file-name, tramp-find-executable): Use
-       `mapc' instead of `mapcar'.
+       (tramp-completion-dissect-file-name, tramp-find-executable):
+       Use `mapc' instead of `mapcar'.
        (tramp-open-connection-setup-interactive-shell): Send only single
        prompt setting commands, in order to avoid double-prompt.
 
 
 2008-01-26  Alan Mackenzie  <acm@muc.de>
 
-       * progmodes/cc-defs.el (c-save-buffer-state): Bind
-       buffer-file-name and buffer-file-truename to nil, to prevent
+       * progmodes/cc-defs.el (c-save-buffer-state):
+       Bind buffer-file-name and buffer-file-truename to nil, to prevent
        primitives generating "buffer is read only" messages.
 
 2008-01-26  Eli Zaretskii  <eliz@gnu.org>
 
 2008-01-16  Alan Mackenzie  <acm@muc.de>
 
-       * progmodes/cc-vars.el (c-constant-symbol): Put this defun inside
-       an eval-and-compile, so as to permit byte-compiling (e.g. in
-       bootstrap).
+       * progmodes/cc-vars.el (c-constant-symbol): Put this defun inside an
+       eval-and-compile, so as to permit byte-compiling (e.g. in bootstrap).
 
 2008-01-16  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/cc-vars.el (c-hanging-braces-alist): Remove the
        obscure non-working fragment ":value c-".
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): prevent a macro
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Prevent a macro
        call inside a struct being recognised as a K&R argument.
 
 2008-01-14  Jason Rumney  <jasonr@gnu.org>
 
 2008-01-12  Eli Zaretskii  <eliz@gnu.org>
 
-       * view.el (view-file-other-window, view-file-other-frame): Don't
-       kill the buffer if it is modified.  Doc fixes.
+       * view.el (view-file-other-window, view-file-other-frame):
+       Don't kill the buffer if it is modified.  Doc fixes.
        (kill-buffer-if-not-modified): New function.
        (view-file): Don't kill the buffer if it is modified.
 
-       * progmodes/ebrowse.el (ebrowse-view-file-other-window): Delete
-       function.
-       (ebrowse-view/find-file-and-search-pattern): Call
-       view-file-other-window instead of ebrowse-view-file-other-window.
+       * progmodes/ebrowse.el (ebrowse-view-file-other-window): Delete.
+       (ebrowse-view/find-file-and-search-pattern):
+       Call view-file-other-window instead of ebrowse-view-file-other-window.
        (ebrowse-view-file-other-frame): Don't call
        current-window-configuration.  Fix second argument in the call to
        view-mode-enter.  Doc fix.
 
 2008-01-10  Dan Nicolaescu  <dann@ics.uci.edu>
 
-       * files.el (safe-local-eval-forms): Mark
-       (add-hook 'write-file-hooks 'time-stamp) as safe.
+       * files.el (safe-local-eval-forms):
+       Mark (add-hook 'write-file-hooks 'time-stamp) as safe.
 
 2008-01-10  Nick Roberts  <nickrob@snap.net.nz>
 
        (verilog-auto-input-ignore-regexp)
        (verilog-auto-inout-ignore-regexp)
        (verilog-auto-output-ignore-regexp)
-       (verilog-auto-unused-ignore-regexp, verilog-typedef-regexp): Add
-       safe-local-variable properties.
+       (verilog-auto-unused-ignore-regexp, verilog-typedef-regexp):
+       Add safe-local-variable properties.
        (verilog-statement-menu, verilog-company)
        (verilog-re-search-forward, verilog-re-search-backward)
        (verilog-error-regexp-add, verilog-end-block-re)
 
 2008-01-07  Nick Roberts  <nickrob@snap.net.nz>
 
-       * progmodes/gdb-ui.el (gud-gdb-command-name): Explain
-       "--annotate=3" option is necessary for the Graphical Interface.
+       * progmodes/gdb-ui.el (gud-gdb-command-name):
+       Explain "--annotate=3" option is necessary for the Graphical Interface.
 
 2008-01-07  Dan Nicolaescu  <dann@ics.uci.edu>
 
-       * vc-hg.el (vc-hg-dir-state): Pass the dir argument to
-       vc-hg-command.
+       * vc-hg.el (vc-hg-dir-state): Pass the dir argument to vc-hg-command.
 
 2008-01-07  Glenn Morris  <rgm@gnu.org>
 
index b4bd4a0150c9c630b37479ccdf6aa3ef881b9fa6..ef908c0a7cba10618be7416377e71dc744961543 100644 (file)
@@ -1871,28 +1871,29 @@ This finishes the change group by accepting its changes as final."
 (defun cancel-change-group (handle)
   "Finish a change group made with `prepare-change-group' (which see).
 This finishes the change group by reverting all of its changes."
-  (dolist (elt handle)
-    (with-current-buffer (car elt)
-      (setq elt (cdr elt))
-      (let ((old-car
-            (if (consp elt) (car elt)))
-           (old-cdr
-            (if (consp elt) (cdr elt))))
-       ;; Temporarily truncate the undo log at ELT.
-       (when (consp elt)
-         (setcar elt nil) (setcdr elt nil))
-       (unless (eq last-command 'undo) (undo-start))
-       ;; Make sure there's no confusion.
-       (when (and (consp elt) (not (eq elt (last pending-undo-list))))
-         (error "Undoing to some unrelated state"))
-       ;; Undo it all.
-       (while (listp pending-undo-list) (undo-more 1))
-       ;; Reset the modified cons cell ELT to its original content.
-       (when (consp elt)
-         (setcar elt old-car)
-         (setcdr elt old-cdr))
-       ;; Revert the undo info to what it was when we grabbed the state.
-       (setq buffer-undo-list elt)))))
+  (save-excursion
+    (dolist (elt handle)
+      (with-current-buffer (car elt)
+        (setq elt (cdr elt))
+        (let ((old-car
+               (if (consp elt) (car elt)))
+              (old-cdr
+               (if (consp elt) (cdr elt))))
+          ;; Temporarily truncate the undo log at ELT.
+          (when (consp elt)
+            (setcar elt nil) (setcdr elt nil))
+          (unless (eq last-command 'undo) (undo-start))
+          ;; Make sure there's no confusion.
+          (when (and (consp elt) (not (eq elt (last pending-undo-list))))
+            (error "Undoing to some unrelated state"))
+          ;; Undo it all.
+          (while (listp pending-undo-list) (undo-more 1))
+          ;; Reset the modified cons cell ELT to its original content.
+          (when (consp elt)
+            (setcar elt old-car)
+            (setcdr elt old-cdr))
+          ;; Revert the undo info to what it was when we grabbed the state.
+          (setq buffer-undo-list elt))))))
 \f
 ;;;; Display-related functions.