emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap failure


From: Juanma Barranquero
Subject: Re: bootstrap failure
Date: Fri, 7 May 2010 02:14:05 +0200

On Fri, May 7, 2010 at 01:50, Angelo Graziosi <address@hidden> wrote:

> So, even enabling scroll-bars, the trunk bootstrap fails. :(

It's not related to the scrollbars, but the auto-save-mode change, as
Stephen pointed out.

I think just reverting this part of the commit is enough to bootstrap.

    Juanma


=== modified file 'lisp/files.el'
--- lisp/files.el       2010-05-06 23:14:54 +0000
+++ lisp/files.el       2010-05-06 02:53:56 +0000
@@ -5150,29 +5150,25 @@
         (kill-buffer-ask buffer)))))


-(defun auto-save-mode (arg)
+(define-minor-mode auto-save-mode
   "Toggle auto-saving of contents of current buffer.
 With prefix argument ARG, turn auto-saving on if positive, else off."
-  (interactive "P")
-  (setq buffer-auto-save-file-name
-        (and (if (null arg)
-                (or (not buffer-auto-save-file-name)
-                    ;; If auto-save is off because buffer has shrunk,
-                    ;; then toggling should turn it on.
-                    (< buffer-saved-size 0))
-              (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0))))
-            (if (and buffer-file-name auto-save-visited-file-name
-                     (not buffer-read-only))
-                buffer-file-name
-              (make-auto-save-file-name))))
+  :variable ((and buffer-auto-save-file-name
+                  ;; If auto-save is off because buffer has shrunk,
+                  ;; then toggling should turn it on.
+                  (>= buffer-saved-size 0))
+             . (lambda (val)
+                 (setq buffer-auto-save-file-name
+                       (cond
+                        ((null val) nil)
+                        ((and buffer-file-name auto-save-visited-file-name
+                              (not buffer-read-only))
+                         buffer-file-name)
+                        (t (make-auto-save-file-name))))))
   ;; If -1 was stored here, to temporarily turn off saving,
   ;; turn it back on.
   (and (< buffer-saved-size 0)
-       (setq buffer-saved-size 0))
-  (if (called-interactively-p 'interactive)
-      (message "Auto-save %s (in this buffer)"
-              (if buffer-auto-save-file-name "on" "off")))
-  buffer-auto-save-file-name)
+       (setq buffer-saved-size 0)))

 (defun rename-auto-save-file ()
   "Adjust current buffer's auto save file name for current conditions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]