On 4/25/08 at 7:30 AM, [EMAIL PROTECTED] (Armin Deierling) wrote:

I searched the archives and learned that in some cases BBEdit greps the shebang line e.g. #!/bin/sh to determine Shell, Perl, etc modes. Why can't this be extended to more general usage like it is done in editors like nedit where you can specify grep pattern to scan the first lines of the file.
In my case I regularly insert a comment in the first line like
; ### scheme ###
and it works perfectly in nedit.

Here's an excerpt from the BBEdit 8.6 change notes:

    +   If a file contains an Emacs variable block (or line) with
a "mode: " variable in it, BBEdit will attempt to match the mode name against the installed languages, before attempting to match
        the file name suffix or guess based on the file's contents.

        By default, a language module's mode name is based on the
language's display name, converted to lower case and with spaces
        changed to hyphens. Thus, "Grep Search Pattern" would become
        "grep-search-pattern".

For additional flexibility, the language module developer can
        specify a list of Emacs modes that should match that language
        (above and beyond the mode derived from the language's display
        name). This is done in the language module's plist with the
        BBLMEmacsModeNames, which is an array of strings, thus:

            <key>BBLMEmacsModeNames</key>
            <array>
                <string>object-pascal</string>
                <string>mpw-pascal</string>
                <string>lightspeed-pascal</string>
            </array>

(This example provided for illustrative and entertainment purposes only.)

Enjoy,

R.
--
Rich Siegel                                 Bare Bones Software, Inc.
<[EMAIL PROTECTED]>                      <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.


--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to