diff options
| author | Stefan Monnier | 2004-10-10 04:08:43 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-10-10 04:08:43 +0000 |
| commit | 4f8150654e0b719e33bb809eb10a2c2c6fac3abe (patch) | |
| tree | 9496891b8444e444cdd918a884651c38bb6b5339 /lisp/diff-mode.el | |
| parent | bfbc9ea9e083a9d8f72d00595f92e1074c14e86f (diff) | |
| download | emacs-4f8150654e0b719e33bb809eb10a2c2c6fac3abe.tar.gz emacs-4f8150654e0b719e33bb809eb10a2c2c6fac3abe.zip | |
(diff-current-defun): Fix 2004-06-13's change.
Diffstat (limited to 'lisp/diff-mode.el')
| -rw-r--r-- | lisp/diff-mode.el | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 0a7f1a1950a..c945a6a7221 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; diff-mode.el --- a mode for viewing/editing context diffs | 1 | ;;; diff-mode.el --- a mode for viewing/editing context diffs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 6 | ;; Keywords: convenience patch diff | 7 | ;; Keywords: convenience patch diff |
| @@ -171,75 +172,73 @@ when editing big diffs)." | |||
| 171 | 172 | ||
| 172 | (defface diff-header-face | 173 | (defface diff-header-face |
| 173 | '((((class color) (min-colors 88) (background light)) | 174 | '((((class color) (min-colors 88) (background light)) |
| 174 | (:background "grey85")) | 175 | :background "grey85") |
| 175 | (((class color) (min-colors 88) (background dark)) | 176 | (((class color) (min-colors 88) (background dark)) |
| 176 | (:background "grey45")) | 177 | :background "grey45") |
| 177 | (((class color) (background light)) | 178 | (((class color) (background light)) |
| 178 | (:foreground "blue1" :weight bold)) | 179 | :foreground "blue1" :weight bold) |
| 179 | (((class color) (background dark)) | 180 | (((class color) (background dark)) |
| 180 | (:foreground "green" :weight bold)) | 181 | :foreground "green" :weight bold) |
| 181 | (t (:weight bold))) | 182 | (t :weight bold)) |
| 182 | "`diff-mode' face inherited by hunk and index header faces.") | 183 | "`diff-mode' face inherited by hunk and index header faces.") |
| 183 | (defvar diff-header-face 'diff-header-face) | 184 | (defvar diff-header-face 'diff-header-face) |
| 184 | 185 | ||
| 185 | (defface diff-file-header-face | 186 | (defface diff-file-header-face |
| 186 | '((((class color) (min-colors 88) (background light)) | 187 | '((((class color) (min-colors 88) (background light)) |
| 187 | (:background "grey70" :weight bold)) | 188 | :background "grey70" :weight bold) |
| 188 | (((class color) (min-colors 88) (background dark)) | 189 | (((class color) (min-colors 88) (background dark)) |
| 189 | (:background "grey60" :weight bold)) | 190 | :background "grey60" :weight bold) |
| 190 | (((class color) (background light)) | 191 | (((class color) (background light)) |
| 191 | (:foreground "yellow" :weight bold)) | 192 | :foreground "yellow" :weight bold) |
| 192 | (((class color) (background dark)) | 193 | (((class color) (background dark)) |
| 193 | (:foreground "cyan" :weight bold)) | 194 | :foreground "cyan" :weight bold) |
| 194 | (t (:weight bold))) ; :height 1.3 | 195 | (t :weight bold)) ; :height 1.3 |
| 195 | "`diff-mode' face used to highlight file header lines.") | 196 | "`diff-mode' face used to highlight file header lines.") |
| 196 | (defvar diff-file-header-face 'diff-file-header-face) | 197 | (defvar diff-file-header-face 'diff-file-header-face) |
| 197 | 198 | ||
| 198 | (defface diff-index-face | 199 | (defface diff-index-face |
| 199 | '((t (:inherit diff-file-header-face))) | 200 | '((t :inherit diff-file-header-face)) |
| 200 | "`diff-mode' face used to highlight index header lines.") | 201 | "`diff-mode' face used to highlight index header lines.") |
| 201 | (defvar diff-index-face 'diff-index-face) | 202 | (defvar diff-index-face 'diff-index-face) |
| 202 | 203 | ||
| 203 | (defface diff-hunk-header-face | 204 | (defface diff-hunk-header-face |
| 204 | '((t (:inherit diff-header-face))) | 205 | '((t :inherit diff-header-face)) |
| 205 | "`diff-mode' face used to highlight hunk header lines.") | 206 | "`diff-mode' face used to highlight hunk header lines.") |
| 206 | (defvar diff-hunk-header-face 'diff-hunk-header-face) | 207 | (defvar diff-hunk-header-face 'diff-hunk-header-face) |
| 207 | 208 | ||
| 208 | (defface diff-removed-face | 209 | (defface diff-removed-face |
| 209 | '((t (:inherit diff-changed-face))) | 210 | '((t :inherit diff-changed-face)) |
| 210 | "`diff-mode' face used to highlight removed lines.") | 211 | "`diff-mode' face used to highlight removed lines.") |
| 211 | (defvar diff-removed-face 'diff-removed-face) | 212 | (defvar diff-removed-face 'diff-removed-face) |
| 212 | 213 | ||
| 213 | (defface diff-added-face | 214 | (defface diff-added-face |
| 214 | '((t (:inherit diff-changed-face))) | 215 | '((t :inherit diff-changed-face)) |
| 215 | "`diff-mode' face used to highlight added lines.") | 216 | "`diff-mode' face used to highlight added lines.") |
| 216 | (defvar diff-added-face 'diff-added-face) | 217 | (defvar diff-added-face 'diff-added-face) |
| 217 | 218 | ||
| 218 | (defface diff-changed-face | 219 | (defface diff-changed-face |
| 219 | '((((type tty pc) (class color) (background light)) | 220 | '((((type tty pc) (class color) (background light)) |
| 220 | (:foreground "magenta" :weight bold :slant italic)) | 221 | :foreground "magenta" :weight bold :slant italic) |
| 221 | (((type tty pc) (class color) (background dark)) | 222 | (((type tty pc) (class color) (background dark)) |
| 222 | (:foreground "yellow" :weight bold :slant italic)) | 223 | :foreground "yellow" :weight bold :slant italic)) |
| 223 | (t ())) | ||
| 224 | "`diff-mode' face used to highlight changed lines.") | 224 | "`diff-mode' face used to highlight changed lines.") |
| 225 | (defvar diff-changed-face 'diff-changed-face) | 225 | (defvar diff-changed-face 'diff-changed-face) |
| 226 | 226 | ||
| 227 | (defface diff-function-face | 227 | (defface diff-function-face |
| 228 | '((t (:inherit diff-context-face))) | 228 | '((t :inherit diff-context-face)) |
| 229 | "`diff-mode' face used to highlight function names produced by \"diff -p\".") | 229 | "`diff-mode' face used to highlight function names produced by \"diff -p\".") |
| 230 | (defvar diff-function-face 'diff-function-face) | 230 | (defvar diff-function-face 'diff-function-face) |
| 231 | 231 | ||
| 232 | (defface diff-context-face | 232 | (defface diff-context-face |
| 233 | '((((class color) (background light)) | 233 | '((((class color) (background light)) |
| 234 | (:foreground "grey50")) | 234 | :foreground "grey50") |
| 235 | (((class color) (background dark)) | 235 | (((class color) (background dark)) |
| 236 | (:foreground "grey70")) | 236 | :foreground "grey70")) |
| 237 | (t )) | ||
| 238 | "`diff-mode' face used to highlight context and other side-information.") | 237 | "`diff-mode' face used to highlight context and other side-information.") |
| 239 | (defvar diff-context-face 'diff-context-face) | 238 | (defvar diff-context-face 'diff-context-face) |
| 240 | 239 | ||
| 241 | (defface diff-nonexistent-face | 240 | (defface diff-nonexistent-face |
| 242 | '((t (:inherit diff-file-header-face))) | 241 | '((t :inherit diff-file-header-face)) |
| 243 | "`diff-mode' face used to highlight nonexistent files in recursive diffs.") | 242 | "`diff-mode' face used to highlight nonexistent files in recursive diffs.") |
| 244 | (defvar diff-nonexistent-face 'diff-nonexistent-face) | 243 | (defvar diff-nonexistent-face 'diff-nonexistent-face) |
| 245 | 244 | ||
| @@ -1255,7 +1254,7 @@ For use in `add-log-current-defun-function'." | |||
| 1255 | (save-excursion | 1254 | (save-excursion |
| 1256 | (when (looking-at diff-hunk-header-re) | 1255 | (when (looking-at diff-hunk-header-re) |
| 1257 | (forward-line 1) | 1256 | (forward-line 1) |
| 1258 | (while (and (looking-at " ") (not (zerop (forward-line 1)))))) | 1257 | (re-search-forward "^[^ ]" nil t)) |
| 1259 | (destructuring-bind (buf line-offset pos src dst &optional switched) | 1258 | (destructuring-bind (buf line-offset pos src dst &optional switched) |
| 1260 | (diff-find-source-location) | 1259 | (diff-find-source-location) |
| 1261 | (beginning-of-line) | 1260 | (beginning-of-line) |
| @@ -1355,5 +1354,5 @@ For use in `add-log-current-defun-function'." | |||
| 1355 | ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. | 1354 | ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. |
| 1356 | ;; | 1355 | ;; |
| 1357 | 1356 | ||
| 1358 | ;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 | 1357 | ;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 |
| 1359 | ;;; diff-mode.el ends here | 1358 | ;;; diff-mode.el ends here |