# HG changeset patch # User Miles Bader # Date 1032316550 0 # Node ID 967c2114c128bc70fb205130914e2cd64939c39b # Parent 8e9589a87f9b191c7efbe7a2af694dc5093e702b (diff-mode): Don't evaluate `compilation-last-buffer' unless it's bound. diff -r 8e9589a87f9b -r 967c2114c128 lisp/diff-mode.el --- a/lisp/diff-mode.el Wed Sep 18 02:10:18 2002 +0000 +++ b/lisp/diff-mode.el Wed Sep 18 02:35:50 2002 +0000 @@ -1,6 +1,6 @@ ;;; diff-mode.el --- a mode for viewing/editing context diffs -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: convenience patch diff @@ -889,7 +889,9 @@ (substring buffer-file-name 0 (match-beginning 0)))) ;; Be careful not to change compilation-last-buffer when we're just ;; doing a C-x v = (for example). - (let ((compilation-last-buffer compilation-last-buffer)) + (let ((compilation-last-buffer + (and (boundp 'compilation-last-buffer) + compilation-last-buffer))) (compilation-shell-minor-mode 1)) (when (and (> (point-max) (point-min)) diff-default-read-only)