help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting from compile-internal to compilation-start


From: kidologie
Subject: Re: Converting from compile-internal to compilation-start
Date: Thu, 8 Jan 2009 07:18:01 -0800 (PST)
User-agent: G2/1.0

On Jan 7, 4:13 pm, kidologie <richwel...@gmail.com> 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:
>
>  (compile-internal (concat "nits -emacs" command)
>                     "All done" "rt-nits" nil grep-regexp-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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]