From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kidologie Newsgroups: gmane.emacs.help Subject: Re: Converting from compile-internal to compilation-start Date: Thu, 8 Jan 2009 07:18:01 -0800 (PST) Organization: http://groups.google.com Message-ID: <16c4f1b9-6872-4ac4-b473-b6aa6c4d2d90@s1g2000prg.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1231474671 21828 80.91.229.12 (9 Jan 2009 04:17:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2009 04:17:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 09 05:19:02 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 1LL8pl-00081D-Ea for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jan 2009 05:18:57 +0100 Original-Received: from localhost ([127.0.0.1]:47233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LL8oV-0003aU-Hy for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2009 23:17:39 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!s1g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 64.102.48.249 Original-X-Trace: posting.google.com 1231427881 23799 127.0.0.1 (8 Jan 2009 15:18:01 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 8 Jan 2009 15:18:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s1g2000prg.googlegroups.com; posting-host=64.102.48.249; posting-account=rKOZvgoAAACXuKh1uLk5HCu7Xwj27Egq User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165855 X-Mailman-Approved-At: Thu, 08 Jan 2009 23:16:36 -0500 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:61198 Archived-At: On Jan 7, 4:13=A0pm, kidologie wrote: > Hello - after upgrading to emacs22, I see that compile-internal is now > obsolete - I need to use compilation-start. > > What is the correct way to do this: > > =A0(compile-internal (concat "nits -emacs" command) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "All done" "rt-nits" nil grep-reg= exp-alist) > > using compilation-start? > > Thanks! Ok this handles both emacs21 and emacs 22 versions: (defun my-compile-start (command &optional mode buf-name highlight- regexp) (if (fboundp 'compilation-start) ; Emacs 22 (compilation-start command mode #'(lambda (mode-name) (concat "*" buf-name "*")) highlight-regexp) ; else (compile-internal command "No more hits" buf-name nil highlight-regexp)))