comparison lisp/diff-mode.el @ 31705:9fec94425d43

Doc fix.
author Miles Bader <miles@gnu.org>
date Tue, 19 Sep 2000 02:43:33 +0000
parents e05ee0693dda
children 6b057ae8165d
comparison
equal deleted inserted replaced
31704:d21a5e3bfbd8 31705:9fec94425d43
2 2
3 ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
4 4
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> 5 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
6 ;; Keywords: patch diff 6 ;; Keywords: patch diff
7 ;; Revision: $Id: diff-mode.el,v 1.13 2000/09/12 11:24:28 miles Exp $ 7 ;; Revision: $Id: diff-mode.el,v 1.14 2000/09/18 08:15:38 miles Exp $
8 8
9 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
10 10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify 11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by 12 ;; it under the terms of the GNU General Public License as published by
882 (equal (match-string 1) (match-string 2))))) 882 (equal (match-string 1) (match-string 2)))))
883 883
884 (defun diff-hunk-text (hunk destp &optional line-offset) 884 (defun diff-hunk-text (hunk destp &optional line-offset)
885 "Returns the literal source text from HUNK, if DESTP is nil, otherwise the 885 "Returns the literal source text from HUNK, if DESTP is nil, otherwise the
886 destination text. If LINE-OFFSET is non-nil, it should be a line-offset in 886 destination text. If LINE-OFFSET is non-nil, it should be a line-offset in
887 HUNK, and instead of a string, a cons cell is returned who's car is the 887 HUNK, and instead of a string, a cons cell is returned whose car is the
888 appropriate text, and who's cdr is the corresponding line-offset." 888 appropriate text, and whose cdr is the corresponding line-offset in that text."
889 (with-temp-buffer 889 (with-temp-buffer
890 (erase-buffer) 890 (erase-buffer)
891 (insert hunk) 891 (insert hunk)
892 (goto-char (point-min)) 892 (goto-char (point-min))
893 (let ((src-pos nil) 893 (let ((src-pos nil)