summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-09-29 02:25:32 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-09-29 02:25:32 +0000
commit3cec9c570925214fb9c5b055d289b3410d2ce42c (patch)
treec895098d6be9d2214aa61efa18462aca5b7c8e47 /lisp/diff-mode.el
parentad710d9f2458f3c173e5e70bc1b85d690e2cd25e (diff)
downloademacs-3cec9c570925214fb9c5b055d289b3410d2ce42c.tar.gz
(diff-mode-map, diff-minor-mode-prefix):
Avoid user-reserved bindings. (diff-mode, diff-minor-mode): Drop make-local-hook (done by add-hook). (diff-header-face): Revert to grey85.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el29
1 files changed, 13 insertions, 16 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 1d00f696452..cb4b87bb5fe 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -4,7 +4,7 @@
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: patch diff
-;; Revision: $Id: diff-mode.el,v 1.21 2000/09/21 16:15:32 monnier Exp $
+;; Revision: $Id: diff-mode.el,v 1.22 2000/09/21 16:52:23 monnier Exp $
;; This file is part of GNU Emacs.
@@ -41,7 +41,6 @@
;; Bugs:
;; - Reverse doesn't work with normal diffs.
-;; - (nitpick) The mark is not always quite right in diff-goto-source.
;; Todo:
@@ -63,7 +62,7 @@
(defgroup diff-mode ()
- "Major-mode for viewing/editing diffs"
+ "Major mode for viewing/editing diffs"
:version "21.1"
:group 'tools
:group 'diff)
@@ -132,8 +131,8 @@ when editing big diffs)."
;; From compilation-minor-mode.
("\C-c\C-c" . diff-goto-source)
;; Misc operations.
- ("\C-cda" . diff-apply-hunk)
- ("\C-cdt" . diff-test-hunk))
+ ("\C-c\C-a" . diff-apply-hunk)
+ ("\C-c\C-t" . diff-test-hunk))
"Keymap for `diff-mode'. See also `diff-mode-shared-map'.")
(easy-menu-define diff-mode-menu diff-mode-map
@@ -148,10 +147,10 @@ when editing big diffs)."
;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)]
))
-(defcustom diff-minor-mode-prefix "\C-cd"
+(defcustom diff-minor-mode-prefix "\C-c="
"Prefix key for `diff-minor-mode' commands."
:group 'diff-mode
- :type '(choice (string "\e") (string "C-cd") string))
+ :type '(choice (string "\e") (string "C-c=") string))
(easy-mmode-defmap diff-minor-mode-map
`((,diff-minor-mode-prefix . ,diff-mode-shared-map))
@@ -163,7 +162,9 @@ when editing big diffs)."
;;;;
(defface diff-header-face
- '((t (:inherit highlight)))
+ '((((class color) (background light))
+ (:background "grey85"))
+ (t (:bold t)))
"`diff-mode' face inherited by hunk, file and index header faces."
:group 'diff-mode)
(defvar diff-header-face 'diff-header-face)
@@ -826,10 +827,8 @@ This mode runs `diff-mode-hook'.
(if (not diff-update-on-the-fly-flag)
(add-hook 'write-contents-hooks 'diff-write-contents-hooks)
(make-local-variable 'diff-unhandled-changes)
- (add-hook (make-local-hook 'after-change-functions)
- 'diff-after-change-function nil t)
- (add-hook (make-local-hook 'post-command-hook)
- 'diff-post-command-hook nil t))
+ (add-hook 'after-change-functions 'diff-after-change-function nil t)
+ (add-hook 'post-command-hook 'diff-post-command-hook nil t))
;; Neat trick from Dave Love to add more bindings in read-only mode:
(add-to-list (make-local-variable 'minor-mode-overriding-map-alist)
(cons 'buffer-read-only diff-mode-shared-map))
@@ -849,10 +848,8 @@ This mode runs `diff-mode-hook'.
(if (not diff-update-on-the-fly-flag)
(add-hook 'write-contents-hooks 'diff-write-contents-hooks)
(make-local-variable 'diff-unhandled-changes)
- (add-hook (make-local-hook 'after-change-functions)
- 'diff-after-change-function nil t)
- (add-hook (make-local-hook 'post-command-hook)
- 'diff-post-command-hook nil t)))
+ (add-hook 'after-change-functions 'diff-after-change-function nil t)
+ (add-hook 'post-command-hook 'diff-post-command-hook nil t)))
;;;