unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How let speedbar know to parse a specific file?
@ 2010-04-27 17:37 Daniel (Youngwhan)
  2010-04-27 18:48 ` Lowell Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-27 17:37 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I am using speedbar to browse source code, and it parses Makefile as
well. Wonderful.

One thing I want to know is that my project has a different name of
Makefile, such like Makefile-other.

It looks that the speedbar does not recognize the different file name
of makefile (Makefile-other), and does not parse it. If it is
Makefile, then it surely parse it correctly.

Does anybody know how I can let the speedbar recognize the Makefile
with different name?

Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How let speedbar know to parse a specific file?
  2010-04-27 17:37 How let speedbar know to parse a specific file? Daniel (Youngwhan)
@ 2010-04-27 18:48 ` Lowell Gilbert
  2010-04-27 21:05   ` Daniel (Youngwhan)
  0 siblings, 1 reply; 4+ messages in thread
From: Lowell Gilbert @ 2010-04-27 18:48 UTC (permalink / raw)
  To: help-gnu-emacs

"Daniel (Youngwhan)" <breadncup@gmail.com> writes:

> Hi,
>
> I am using speedbar to browse source code, and it parses Makefile as
> well. Wonderful.
>
> One thing I want to know is that my project has a different name of
> Makefile, such like Makefile-other.
>
> It looks that the speedbar does not recognize the different file name
> of makefile (Makefile-other), and does not parse it. If it is
> Makefile, then it surely parse it correctly.
>
> Does anybody know how I can let the speedbar recognize the Makefile
> with different name?

I think that it's based on the major mode, so you need to get emacs to
recognize the appropriate makefile-*-mode as applying to that file. 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How let speedbar know to parse a specific file?
  2010-04-27 18:48 ` Lowell Gilbert
@ 2010-04-27 21:05   ` Daniel (Youngwhan)
  2010-04-29 17:49     ` Lowell Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-27 21:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 27, 11:48 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
> "Daniel (Youngwhan)" <breadn...@gmail.com> writes:
> > Hi,
>
> > I am using speedbar to browse source code, and it parses Makefile as
> > well. Wonderful.
>
> > One thing I want to know is that my project has a different name of
> > Makefile, such like Makefile-other.
>
> > It looks that the speedbar does not recognize the different file name
> > of makefile (Makefile-other), and does not parse it. If it is
> > Makefile, then it surely parse it correctly.
>
> > Does anybody know how I can let the speedbar recognize the Makefile
> > with different name?
>
> I think that it's based on the major mode, so you need to get emacs to
> recognize the appropriate makefile-*-mode as applying to that file.

Thank you for the reply, Lowell,

I am not familiar with Lisp language, so could you help me how I can
set up for the major mode properly, please?

I tried to open it as GNUMakefile mode by adding this in .emacs: (add-
to-list 'auto-mode-alist '("\\Makefile-other\\'" . makefile-gmake-
mode))

But, for speedbar, it still does not parse of it. (or even directory
view, it does not show up the Makefile-other as well.

Could you educate me how I can let the major mode change for the
different makefile name?

Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How let speedbar know to parse a specific file?
  2010-04-27 21:05   ` Daniel (Youngwhan)
@ 2010-04-29 17:49     ` Lowell Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Lowell Gilbert @ 2010-04-29 17:49 UTC (permalink / raw)
  To: help-gnu-emacs

"Daniel (Youngwhan)" <breadncup@gmail.com> writes:

> I am not familiar with Lisp language, so could you help me how I can
> set up for the major mode properly, please?

After further investigation, it turns out that is not sufficient.

> I tried to open it as GNUMakefile mode by adding this in .emacs: (add-
> to-list 'auto-mode-alist '("\\Makefile-other\\'" . makefile-gmake-
> mode))

That will set the major-mode, which you will want after you open up the
file, but apparently doesn't help speedbar.

This syntax is slightly better than the one you're using:
(add-to-list 'auto-mode-alist '("[Mm]akefile-other\\'" . makefile-gmake-mode))

> But, for speedbar, it still does not parse of it. (or even directory
> view, it does not show up the Makefile-other as well.

You need to set a variable called speedbar-add-supported-extension.  But
it isn't initialized until you load speedbar mode, so put this in your
.emacs:

(add-hook 'speedbar-load-hook
            '(lambda () (speedbar-add-supported-extension "[Mm]akefile-other\\'")))

Good luck.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-29 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 17:37 How let speedbar know to parse a specific file? Daniel (Youngwhan)
2010-04-27 18:48 ` Lowell Gilbert
2010-04-27 21:05   ` Daniel (Youngwhan)
2010-04-29 17:49     ` Lowell Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).