From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: how to patch diff into source code? Date: Wed, 21 Jan 2009 22:29:50 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1232573534 10539 80.91.229.12 (21 Jan 2009 21:32:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 21:32:14 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Lee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 21 22:33:23 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LPkhG-0006Bo-Hy for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 22:33:14 +0100 Original-Received: from localhost ([127.0.0.1]:34492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPkfy-0008J8-SG for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 16:31:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPke4-0006jf-Os for help-gnu-emacs@gnu.org; Wed, 21 Jan 2009 16:29:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPke3-0006hi-L0 for help-gnu-emacs@gnu.org; Wed, 21 Jan 2009 16:29:55 -0500 Original-Received: from [199.232.76.173] (port=35575 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPke3-0006hF-7l for help-gnu-emacs@gnu.org; Wed, 21 Jan 2009 16:29:55 -0500 Original-Received: from yw-out-1718.google.com ([74.125.46.154]:12539) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPke2-0006bF-LM for help-gnu-emacs@gnu.org; Wed, 21 Jan 2009 16:29:55 -0500 Original-Received: by yw-out-1718.google.com with SMTP id 9so1686693ywk.66 for ; Wed, 21 Jan 2009 13:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LK5Xp3EVlJqikFI+UgrEYR+yERN/DYhk8o6tuB+cgE0=; b=hqWlvC3senKUV6w5eDWnRUyQBVAO/cWRP4Ugijjdx+4OT4DXQpA2LTL9uX+aQvDTRR KQfHT1fh+PBIaQTHo4xoc0nTNiiYEvK67S6ZPOi1P9rZW6zJhgKPG3P7xsaFDpFlX+Jz hUyJ7NgARyYNuPB1RBgd8eW6EyWGG2CSGmShE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=yAqCyqlnS6wh3M3Ni6+0R6geJ1Mby9kAGwdB+u1/NiScEDQVkMmm/iMYW02yhMI+UZ 9Jd2JrDM2n+iv0u/GypcX5Jva8fWafiQORoXF9yOeud/b4gzp7HGTlagQYyPe95qIBlW 2JQrUqhRG8nf4q/jXgMApIHOqTRqEhiwzoj2k= Original-Received: by 10.151.6.2 with SMTP id j2mr987045ybi.127.1232573390700; Wed, 21 Jan 2009 13:29:50 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61542 Archived-At: On Wed, Jan 21, 2009 at 3:08 AM, Xah Lee wrote: > could anyone help me with a diff/patch question? > > i got the following patch: > > --- lisp\textmodes\css-mode.el.orig 2008-03-01 20:28:16.000000000 > +0100 > +++ lisp\textmodes\css-mode.el 2009-01-19 09:14:55.138125000 +0100 > @@ -369,5 +369,5 @@ > (forward-comment (- (point-max))) > ;; FIXME: We should also skip punctuation. > - (not (memq (char-before) '(?\; ?\ > {))))))))))) > + (not (or (bobp) (memq (char-before) '(?\; > ?\{)))))))))))) > > (defun css-forward-sexp (n) > > how do i use diff (or other?) to merge it into source? > i've never used diff for patching. > > i just found and used menu Tools=E2=80=A3Apply Patch, but then i got > > patching file /Users/xah/web/emacs/css-mode.el > patch: **** malformed patch at line 8: ?\{)))))))))))) > > is it something i did wrong or the patch? I know very little about diff, but it looks like the -+ rows are wrapped. However when I recently applied a patch with CVS Emacs (using the commands in the Diff menu) Emacs asked me if it should correct the wrapped lines.