]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/files.el: Make revert work with diff-buffer-with-file.
authorBob Rogers <rogers-emacs@rgrjr.dyndns.org>
Mon, 22 Nov 2010 17:57:46 +0000 (12:57 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Nov 2010 17:57:46 +0000 (12:57 -0500)
(diff-buffer-internal): New function extracted from diff-buffer-with-file
(diff-buffer-with-file): Use it.
* lisp/vc/diff.el (diff-into-buffer): New fun, extracted from diff.
(diff): Use it.

Fixes: debbugs:7277
lisp/ChangeLog
lisp/files.el
lisp/vc/diff.el

index 5353efa267a0dbd951f1938a9bb1b5f7ee76828e..4b76ea9c593ea1532c09812cb9cdd0d3a63bf844 100644 (file)
@@ -1,3 +1,11 @@
+2010-11-22  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
+
+       * files.el: Make revert work with diff-buffer-with-file (bug#7277).
+       (diff-buffer-internal): New function extracted from diff-buffer-with-file
+       (diff-buffer-with-file): Use it.
+       * vc/diff.el (diff-into-buffer): New fun, extracted from diff.
+       (diff): Use it.
+
 2010-11-22  Tassilo Horn  <tassilo@member.fsf.org>
 
        * textmodes/reftex-ref.el (reftex-goto-label): Use the current
@@ -18,8 +26,8 @@
 
 2010-11-21  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 
-       * progmodes/python.el (python-font-lock-keywords): Highlight
-       top-level augmented assignments (Bug#6445).
+       * progmodes/python.el (python-font-lock-keywords):
+       Highlight top-level augmented assignments (Bug#6445).
 
 2010-11-21  Jan Djärv  <jan.h.d@swipnet.se>
 
        package-alist, to avoid loading inefficiencies.
        (package-built-in-p): Make VERSION optional, and treat it as a
        minimum acceptable version.
-       (package-activate): Search separately for built-in packages.  Emit
-       a warning if a dependency fails.
+       (package-activate): Search separately for built-in packages.
+       Emit a warning if a dependency fails.
        (define-package): Handle most common case, where there is no
        obsolete package, first.
        (package-compute-transaction): Print required version in error.
        (package--initialized): New variable.
        (list-packages): Use it.
        (package-initialize): Optional arg NO-ACTIVATE.  Don't put
-       built-in packages in packages-alist; keep it separate.  Set
-       package--initialized.
+       built-in packages in packages-alist; keep it separate.
+       Set package--initialized.
        (describe-package): Avoid activating packages as a side-effect.
        Search separately for built-in packages.
        (describe-package-1): Handle the case where an elpa package is
        simultaneously built-in and available/installed.
-       (package-installed-p, package--generate-package-list): Search
-       separately for built-in packages.
+       (package-installed-p, package--generate-package-list):
+       Search separately for built-in packages.
        (package-load-descriptor): Doc fix.
 
 2010-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
        * startup.el (command-line): Search for package directories, and
        don't load package.el if none are found.
 
-       * emacs-lisp/package.el (describe-package, list-packages): Call
-       package-initialize if it has not been called yet.
+       * emacs-lisp/package.el (describe-package, list-packages):
+       Call package-initialize if it has not been called yet.
 
 2010-10-30  Alan Mackenzie  <acm@muc.de>
 
        character pins, bug264.  Reported by Michael Laajanen.
        (verilog-auto-inst, verilog-read-decls, verilog-read-sub-decls)
        (verilog-read-sub-decls-in-interfaced, verilog-read-sub-decls-sig)
-       (verilog-subdecls-get-interfaced, verilog-subdecls-new): Support
-       interfaces with AUTOINST, bug270.  Reported by Luis Gutierrez.
+       (verilog-subdecls-get-interfaced, verilog-subdecls-new):
+       Support interfaces with AUTOINST, bug270.  Reported by Luis Gutierrez.
        (verilog-pretty-expr): Fix interactive arguments, bug272.
        Reported by Mark Johnson.
        (verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp):
        (verilog-auto-sense-sigs, verilog-read-always-signals)
        (verilog-read-always-signals-recurse): Fix loop indexes being
        AUTORESET. AUTORESET now assumes any variables in the
-       initialization section of a for() should be ignored.  Reported by
-       Dan Dever.
+       initialization section of a for() should be ignored.
+       Reported by Dan Dever.
        (verilog-error-font-lock-keywords)
        (verilog-error-regexp-emacs-alist)
        (verilog-error-regexp-xemacs-alist): Fix error detection of
        facemenu-read-color.  Require match in completion.  Doc fix.
 
        * facemenu.el (facemenu-read-color): Alias for read-color.
-       (facemenu-set-foreground, facemenu-set-background): Use
-       read-color.
+       (facemenu-set-foreground, facemenu-set-background):
+       Use read-color.
 
        * frame.el (set-background-color, set-foreground-color)
-       (set-cursor-color, set-mouse-color, set-border-color): Use
-       read-color.
+       (set-cursor-color, set-mouse-color, set-border-color):
+       Use read-color.
 
 2010-10-24  Leo  <sdl.web@gmail.com>
 
 
        * calendar/appt.el (appt-issue-message, appt-visible, appt-msg-window):
        Remove options, obsolete since 22.1.
-       (appt-display-format, appt-display-message): Remove
-       backwards-compatibility code.
+       (appt-display-format, appt-display-message):
+       Remove backwards-compatibility code.
        (appt-check): No longer check appt-issue-message.
        (appt-make-list): No longer autoload it.  Doc fix.  No longer
        activate the package.
        (tramp-compat-call-process): New defuns, moved from tramp.el.
 
        * net/tramp-fish.el (top) Require just 'tramp.  Add objects to
-       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.  Add
-       to `tramp-unload-hook'.  Change call of
+       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
+       Add to `tramp-unload-hook'.  Change call of
        `tramp-compat-decimal-to-octal' to new function name.
        (tramp-fish-method): Make it a defconst.
        (tramp-fish-file-name-p): Make it a defsubst.
        (tramp-gw-open-connection): Set tramp-autoload cookie.
 
        * net/tramp-imap.el (top) Require just 'tramp.  Add objects to
-       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.  Add
-       to `tramp-unload-hook'.  Change checks, whether package can be
+       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
+       Add to `tramp-unload-hook'.  Change checks, whether package can be
        loaded.
        (tramp-imap-file-name-p): Make it a defsubst.
        (tramp-imap-method, tramp-imaps-method)
        (tramp-imap-file-name-p): Set tramp-autoload cookie.
 
        * net/tramp-smb.el (top) Require just 'tramp.  Add objects to
-       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.  Add
-       to `tramp-unload-hook'.  Change checks, whether package can be
+       `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
+       Add to `tramp-unload-hook'.  Change checks, whether package can be
        loaded.  Change call of `tramp-compat-decimal-to-octal' to new
        function name.
        (tramp-smb-tunnel-method): Make it a defconst.
        * term/x-win.el: Update documentation for x-last-selected-text-*.
        (x-last-selected-text-cut, x-last-selected-text-cut-encoded)
        (x-last-cut-buffer-coding, x-cut-buffer-max): Remove.
-       (x-select-text): Remove argument PUSH, update documentation.  Remove
-       cut-buffer code.
+       (x-select-text): Remove argument PUSH, update documentation.
+       Remove cut-buffer code.
        (x-selection-value-internal): Was previously x-selection-value.
        (x-selection-value): Rename from x-cut-buffer-or-selection-value.
-       Update documentation, remove cut-buffer code.  Call
-       x-selection-value-internal.
+       Update documentation, remove cut-buffer code.
+       Call x-selection-value-internal.
        (x-clipboard-yank): Call x-selection-value-internal.
        (x-initialize-window-system): Remove setting of x-cut-buffer-max.
 
        (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
        Implement backup call, when operation on local files fails.
        Use progress reporter.  Flush properties of changed files.
-       (tramp-gvfs-handle-delete-file): Add TRASH arg.  Use
-       `tramp-compat-delete-file'.
+       (tramp-gvfs-handle-delete-file): Add TRASH arg.
+       Use `tramp-compat-delete-file'.
        (tramp-gvfs-handle-expand-file-name): Expand "~/".
        (tramp-gvfs-handle-make-directory): Make more traces.
        (tramp-gvfs-handle-write-region): Protect deleting tmpfile.
        instead of whitespace-line-column (from EmacsWiki).  New version
        13.1.
        (whitespace-style): Added new value 'face.  Adjust docstring.
-       (whitespace-space, whitespace-hspace, whitespace-tab): Adjust
-       foreground property face.
+       (whitespace-space, whitespace-hspace, whitespace-tab):
+       Adjust foreground property face.
        (whitespace-line-column): Adjust docstring and type declaration.
        (whitespace-style-value-list, whitespace-toggle-option-alist)
        (whitespace-help-text): Adjust const initialization.
        (python-shell-prompt-alist)
        (python-shell-continuation-prompt-alist): New options.
        (python--set-prompt-regexp): New function.
-       (inferior-python-mode, run-python, python-shell): Require
-       ansi-color.  Use python--set-prompt-regexp to set the comint
+       (inferior-python-mode, run-python, python-shell):
+       Require ansi-color.  Use python--set-prompt-regexp to set the comint
        prompt based on the Python interpreter.
        (python--prompt-regexp): New var.
        (python-check-comint-prompt)
 
 2010-08-06  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
-       * progmodes/cc-cmds.el (c-mask-paragraph, c-fill-paragraph): Fix
-       for the case that a C style comment has its delimiters alone on
+       * progmodes/cc-cmds.el (c-mask-paragraph, c-fill-paragraph):
+       Fix for the case that a C style comment has its delimiters alone on
        their respective lines.
 
 2010-08-06  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-handle-start-file-process): Set connection
        property "vec".
-       (tramp-process-sentinel): Use it for flushing the cache.  We
-       cannot do it via the process buffer, the buffer could be deleted
+       (tramp-process-sentinel): Use it for flushing the cache.
+       We cannot do it via the process buffer, the buffer could be deleted
        already when running the sentinel.
 
 2010-08-06  Jürgen Hötzel  <juergen@archlinux.org>  (tiny change)
 
 2010-08-05  Eli Zaretskii  <eliz@gnu.org>
 
-       * emacs-lisp/find-gc.el (find-gc-source-files): Rename
-       unexec.c => unexcoff.c.
+       * emacs-lisp/find-gc.el (find-gc-source-files):
+       Rename unexec.c => unexcoff.c.
 
-       * emacs-lisp/authors.el (authors-fixed-entries): Rename
-       unexec.c => unexcoff.c.
+       * emacs-lisp/authors.el (authors-fixed-entries):
+       Rename unexec.c => unexcoff.c.
 
 2010-08-05  Michael Albinus  <michael.albinus@gmx.de>
 
 2010-07-20  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-file-name-handler): Trace 'quit.
-       (tramp-open-connection-setup-interactive-shell): Apply
-       workaround for IRIX64 bug.  Move argument of last
+       (tramp-open-connection-setup-interactive-shell):
+       Apply workaround for IRIX64 bug.  Move argument of last
        `tramp-send-command' where it belongs to.
 
 2010-07-20  Michael Albinus  <michael.albinus@gmx.de>
 2010-07-18  Michael R. Mauger  <mmaug@yahoo.com>
 
        * progmodes/sql.el: Version 2.2.
-       (sql-product, sql-user, sql-database, sql-server, sql-port): Use
-       defcustom :safe keyword rather than putting safe-local-variable
+       (sql-product, sql-user, sql-database, sql-server, sql-port):
+       Use defcustom :safe keyword rather than putting safe-local-variable
        property.
        (sql-password): Use defcustom :risky keyword rather than putting
        risky-local-variable property.
 
 2010-07-10  Aleksei Gusev  <aleksei.gusev@gmail.com>  (tiny change)
 
-       * progmodes/compile.el (compilation-error-regexp-alist-alist): Add
-       regexps for cucumber and ruby.
+       * progmodes/compile.el (compilation-error-regexp-alist-alist):
+       Add regexps for cucumber and ruby.
 
 2010-07-08  Daiki Ueno  <ueno@unixuser.org>
 
 
        * faces.el (x-handle-named-frame-geometry)
        (x-handle-reverse-video, x-create-frame-with-faces)
-       (face-set-after-frame-default, tty-create-frame-with-faces): Don't
-       separately consult default-frame-alist.  It is now passed as the
+       (face-set-after-frame-default, tty-create-frame-with-faces):
+       Don't separately consult default-frame-alist.  It is now passed as the
        PARAMETER argument.
 
 2010-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 
 2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 
-       * dynamic-setting.el (font-setting-change-default-font): Remove
-       call to message.
+       * dynamic-setting.el (font-setting-change-default-font):
+       Remove call to message.
 
 2010-06-28  Kenichi Handa  <handa@m17n.org>
 
        (package-list-packages-internal): Check package-load-list.
        (package-load-descriptor, package-generate-autoloads)
        (package-unpack, package-unpack-single)
-       (package--read-archive-file, package-delete): Use
-       expand-file-name.
+       (package--read-archive-file, package-delete):
+       Use expand-file-name.
 
        * emacs-lisp/package-x.el: New file.  Package uploading
        functionality split out from package.el.
        appt-time-msg-list specify the warning time.
        (appt-add): Add new argument with the warning time.  (Bug#5176)
 
-2010-06-16  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
+2010-06-16  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 
        * vc/vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions
        older than version 1.6.  (Bug#6361)
 
 2010-06-16  Agustín Martín  <agustin.martin@hispalinux.es>
 
-       * textmodes/ispell.el (ispell-dictionary-base-alist): Fix
-       portuguese casechars/not-casechars for missing 'çÇ'.
+       * textmodes/ispell.el (ispell-dictionary-base-alist):
+       Fix portuguese casechars/not-casechars for missing 'çÇ'.
        Suggested by Rolando Pereira (bug#6434).
 
 2010-06-15  Juanma Barranquero  <lekktu@gmail.com>
 
        * facemenu.el (list-colors-sort): Doc fix.
 
-2010-06-15  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
+2010-06-15  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 
        * progmodes/sql.el (sql-connect-mysql): Fix typo.
 
 
 2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 
-       * net/tramp-compat.el (tramp-compat-delete-file): Use
-       `symbol-value' for backward compatibility.
+       * net/tramp-compat.el (tramp-compat-delete-file):
+       Use `symbol-value' for backward compatibility.
 
        * net/tramp.el (tramp-handle-make-symbolic-link)
        (tramp-handle-load)
        (tramp-fish-handle-process-file): Use `delete-file' instead
        of `tramp-compat-delete-file'.
 
-       * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use
-       `delete-file' instead of `tramp-compat-delete-file'.
+       * net/tramp-ftp.el (tramp-ftp-file-name-handler):
+       Use `delete-file' instead of `tramp-compat-delete-file'.
 
        * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
        (tramp-gvfs-handle-write-region): Use `delete-file' instead of
        `tramp-compat-delete-file'.
 
-       * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): Use
-       `delete-file' instead of `tramp-compat-delete-file'.
+       * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file):
+       Use `delete-file' instead of `tramp-compat-delete-file'.
 
        * net/tramp-smb.el (tramp-smb-handle-copy-file)
        (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 
 2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 
-       * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
-       font-lock-constant-face, not obsolete font-lock-reference-face.
+       * progmodes/verilog-mode.el (verilog-type-font-keywords):
+       Use font-lock-constant-face, not obsolete font-lock-reference-face.
 
 2010-05-27  Kenichi Handa  <handa@m17n.org>
 
        * net/tramp.el (tramp-progress-reporter-update): New defun.
        (with-progress-reporter): Use it.
        (tramp-process-actions):
-       * net/tramp-gvfs.el (tramp-gvfs-handler-askquestion): Preserve
-       current message, in order to let progress reporter continue
+       * net/tramp-gvfs.el (tramp-gvfs-handler-askquestion):
+       Preserve current message, in order to let progress reporter continue
        afterwards.  (Bug#6257)
 
 2010-05-25  Glenn Morris  <rgm@gnu.org>
        * bindings.el (global-map): Bind them to right and left arrow keys.
 
        Don't override standard definition of convert-standard-filename.
-       * files.el (convert-standard-filename): Call
-       w32-convert-standard-filename and dos-convert-standard-filename on
+       * files.el (convert-standard-filename):
+       Call w32-convert-standard-filename and dos-convert-standard-filename on
        the corresponding systems.
 
        * w32-fns.el (w32-convert-standard-filename): Rename from
 
        * net/tramp-smb.el (tramp-smb-handle-delete-file): Add FORCE arg.
        (tramp-smb-handle-copy-file, tramp-smb-handle-file-local-copy)
-       (tramp-smb-handle-rename-file, tramp-smb-handle-write-region): Use
-       `tramp-compat-delete-file'.
+       (tramp-smb-handle-rename-file, tramp-smb-handle-write-region):
+       Use `tramp-compat-delete-file'.
 
 2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 
 2010-02-21  Chong Yidong  <cyd@stupidchicken.com>
 
-       * files.el (directory-listing-before-filename-regexp): Use
-       stricter matching for iso-style dates, to avoid false matches with
+       * files.el (directory-listing-before-filename-regexp):
+       Use stricter matching for iso-style dates, to avoid false matches with
        date-like filenames (Bug#5597).
 
        * htmlfontify.el (htmlfontify): Doc fix.
 
 2010-02-19  Chong Yidong  <cyd@stupidchicken.com>
 
-       * isearch.el (isearch-update-post-hook, isearch-update): Revert
-       2010-02-17 change.
+       * isearch.el (isearch-update-post-hook, isearch-update):
+       Revert 2010-02-17 change.
 
 2010-02-19  Ulf Jasper  <ulf.jasper@web.de>
 
        (vc-git-toggle-signoff): Remove function.
        (vc-git-extra-menu-map): Do not bind vc-git-toggle-signoff.
 
-       * term/xterm.el (xterm-maybe-set-dark-background-mode): Rename
-       from xterm-set-background-mode.  Return t if the background mode
+       * term/xterm.el (xterm-maybe-set-dark-background-mode):
+       Rename from xterm-set-background-mode.  Return t if the background mode
        was set.
        (terminal-init-xterm): Move tty-set-up-initial-frame-faces
        earlier, call it again in case the background mode has changed.
 
 2010-01-16  Lennart Borgman  <lennart.borgman@gmail.com>
 
-       * nxml/nxml-mode.el (nxml-extend-after-change-region): Never
-       return t (Bug#3898).
+       * nxml/nxml-mode.el (nxml-extend-after-change-region):
+       Never return t (Bug#3898).
 
 2010-01-16  Frédéric Perrin  <frederic.perrin@resel.fr>  (tiny change)
 
 
 2010-01-12  Glenn Morris  <rgm@gnu.org>
 
-       * mail/emacsbug.el (report-emacs-bug-pretest-address): Set
-       it to bug-gnu-emacs rather than emacs-pretest-bug.
+       * mail/emacsbug.el (report-emacs-bug-pretest-address):
+       Set it to bug-gnu-emacs rather than emacs-pretest-bug.
 
 2010-01-11  Sam Steingold  <sds@gnu.org>
 
 2009-12-29  Dan Nicolaescu  <dann@ics.uci.edu>
 
        Make vc-dir work on subdirectories of the bzr root.
-       * vc-bzr.el (vc-bzr-after-dir-status): Add new argument.  Return
-       file names relative to it.
+       * vc-bzr.el (vc-bzr-after-dir-status): Add new argument.
+       Return file names relative to it.
        (vc-bzr-dir-status, vc-bzr-dir-status-files): Pass the bzr root
        relative directory to vc-bzr-after-dir-status.
 
        (tramp-methods, tramp-find-shell)
        (tramp-open-connection-setup-interactive-shell)
        (tramp-maybe-open-connection): Use it.
-       (tramp-shell-prompt-pattern, tramp-wait-for-output): Handle
-       existence of `#' and `$'.
+       (tramp-shell-prompt-pattern, tramp-wait-for-output):
+       Handle existence of `#' and `$'.
 
-       * net/tramp-fish.el (tramp-fish-maybe-open-connection): Use
-       `tramp-initial-end-of-output'.
+       * net/tramp-fish.el (tramp-fish-maybe-open-connection):
+       Use `tramp-initial-end-of-output'.
 
 2009-12-07  Dan Nicolaescu  <dann@ics.uci.edu>
 
 
 2009-12-06  Ulf Jasper  <ulf.jasper@web.de>
 
-       * xml.el (xml-substitute-numeric-entities): Move
-       newsticker--decode-numeric-entities in newst-backend.el to
+       * xml.el (xml-substitute-numeric-entities):
+       Move newsticker--decode-numeric-entities in newst-backend.el to
        xml-substitute-numeric-entities in xml.el.  (Bug#5008)
        * net/newst-backend.el (newsticker--parse-generic-feed)
        (newsticker--parse-generic-items)
-       (newsticker--decode-numeric-entities): Move
-       newsticker--decode-numeric-entities in newst-backend.el to
+       (newsticker--decode-numeric-entities):
+       Move newsticker--decode-numeric-entities in newst-backend.el to
        xml-substitute-numeric-entities in xml.el.  (Bug#5008)
 
 2009-12-06  Daniel Colascione  <dan.colascione@gmail.com>
 
 2009-12-05  Kevin Ryde  <user42@zip.com.au>
 
-       * textmodes/sgml-mode.el (sgml-lexical-context): Recognise
-       comment-start-skip to comment-end-skip as comment (Bug#4781).
+       * textmodes/sgml-mode.el (sgml-lexical-context):
+       Recognise comment-start-skip to comment-end-skip as comment (Bug#4781).
 
 2009-12-05  Juri Linkov  <juri@jurta.org>
 
        (doc-view-scroll-up-or-next-page)
        (doc-view-scroll-down-or-previous-page)
        (doc-view-next-line-or-next-page)
-       (doc-view-previous-line-or-previous-page): Rename
-       `doc-view-continuous-mode' to `doc-view-continuous'.  (Bug#4896)
+       (doc-view-previous-line-or-previous-page):
+       Rename `doc-view-continuous-mode' to `doc-view-continuous'.  (Bug#4896)
 
 2009-11-30  Juri Linkov  <juri@jurta.org>
 
 
        (verilog-auto-inst, verilog-auto-star-safe)
        (verilog-delete-auto-star-implicit, verilog-read-sub-decls):
-       Fix removing "// Interfaces" when saving .* expansions.  Reported by
-       Pierre-David Pfister.
+       Fix removing "// Interfaces" when saving .* expansions.
+       Reported by Pierre-David Pfister.
 
 2009-11-26  Glenn Morris  <rgm@gnu.org>
 
        (tramp-compat-delete-directory): New defuns.
 
        * net/tramp-fish.el (tramp-fish-handle-delete-directory):
-       * net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory): Use
-       `tramp-compat-delete-directory'.
+       * net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory):
+       Use `tramp-compat-delete-directory'.
 
        * net/tramp-smb.el (tramp-smb-handle-copy-directory)
-       (tramp-smb-handle-delete-directory): Use
-       `tramp-compat-copy-directory' and `tramp-compat-delete-directory'.
+       (tramp-smb-handle-delete-directory):
+       Use `tramp-compat-copy-directory' and `tramp-compat-delete-directory'.
 
        * net/trampver.el: Update release number.
 
 
 2009-10-31  Chong Yidong  <cyd@stupidchicken.com>
 
-       * international/mule-diag.el (list-character-sets-1): Minor
-       message fix (Bug#3526).
+       * international/mule-diag.el (list-character-sets-1):
+       Minor message fix (Bug#3526).
 
-       * progmodes/etags.el (etags-list-tags, etags-tags-apropos): Fix
-       face property (Bug#4834).
+       * progmodes/etags.el (etags-list-tags, etags-tags-apropos):
+       Fix face property (Bug#4834).
        (etags-list-tags, etags-tags-apropos-additional)
        (etags-tags-apropos, tags-select-tags-table): Add follow-link
        property.
 
 2009-10-23  Jay Belanger  <jay.p.belanger@gmail.com>
 
-       * calc/calc.el (math-read-number, math-read-number-simple): Use
-       `save-match-data'.
+       * calc/calc.el (math-read-number, math-read-number-simple):
+       Use `save-match-data'.
 
 2009-10-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 
 2009-09-26  Alan Mackenzie  <acm@muc.de>
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Correct
-       buggy bracketing.  (Bug#4289)
+       * progmodes/cc-engine.el (c-beginning-of-statement-1):
+       Correct buggy bracketing.  (Bug#4289)
 
        * progmodes/cc-langs.el (c-nonlabel-token-key): Allow quoted
        character constants (as case labels).  (Bug#4289)
 
 2009-09-21  Chong Yidong  <cyd@stupidchicken.com>
 
-       * files.el (conf-mode-maybe, magic-fallback-mode-alist): Use
-       nxml-mode instead of xml-mode.
+       * files.el (conf-mode-maybe, magic-fallback-mode-alist):
+       Use nxml-mode instead of xml-mode.
 
 2009-09-21  Kevin Ryde  <user42@zip.com.au>
 
        * net/tramp.el (tramp-handle-insert-directory): Handle "--dired"
        also when adding a new directory.
 
-       * net/tramp-compat.el (tramp-compat-line-beginning-position): New
-       defun.
+       * net/tramp-compat.el (tramp-compat-line-beginning-position):
+       New defun.
 
 2009-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        (gdb-control-current-thread): Interactive setters for
        `gdb-gud-control-all-threads' to use in menu.
        (gdb-show-run-p): Show «Go» when process is not active.
-       (gud-tool-bar-map): Add non-stop/A,T indicator.  Uses
-       gud/thread.xpm and gud/all.xpm.
+       (gud-tool-bar-map): Add non-stop/A,T indicator.
+       Uses gud/thread.xpm and gud/all.xpm.
 
 2009-08-08  Yoni Rabkin  <yoni@rabkins.net>
 
        (gdb-breakpoints-mode-map): Don't assume threads buffer is present.
        (gdb-threads-mode-map): Don't assume breakpoints buffer is present.
        (gdb-disassembly-handler-custom, gdb-stack-list-frames-custom)
-       (gdb-locals-handler-custom, gdb-registers-handler-custom): Thread
-       info in mode name.
+       (gdb-locals-handler-custom, gdb-registers-handler-custom):
+       Thread info in mode name.
        (gdb-registers-mode-map): TAB to switch to locals.
 
 2009-08-08  Eli Zaretskii  <eliz@gnu.org>
 
 2009-08-07  Eli Zaretskii  <eliz@gnu.org>
 
-       * mail/sendmail.el (mail-yank-original): Set
-       buffer-file-coding-system from the one used by the message whose
+       * mail/sendmail.el (mail-yank-original):
+       Set buffer-file-coding-system from the one used by the message whose
        text is yanked.
 
        * calc/calc-graph.el (calc-graph-plot): Set calc-graph-last-device
        to "windows" when "pgnuplot" is used.
-       (calc-graph-command, calc-gnuplot-command, calc-graph-init): Don't
-       call accept-process-output if "pgnuplot" is used.
+       (calc-graph-command, calc-gnuplot-command, calc-graph-init):
+       Don't call accept-process-output if "pgnuplot" is used.
        (calc-graph-init): Don't send -display and -geometry to
        "pgnuplot".  If "pgnuplot" is used, glean gnuplot version by
        running "pgnuplot -V" with shell-command-to-string.
        * progmodes/gdb-mi.el (gdb-thread-number): Initialize with nil.
        (gdb-current-context-command): Do not append --thread if
        `gdb-thread-number' is nil.
-       (gdb-running-threads-count, gdb-stopped-threads-count): New
-       variables.
+       (gdb-running-threads-count, gdb-stopped-threads-count):
+       New variables.
        (gdb-non-stop, gdb-gud-control-all-threads, gdb-switch-reasons)
-       (gdb-stopped-hooks, gdb-switch-when-another-stopped): New
-       customization options.
+       (gdb-stopped-hooks, gdb-switch-when-another-stopped):
+       New customization options.
        (gdb-gud-context-command, gdb-gud-context-call): New wrappers for
        GUD commands.
        (gdb): `gud-def' definitions changed to use `gdb-gud-context-call'.
        * net/tramp-cache.el (tramp-cache-inhibit-cache): New defvar.
        (tramp-get-file-property): Use it.
 
-       * autorevert.el (auto-revert-handler): Allow
-       `auto-revert-tail-mode' for remote files.
+       * autorevert.el (auto-revert-handler):
+       Allow `auto-revert-tail-mode' for remote files.
 
 2009-08-02  Jason Rumney  <jasonr@gnu.org>
 
 2009-08-02  Chong Yidong  <cyd@stupidchicken.com>
 
        * font-lock.el (font-lock-string-face, font-lock-builtin-face)
-       (font-lock-variable-name-face, font-lock-constant-face): Darken
-       the colors for light backgrounds.
+       (font-lock-variable-name-face, font-lock-constant-face):
+       Darken the colors for light backgrounds.
 
 2009-08-01  Eli Zaretskii  <eliz@gnu.org>
 
 
        * net/zeroconf.el (zeroconf-init): Check for "GetVersionString"
        instead of "IsNSSSupportAvailable".  Avahi ought to work also when
-       "IsNSSSupportAvailable" method is not available.  Reported by
-       Steve Youngs <steve@sxemacs.org>.
+       "IsNSSSupportAvailable" method is not available.
+       Reported by Steve Youngs <steve@sxemacs.org>.
 
 2009-07-24  Kenichi Handa  <handa@m17n.org>
 
 
 2009-07-21  Chong Yidong  <cyd@stupidchicken.com>
 
-       * mail/rmailedit.el (rmail-edit-mode): Use
-       auto-save-include-big-deletions.
+       * mail/rmailedit.el (rmail-edit-mode):
+       Use auto-save-include-big-deletions.
 
-       * mail/rmail.el (rmail-variables): Use
-       auto-save-include-big-deletions.
+       * mail/rmail.el (rmail-variables):
+       Use auto-save-include-big-deletions.
 
        * files.el (auto-save-mode): Revert 2009-07-21 and 2009-07-16
        changes.
        * w32-fns.el (x-selection-owner-p): New function.
 
        * mouse.el (mouse-drag-track): Call deactivate-mark earlier.
-       (mouse-yank-at-click, mouse-yank-primary): If
-       select-active-regions is non-nil, deactivate the mark before
+       (mouse-yank-at-click, mouse-yank-primary):
+       If select-active-regions is non-nil, deactivate the mark before
        insertion.
 
        * simple.el (deactivate-mark, set-mark): Only save selection if we
 
        * select.el (x-set-selection): Doc fix.
        (x-valid-simple-selection-p): Allow buffer values.
-       (xselect--selection-bounds): Handle buffer values.  Suggested by
-       David De La Harpe Golden.
+       (xselect--selection-bounds): Handle buffer values.
+       Suggested by David De La Harpe Golden.
 
-       * mouse.el (mouse-set-region, mouse-drag-track): Call
-       copy-region-as-kill before setting the mark, to let
+       * mouse.el (mouse-set-region, mouse-drag-track):
+       Call copy-region-as-kill before setting the mark, to let
        select-active-regions work.
 
 2009-07-15  David De La Harpe Golden  <david@harpegolden.net>
        * progmodes/gdb-mi.el: Port memory buffer from gdb-ui.el.
        (gdb-memory-address): New variable which holds top address of
        memory page shown in memory buffer.
-       (gdb-memory-repeat-count, gdb-memory-format, gdb-memory-unit): New
-       customization variables.
+       (gdb-memory-repeat-count, gdb-memory-format, gdb-memory-unit):
+       New customization variables.
        New functions:
        (gdb-display-memory-buffer, gdb-frame-memory-buffer): Functions to
        display the memory buffer.
        (gdb-memory-unit-word, gdb-memory-unit-halfword)
        (gdb-memory-unit-giant, gdb-memory-unit-byte): Functions to set
        unit size used in memory buffer.
-       (gdb-memory-show-next-page, gdb-memory-show-previous-page): Switch
-       to next/previous page of memory buffer.
+       (gdb-memory-show-next-page, gdb-memory-show-previous-page):
+       Switch to next/previous page of memory buffer.
        Now using (bindat-get-field) instead of fadr functions.
 
 2009-07-07  Sam Steingold  <sds@gnu.org>
 
 2009-07-07  Kenichi Handa  <handa@m17n.org>
 
-       * international/mule-cmds.el (reset-language-environment): Put
-       the highset priority to the charset iso-8859-1.
+       * international/mule-cmds.el (reset-language-environment):
+       Put the highset priority to the charset iso-8859-1.
 
 2009-07-06  Chong Yidong  <cyd@stupidchicken.com>
 
        (woman-file-name, woman2-format-paragraphs)
        (woman-leave-blank-lines): Code cleanup.
        (woman-use-own-frame): Change default to nil.
-       (woman-italic, woman-bold, woman-unknown, woman-addition): Change
-       defaults to inherit from default faces.
+       (woman-italic, woman-bold, woman-unknown, woman-addition):
+       Change defaults to inherit from default faces.
        (woman2-process-escapes): Consume the newline after a stand-alone
        filler character (Bug#3651).
 
        (verilog-auto-ascii-enum): Support one-hot state machines in
        AUTOASCIIENUM.  Suggested by Lloyd Gomez.
        (verilog-auto-inst, verilog-auto-inst-port): Include interface
-       modport in AUTOINST and add vl-modport for users.  Reported by
-       David Rogoff.
+       modport in AUTOINST and add vl-modport for users.
+       Reported by David Rogoff.
        (verilog-auto-inout-module, verilog-auto-inst)
        (verilog-decls-get-interfaces, verilog-insert-definition)
        (verilog-insert-one-definition, verilog-read-decls)
index 42a3f87cb1165fb4998d965a7efe05daf3ff2685..4513045e5c2ed063a3fb4d2d40ef78b0c077a383 100644 (file)
@@ -4491,24 +4491,42 @@ Before and after saving the buffer, this function runs
   "View the differences between BUFFER and its associated file.
 This requires the external program `diff' to be in your `exec-path'."
   (interactive "bBuffer: ")
-  (with-current-buffer (get-buffer (or buffer (current-buffer)))
+  (diff-buffer-internal (get-buffer (or buffer (current-buffer)))
+                       (get-buffer-create "*Diff*"))
+  ;; return always nil, so that save-buffers-kill-emacs will not move
+  ;; over to the next unsaved buffer when calling `d'.
+  nil)
+
+(defvar diff-buffer-buffer)    ;; suppress compiler warnings.
+
+(defun diff-buffer-internal (buffer result-buffer)
+  (if (not (and buffer (buffer-name buffer)))
+      (error "Original buffer deleted."))
+  (with-current-buffer buffer
     (if (and buffer-file-name
             (file-exists-p buffer-file-name))
        (let ((tempfile (make-temp-file "buffer-content-")))
          (unwind-protect
              (progn
                (write-region nil nil tempfile nil 'nomessage)
-               (diff buffer-file-name tempfile nil t)
-               (sit-for 0))
+               ;; No asynch so we don't delete the temp file prematurely.
+               (diff-into-buffer result-buffer buffer-file-name tempfile
+                                 nil t)
+               (sit-for 0)
+               ;; Now revise the revert-buffer-function, since the
+               ;; default will not be able to find the temp file.
+               (with-current-buffer result-buffer
+                 (set (make-local-variable 'diff-buffer-buffer) buffer)
+                 (setq revert-buffer-function
+                       (lambda (ignore-auto noconfirm)
+                         (diff-buffer-internal diff-buffer-buffer
+                                               (current-buffer))))))
            (when (file-exists-p tempfile)
              (delete-file tempfile))))
       (message "Buffer %s has no associated file on disc" (buffer-name))
       ;; Display that message for 1 second so that user can read it
       ;; in the minibuffer.
-      (sit-for 1)))
-  ;; return always nil, so that save-buffers-kill-emacs will not move
-  ;; over to the next unsaved buffer when calling `d'.
-  nil)
+      (sit-for 1))))
 
 (defvar save-some-buffers-action-alist
   `((?\C-r
index e79e72c8b0d62f78ac0c06bae4bf7142cd78b36a..1a835b59994da134bcc8eec28396ffa38eae23ef 100644 (file)
@@ -108,11 +108,16 @@ specified in `diff-switches' are passed to the diff command."
                  (read-file-name "Diff original file: "
                                  (file-name-directory newf) nil t)))
      (list oldf newf (diff-switches))))
+  (diff-into-buffer nil old new switches no-async))
+
+(defun diff-into-buffer (buf old new &optional switches no-async)
+  ;; Noninteractive helper for creating and reverting diff buffers.
   (setq new (expand-file-name new)
        old (expand-file-name old))
   (or switches (setq switches diff-switches)) ; If not specified, use default.
+  (or buf (setq buf (get-buffer-create "*Diff*")))
   (let* ((old-alt (file-local-copy old))
-       (new-alt (file-local-copy new))
+        (new-alt (file-local-copy new))
         (command
          (mapconcat 'identity
                     `(,diff-command
@@ -123,7 +128,6 @@ specified in `diff-switches' are passed to the diff command."
                       ,(shell-quote-argument (or old-alt old))
                       ,(shell-quote-argument (or new-alt new)))
                     " "))
-        (buf (get-buffer-create "*Diff*"))
         (thisdir default-directory)
         proc)
     (save-excursion