/[emacs]/emacs/lisp/diff-mode.el
ViewVC logotype

Diff of /emacs/lisp/diff-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.78 by lute, Mon Jul 4 23:08:52 2005 UTC revision 1.79 by jurta, Tue Jul 19 11:28:35 2005 UTC
# Line 197  when editing big diffs)." Line 197  when editing big diffs)."
197      (((class color) (min-colors 88) (background dark))      (((class color) (min-colors 88) (background dark))
198       :background "grey60" :weight bold)       :background "grey60" :weight bold)
199      (((class color) (background light))      (((class color) (background light))
200       :foreground "yellow" :weight bold)       :foreground "green" :weight bold)
201      (((class color) (background dark))      (((class color) (background dark))
202       :foreground "cyan" :weight bold)       :foreground "cyan" :weight bold)
203      (t :weight bold))                   ; :height 1.3      (t :weight bold))                   ; :height 1.3
# Line 250  when editing big diffs)." Line 250  when editing big diffs)."
250  (put 'diff-changed-face 'face-alias 'diff-changed)  (put 'diff-changed-face 'face-alias 'diff-changed)
251  (defvar diff-changed-face 'diff-changed)  (defvar diff-changed-face 'diff-changed)
252    
253    (defface diff-indicator-removed
254      '((t :inherit diff-removed))
255      "`diff-mode' face used to highlight indicator of removed lines (-, <)."
256      :group 'diff-mode
257      :version "22.1")
258    (defvar diff-indicator-removed-face 'diff-indicator-removed)
259    
260    (defface diff-indicator-added
261      '((t :inherit diff-added))
262      "`diff-mode' face used to highlight indicator of added lines (+, >)."
263      :group 'diff-mode
264      :version "22.1")
265    (defvar diff-indicator-added-face 'diff-indicator-added)
266    
267    (defface diff-indicator-changed
268      '((t :inherit diff-changed))
269      "`diff-mode' face used to highlight indicator of changed lines."
270      :group 'diff-mode
271      :version "22.1")
272    (defvar diff-indicator-changed-face 'diff-indicator-changed)
273    
274  (defface diff-function  (defface diff-function
275    '((t :inherit diff-context))    '((t :inherit diff-context))
276    "`diff-mode' face used to highlight function names produced by \"diff -p\"."    "`diff-mode' face used to highlight function names produced by \"diff -p\"."
# Line 259  when editing big diffs)." Line 280  when editing big diffs)."
280  (defvar diff-function-face 'diff-function)  (defvar diff-function-face 'diff-function)
281    
282  (defface diff-context  (defface diff-context
283    '((t :inherit shadow))    '((((class color grayscale) (min-colors 88)) :inherit shadow))
284    "`diff-mode' face used to highlight context and other side-information."    "`diff-mode' face used to highlight context and other side-information."
285    :group 'diff-mode)    :group 'diff-mode)
286  ;; backward-compatibility alias  ;; backward-compatibility alias
# Line 298  when editing big diffs)." Line 319  when editing big diffs)."
319    
320    
321  (defvar diff-font-lock-keywords  (defvar diff-font-lock-keywords
322    `(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified    `(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$"          ;unified
323       (1 diff-hunk-header-face)       (1 diff-hunk-header-face) (2 diff-function-face))
324       (2 diff-function-face))      ("^\\(\\*\\{15\\}\\)\\(.*\\)$"                        ;context
325      ("^--- .+ ----$" . diff-hunk-header-face) ;context       (1 diff-hunk-header-face) (2 diff-function-face))
     ("^\\(\\*\\{15\\}\\)\\(.*\\)$"      ;context  
      (1 diff-hunk-header-face)  
      (2 diff-function-face))  
326      ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context      ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context
327        ("^--- .+ ----$"             . diff-hunk-header-face) ;context
328        ("^[0-9,]+[acd][0-9,]+$"     . diff-hunk-header-face) ;normal
329        ("^---$"                     . diff-hunk-header-face) ;normal
330      ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n"      ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n"
331       (0 diff-header-face) (2 diff-file-header-face prepend))       (0 diff-header-face) (2 diff-file-header-face prepend))
332      ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face)      ("^\\([-<]\\)\\(.*\n\\)"
333      ("^!.*\n" (0 diff-changed-face))       (1 diff-indicator-removed-face) (2 diff-removed-face))
334      ("^[+>].*\n" (0 diff-added-face))      ("^\\([+>]\\)\\(.*\n\\)"
335      ("^[-<].*\n" (0 diff-removed-face))       (1 diff-indicator-added-face) (2 diff-added-face))
336      ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend))      ("^\\(!\\)\\(.*\n\\)"
337         (1 diff-indicator-changed-face) (2 diff-changed-face))
338        ("^Index: \\(.+\\).*\n"
339         (0 diff-header-face) (1 diff-index-face prepend))
340      ("^Only in .*\n" . diff-nonexistent-face)      ("^Only in .*\n" . diff-nonexistent-face)
341      ("^#.*" . font-lock-string-face)      ("^\\(#\\)\\(.*\\)"
342      ("^[^-=+*!<>].*\n" (0 diff-context-face))))       (1 (eval font-lock-comment-delimiter-face))
343         (2 (eval font-lock-comment-face)))
344        ("^[^-=+*!<>#].*\n" (0 diff-context-face))))
345    
346  (defconst diff-font-lock-defaults  (defconst diff-font-lock-defaults
347    '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil)))    '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil)))

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26