changeset: 5249:d4fae3ebf26a
tag: tip
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Fri Aug 20 13:04:54 2010 +0200
files: lisp/ChangeLog lisp/files.el
description:
Add `save-some-buffers-action-alist'.
2010-08-20 Mike Sperber <mike(a)xemacs.org>
* files.el (save-some-buffers-action-alist): Add.
(save-some-buffers-1): Use (synching with (GPLv2) FSF Emacs.
diff -r 9d8aaa5ac16e -r d4fae3ebf26a lisp/ChangeLog
--- a/lisp/ChangeLog Sat Aug 21 19:03:15 2010 +0100
+++ b/lisp/ChangeLog Fri Aug 20 13:04:54 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-20 Mike Sperber <mike(a)xemacs.org>
+
+ * files.el (save-some-buffers-action-alist): Add.
+ (save-some-buffers-1): Use (synching with (GPLv2) FSF Emacs.
+
2010-08-18 Mike Sperber <mike(a)xemacs.org>
* files.el (diff-files-for-recover): Abstract this out out
diff -r 9d8aaa5ac16e -r d4fae3ebf26a lisp/files.el
--- a/lisp/files.el Sat Aug 21 19:03:15 2010 +0100
+++ b/lisp/files.el Fri Aug 20 13:04:54 2010 +0200
@@ -3086,6 +3086,45 @@
;; over to the next unsaved buffer when calling `d'.
nil)
+(defvar save-some-buffers-action-alist
+ ;;instead of this we just say "yes all", "no all", etc.
+ ;;"save all the rest"
+ ;;"save only this buffer" "save no more buffers")
+ ;; this is rather bogus. --ben
+ ;; (it makes the dialog box too big, and you get an error
+ ;; "wrong type argument: framep, nil" when you hit q after
+ ;; choosing the option from the dialog box)
+
+ ;; We should fix the dialog box rather than disabling
+ ;; this! --hniksic
+ (list (list ?\C-r (lambda (buf)
+ ;; #### FSF has an EXIT-ACTION argument
+ ;; to `view-buffer'.
+ (view-buffer buf
+; (function
+; (lambda (ignore)
+; (exit-recursive-edit))))
+ )
+ (with-boundp 'view-exit-action
+ (setq view-exit-action
+ (lambda (ignore)
+ (exit-recursive-edit))))
+ (recursive-edit)
+ ;; Return nil to ask about BUF again.
+ nil)
+ "%_Display Buffer")
+ (list ?d (lambda (buf)
+ (save-window-excursion (diff-buffer-with-file buf))
+ (view-buffer (get-buffer-create "*File Diff*") t)
+ (with-boundp 'view-exit-action
+ (setq view-exit-action
+ (lambda (ignore)
+ (exit-recursive-edit))))
+ (recursive-edit)
+ ;; Return nil to ask about BUF again.
+ nil)
+ "View %_Changes in Buffer")))
+
(defun diff-files-for-recover (purpose file-1 file-2
failed-file-1 failed-file-2
coding-system)
@@ -3215,32 +3254,7 @@
(error nil)))
(buffer-list)
'("buffer" "buffers" "save")
- ;;instead of this we just say "yes all", "no all", etc.
- ;;"save all the rest"
- ;;"save only this buffer" "save no more buffers")
- ;; this is rather bogus. --ben
- ;; (it makes the dialog box too big, and you get an error
- ;; "wrong type argument: framep, nil" when you hit q after
- ;; choosing the option from the dialog box)
-
- ;; We should fix the dialog box rather than disabling
- ;; this! --hniksic
- (list (list ?\C-r (lambda (buf)
- ;; #### FSF has an EXIT-ACTION argument
- ;; to `view-buffer'.
- (view-buffer buf
-; (function
-; (lambda (ignore)
-; (exit-recursive-edit))))
- )
- (with-boundp 'view-exit-action
- (setq view-exit-action
- (lambda (ignore)
- (exit-recursive-edit))))
- (recursive-edit)
- ;; Return nil to ask about BUF again.
- nil)
- "%_Display Buffer"))))
+ save-some-buffers-action-alist))
(abbrevs-done
(and save-abbrevs abbrevs-changed
(progn
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-patches