# HG changeset patch # User Richard M. Stallman # Date 757342212 0 # Node ID 09148c696fa2fb44d7eb63516b85ac10eab6d7f4 # Parent 95ef894116354a6f202fda70ef3a1759bdb58cf1 (save-some-buffers): Reinsert lost code to save abbrevs. diff -r 95ef89411635 -r 09148c696fa2 lisp/files.el --- a/lisp/files.el Fri Dec 31 12:42:06 1993 +0000 +++ b/lisp/files.el Fri Dec 31 12:50:12 1993 +0000 @@ -1527,39 +1527,47 @@ as well as about file buffers." (interactive "P") (save-window-excursion - (if (zerop (map-y-or-n-p - (function - (lambda (buffer) - (and (buffer-modified-p buffer) - (or - (buffer-file-name buffer) - (and exiting - (progn - (set-buffer buffer) - (and buffer-offer-save (> (buffer-size) 0))))) - (if arg - t - (if (buffer-file-name buffer) - (format "Save file %s? " - (buffer-file-name buffer)) - (format "Save buffer %s? " - (buffer-name buffer))))))) - (function - (lambda (buffer) - (set-buffer buffer) - (save-buffer))) - (buffer-list) - '("buffer" "buffers" "save") - (list (list ?\C-r (lambda (buf) - (view-buffer buf) - (setq view-exit-action - '(lambda (ignore) - (exit-recursive-edit))) - (recursive-edit) - ;; Return nil to ask about BUF again. - nil) - "display the current buffer")) - )) + (or (not (zerop (map-y-or-n-p + (function + (lambda (buffer) + (and (buffer-modified-p buffer) + (or + (buffer-file-name buffer) + (and exiting + (progn + (set-buffer buffer) + (and buffer-offer-save (> (buffer-size) 0))))) + (if arg + t + (if (buffer-file-name buffer) + (format "Save file %s? " + (buffer-file-name buffer)) + (format "Save buffer %s? " + (buffer-name buffer))))))) + (function + (lambda (buffer) + (set-buffer buffer) + (save-buffer))) + (buffer-list) + '("buffer" "buffers" "save") + (list (list ?\C-r (lambda (buf) + (view-buffer buf) + (setq view-exit-action + '(lambda (ignore) + (exit-recursive-edit))) + (recursive-edit) + ;; Return nil to ask about BUF again. + nil) + "display the current buffer")) + ))) + (and save-abbrevs abbrevs-changed + (progn + (if (or arg + (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name))) + (write-abbrev-file nil)) + ;; Don't keep bothering user if he says no. + (setq abbrevs-changed nil) + t)) (message "(No files need saving)")))) (defun not-modified (&optional arg)