]> code.delx.au - gnu-emacs/commitdiff
Dired-X fix for bug#5216.
authorGlenn Morris <rgm@gnu.org>
Thu, 24 Feb 2011 03:59:04 +0000 (19:59 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 24 Feb 2011 03:59:04 +0000 (19:59 -0800)
* lisp/dired-x.el (dired-hack-local-variables):
Handle interrupts during hacking local variables.

lisp/ChangeLog
lisp/dired-x.el

index 28d09e7b2c8141500299c4637b388605b4cc1463..6ce81a9214a0484bb07fb7e25632d3a9518b6ccc 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-24  Glenn Morris  <rgm@gnu.org>
 
+       * dired-x.el (dired-hack-local-variables):
+       Handle interrupts during hacking local variables.  (Bug#5216)
+
        * emacs-lisp/autoload.el (autoload-save-buffers)
        (autoload-find-destination, update-directory-autoloads):
        Avoid prompts when updating autoloads.
index dcf8906976b8172cfa93022802dbb5d595fd924e..ce07676fc99e5687be626035fe32e6c86ca6f998 100644 (file)
@@ -774,12 +774,13 @@ See also `dired-enable-local-variables'."
            (insert "\^L\n")
            (insert-file-contents dired-local-variables-file))
          ;; Hack 'em.
-         (let ((buffer-file-name dired-local-variables-file))
-           (hack-local-variables))
+         (unwind-protect
+             (let ((buffer-file-name dired-local-variables-file))
+               (hack-local-variables))
+           ;; Delete this stuff: `eobp' is used to find last subdir by dired.el.
+           (delete-region opoint (point-max)))
          ;; Make sure that the modeline shows the proper information.
-         (dired-sort-set-modeline)
-         ;; Delete this stuff: `eobp' is used to find last subdir by dired.el.
-         (delete-region opoint (point-max)))))
+         (dired-sort-set-modeline))))
 
 (make-obsolete 'dired-hack-local-variables
                'hack-dir-local-variables-non-file-buffer "24.1")